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:
@@ -72,13 +72,8 @@ using namespace cv::gpu;
|
||||
|
||||
namespace
|
||||
{
|
||||
#if defined(__GNUC__)
|
||||
#define cudaSafeCall(expr) ___cudaSafeCall(expr, __FILE__, __LINE__, __func__)
|
||||
#define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__, __func__)
|
||||
#else /* defined(__CUDACC__) || defined(__MSVC__) */
|
||||
#define cudaSafeCall(expr) ___cudaSafeCall(expr, __FILE__, __LINE__)
|
||||
#define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__)
|
||||
#endif
|
||||
#define cudaSafeCall(expr) ___cudaSafeCall(expr, __FILE__, __LINE__, CV_Func)
|
||||
#define nppSafeCall(expr) ___nppSafeCall(expr, __FILE__, __LINE__, CV_Func)
|
||||
|
||||
inline void ___cudaSafeCall(cudaError_t err, const char *file, const int line, const char *func = "")
|
||||
{
|
||||
|
@@ -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 = "")
|
||||
{
|
||||
|
@@ -415,13 +415,8 @@ cvCreateMap( int flags, int header_size, int elem_size,
|
||||
return map;
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define CV_PARSE_ERROR( errmsg ) \
|
||||
icvParseError( fs, __func__, (errmsg), __FILE__, __LINE__ )
|
||||
#else
|
||||
#define CV_PARSE_ERROR( errmsg ) \
|
||||
icvParseError( fs, "", (errmsg), __FILE__, __LINE__ )
|
||||
#endif
|
||||
icvParseError( fs, CV_Func, (errmsg), __FILE__, __LINE__ )
|
||||
|
||||
static void
|
||||
icvParseError( CvFileStorage* fs, const char* func_name,
|
||||
|
Reference in New Issue
Block a user