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
943a07cb
Commit
943a07cb
authored
Jun 21, 2016
by
Fm
Browse files
Visual Studio 2015 UP3 support
parent
595f0128
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
dlib/dnn/core.h
dlib/dnn/core.h
+7
-5
dlib/use_cpp_11.cmake
dlib/use_cpp_11.cmake
+0
-1
No files found.
dlib/dnn/core.h
View file @
943a07cb
...
@@ -208,6 +208,8 @@ namespace dlib
...
@@ -208,6 +208,8 @@ namespace dlib
};
};
template
<
typename
T
>
struct
alwaysbool
{
typedef
bool
type
;
};
template
<
typename
T
>
struct
alwaysbool
{
typedef
bool
type
;
};
// one more structure for VS 2015 UP3 support workaround
template
<
typename
T
>
struct
alwaysbool2
{
typedef
bool
type
;
};
resizable_tensor
&
rt
();
resizable_tensor
&
rt
();
...
@@ -254,7 +256,7 @@ namespace dlib
...
@@ -254,7 +256,7 @@ namespace dlib
constexpr
auto
has_inplace_backward
(
constexpr
auto
has_inplace_backward
(
layer_type
&
layer
,
layer_type
&
layer
,
SUBNET
&
sub
SUBNET
&
sub
)
->
typename
alwaysbool
<
decltype
(
layer
.
backward
(
rt
(),
rt
(),
sub
,
rt
()))
>::
type
)
->
typename
alwaysbool
2
<
decltype
(
layer
.
backward
(
rt
(),
rt
(),
sub
,
rt
()))
>::
type
{
{
return
false
;
return
false
;
}
}
...
@@ -263,7 +265,7 @@ namespace dlib
...
@@ -263,7 +265,7 @@ namespace dlib
constexpr
auto
has_inplace_backward
(
constexpr
auto
has_inplace_backward
(
layer_type
&
layer
,
layer_type
&
layer
,
SUBNET
&
sub
SUBNET
&
sub
)
->
typename
alwaysbool
<
decltype
(
layer
.
backward
(
rt
(),
sub
,
rt
()))
>::
type
)
->
typename
alwaysbool
2
<
decltype
(
layer
.
backward
(
rt
(),
sub
,
rt
()))
>::
type
{
{
return
false
;
return
false
;
}
}
...
@@ -272,7 +274,7 @@ namespace dlib
...
@@ -272,7 +274,7 @@ namespace dlib
constexpr
auto
has_inplace_backward
(
constexpr
auto
has_inplace_backward
(
layer_type
&
layer
,
layer_type
&
layer
,
SUBNET
&
sub
SUBNET
&
sub
)
->
typename
alwaysbool
<
decltype
(
layer
.
backward_inplace
(
rt
(),
rt
(),
sub
.
get_gradient_input
(),
rt
()))
>::
type
)
->
typename
alwaysbool
2
<
decltype
(
layer
.
backward_inplace
(
rt
(),
rt
(),
sub
.
get_gradient_input
(),
rt
()))
>::
type
{
{
return
true
;
return
true
;
}
}
...
@@ -281,7 +283,7 @@ namespace dlib
...
@@ -281,7 +283,7 @@ namespace dlib
constexpr
auto
has_inplace_backward
(
constexpr
auto
has_inplace_backward
(
layer_type
&
layer
,
layer_type
&
layer
,
SUBNET
&
sub
SUBNET
&
sub
)
->
typename
alwaysbool
<
decltype
(
layer
.
backward_inplace
(
rt
(),
sub
.
get_gradient_input
(),
rt
()))
>::
type
)
->
typename
alwaysbool
2
<
decltype
(
layer
.
backward_inplace
(
rt
(),
sub
.
get_gradient_input
(),
rt
()))
>::
type
{
{
return
true
;
return
true
;
}
}
...
@@ -290,7 +292,7 @@ namespace dlib
...
@@ -290,7 +292,7 @@ namespace dlib
constexpr
auto
is_inplace_layer
(
constexpr
auto
is_inplace_layer
(
layer_type
&
layer
,
layer_type
&
layer
,
const
SUBNET
&
sub
const
SUBNET
&
sub
)
->
typename
alwaysbool
<
decltype
(
layer
.
forward
(
sub
,
rt
()))
>::
type
)
->
typename
alwaysbool
2
<
decltype
(
layer
.
forward
(
sub
,
rt
()))
>::
type
{
{
return
false
;
return
false
;
}
}
...
...
dlib/use_cpp_11.cmake
View file @
943a07cb
...
@@ -61,7 +61,6 @@ else()
...
@@ -61,7 +61,6 @@ else()
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_delegating_constructors;"
AND
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_delegating_constructors;"
AND
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_thread_local;"
AND
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_thread_local;"
AND
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_constexpr;"
AND
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_constexpr;"
AND
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_decltype_incomplete_return_types;"
AND
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_auto_type;"
)
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_auto_type;"
)
set
(
COMPILER_CAN_DO_CPP_11 1
)
set
(
COMPILER_CAN_DO_CPP_11 1
)
...
...
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