Commit 6a21d80b authored by Davis King's avatar Davis King

Minor change to avoid compiler warnings

parent 10fe74c1
...@@ -137,7 +137,7 @@ namespace dlib ...@@ -137,7 +137,7 @@ namespace dlib
#else // if DLIB_USE_CUDA NOT DEFINED #else // if DLIB_USE_CUDA NOT DEFINED
inline void set_device ( inline void set_device (
int dev int
){} ){}
inline int get_device ( inline int get_device (
......
...@@ -349,10 +349,10 @@ namespace ...@@ -349,10 +349,10 @@ namespace
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
#ifdef DLIB_USE_CUDA
void test_more_ops(const long nr, const long nc) void test_more_ops(const long nr, const long nc)
{ {
print_spinner(); print_spinner();
#ifdef DLIB_USE_CUDA
// We are going to make sure that the CPU implementation of these things matches // We are going to make sure that the CPU implementation of these things matches
// the CUDA implementation. // the CUDA implementation.
...@@ -422,8 +422,8 @@ namespace ...@@ -422,8 +422,8 @@ namespace
cpu::threshold(src2, 0.5); cpu::threshold(src2, 0.5);
DLIB_TEST(equal(mat(src),mat(src2))); DLIB_TEST(equal(mat(src),mat(src2)));
#endif
} }
#endif
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
...@@ -439,12 +439,14 @@ namespace ...@@ -439,12 +439,14 @@ namespace
void perform_test ( void perform_test (
) )
{ {
#ifdef DLIB_USE_CUDA
test_more_ops(1,1); test_more_ops(1,1);
test_more_ops(3,4); test_more_ops(3,4);
test_more_ops(4,3); test_more_ops(4,3);
test_more_ops(4,1); test_more_ops(4,1);
test_more_ops(1,4); test_more_ops(1,4);
test_more_ops(10000,4); test_more_ops(10000,4);
#endif
test_tanh(); test_tanh();
test_softmax(); test_softmax();
test_sigmoid(); test_sigmoid();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment