Commit 018e85f1 authored by Davis King's avatar Davis King

Improved CHECK_CUDA() macro

parent 935a0b4e
......@@ -15,7 +15,7 @@
// Check the return value of a call to the CUDA runtime for an error condition.
#define CHECK_CUDA(call) \
{ \
do{ \
const cudaError_t error = call; \
if (error != cudaSuccess) \
{ \
......@@ -24,7 +24,7 @@
sout << "code: " << error << ", reason: " << cudaGetErrorString(error);\
throw dlib::cuda_error(sout.str()); \
} \
}
}while(false)
// ----------------------------------------------------------------------------------------
......
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