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:
Roman Donchenko
2013-11-07 17:13:30 +04:00
parent 641bb7ac6b
commit 2c38be079e
8 changed files with 25 additions and 78 deletions

View File

@@ -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 = "")
{