Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
4a9cccb4
Commit
4a9cccb4
authored
Sep 30, 2016
by
Davis King
Browse files
Minor changes to avoid warnings in visual studio 2015
parent
5582530b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
dlib/array2d/array2d_kernel.h
dlib/array2d/array2d_kernel.h
+1
-1
dlib/dnn/cuda_dlib.cu
dlib/dnn/cuda_dlib.cu
+1
-1
dlib/dnn/cuda_utils.h
dlib/dnn/cuda_utils.h
+2
-2
dlib/dnn/tensor.h
dlib/dnn/tensor.h
+1
-1
dlib/matrix/matrix.h
dlib/matrix/matrix.h
+2
-2
No files found.
dlib/array2d/array2d_kernel.h
View file @
4a9cccb4
...
@@ -72,7 +72,7 @@ namespace dlib
...
@@ -72,7 +72,7 @@ namespace dlib
- (*this)[x] == data[x]
- (*this)[x] == data[x]
!*/
!*/
friend
class
array2d
;
friend
class
array2d
<
T
,
mem_manager
>
;
friend
class
row_helper
;
friend
class
row_helper
;
public:
public:
...
...
dlib/dnn/cuda_dlib.cu
View file @
4a9cccb4
...
@@ -54,7 +54,7 @@ namespace dlib
...
@@ -54,7 +54,7 @@ namespace dlib
{
{
int
can_access
;
int
can_access
;
CHECK_CUDA
(
cudaDeviceCanAccessPeer
(
&
can_access
,
device_id
,
peer_device_id
));
CHECK_CUDA
(
cudaDeviceCanAccessPeer
(
&
can_access
,
device_id
,
peer_device_id
));
return
can_access
;
return
can_access
!=
0
;
}
}
bool
can_access_peer
(
const
tensor
&
device
,
const
tensor
&
peer_device
)
bool
can_access_peer
(
const
tensor
&
device
,
const
tensor
&
peer_device
)
{
{
...
...
dlib/dnn/cuda_utils.h
View file @
4a9cccb4
...
@@ -131,8 +131,8 @@ namespace dlib
...
@@ -131,8 +131,8 @@ namespace dlib
struct
max_jobs
struct
max_jobs
{
{
max_jobs
(
size_
t
n
)
:
num
(
n
)
{}
max_jobs
(
in
t
n
)
:
num
(
n
)
{}
size_
t
num
;
in
t
num
;
};
};
template
<
typename
Kernel
,
typename
...
T
>
template
<
typename
Kernel
,
typename
...
T
>
...
...
dlib/dnn/tensor.h
View file @
4a9cccb4
...
@@ -137,7 +137,7 @@ namespace dlib
...
@@ -137,7 +137,7 @@ namespace dlib
const
matrix_exp
<
EXP
>&
item
const
matrix_exp
<
EXP
>&
item
)
)
{
{
DLIB_CASSERT
(
idx
<
num_samples
());
DLIB_CASSERT
(
idx
<
(
unsigned
long
)
num_samples
());
DLIB_CASSERT
(
item
.
size
()
==
nr
()
*
nc
()
*
k
());
DLIB_CASSERT
(
item
.
size
()
==
nr
()
*
nc
()
*
k
());
static_assert
((
is_same_type
<
float
,
typename
EXP
::
type
>::
value
==
true
),
static_assert
((
is_same_type
<
float
,
typename
EXP
::
type
>::
value
==
true
),
"To assign a matrix to a tensor the matrix must contain float values"
);
"To assign a matrix to a tensor the matrix must contain float values"
);
...
...
dlib/matrix/matrix.h
View file @
4a9cccb4
...
@@ -1751,7 +1751,7 @@ namespace dlib
...
@@ -1751,7 +1751,7 @@ namespace dlib
literal_assign_helper
(
const
literal_assign_helper
&
item
)
:
m
(
item
.
m
),
r
(
item
.
r
),
c
(
item
.
c
),
has_been_used
(
false
)
{}
literal_assign_helper
(
const
literal_assign_helper
&
item
)
:
m
(
item
.
m
),
r
(
item
.
r
),
c
(
item
.
c
),
has_been_used
(
false
)
{}
explicit
literal_assign_helper
(
matrix
*
m_
)
:
m
(
m_
),
r
(
0
),
c
(
0
),
has_been_used
(
false
)
{
next
();}
explicit
literal_assign_helper
(
matrix
*
m_
)
:
m
(
m_
),
r
(
0
),
c
(
0
),
has_been_used
(
false
)
{
next
();}
~
literal_assign_helper
()
throw
(
std
::
exception
)
~
literal_assign_helper
()
noexcept
(
false
)
{
{
DLIB_CASSERT
(
!
has_been_used
||
r
==
m
->
nr
(),
DLIB_CASSERT
(
!
has_been_used
||
r
==
m
->
nr
(),
"You have used the matrix comma based assignment incorrectly by failing to
\n
"
"You have used the matrix comma based assignment incorrectly by failing to
\n
"
...
@@ -1778,7 +1778,7 @@ namespace dlib
...
@@ -1778,7 +1778,7 @@ namespace dlib
private:
private:
friend
class
matrix
;
friend
class
matrix
<
T
,
num_rows
,
num_cols
,
mem_manager
,
layout
>
;
void
next
(
void
next
(
)
const
)
const
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment