Enabled CV_Assert and such to print the function name with Visual C++.
Also, I made a separate macro for the current function name, which helps simplify a lot of code that uses it.
This commit is contained in:
@@ -69,11 +69,7 @@ namespace
|
||||
#else
|
||||
void throw_nocuda() { CV_Error(CV_StsNotImplemented, "The called functionality is disabled for current build or platform"); }
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define cudaSafeCall(expr) ___cudaSafeCall(expr, __FILE__, __LINE__, __func__)
|
||||
#else /* defined(__CUDACC__) || defined(__MSVC__) */
|
||||
#define cudaSafeCall(expr) ___cudaSafeCall(expr, __FILE__, __LINE__)
|
||||
#endif
|
||||
#define cudaSafeCall(expr) ___cudaSafeCall(expr, __FILE__, __LINE__, CV_Func)
|
||||
|
||||
void ___cudaSafeCall(cudaError_t err, const char* file, const int line, const char* func = "")
|
||||
{
|
||||
|
Reference in New Issue
Block a user