Commit 9c4f0a98 authored by Alexander Alekhin's avatar Alexander Alekhin

ocl: drop CV_OclDbgAssert

parent 8fb48c09
...@@ -105,9 +105,7 @@ ...@@ -105,9 +105,7 @@
namespace cv { namespace ocl { namespace cv { namespace ocl {
#ifdef _DEBUG #ifndef _DEBUG
#define CV_OclDbgAssert CV_DbgAssert
#else
static bool isRaiseError() static bool isRaiseError()
{ {
static bool initialized = false; static bool initialized = false;
...@@ -119,7 +117,6 @@ static bool isRaiseError() ...@@ -119,7 +117,6 @@ static bool isRaiseError()
} }
return value; return value;
} }
#define CV_OclDbgAssert(expr) do { if (isRaiseError()) { CV_Assert(expr); } else { (void)(expr); } } while ((void)0, 0)
#endif #endif
#if CV_OPENCL_TRACE_CHECK #if CV_OPENCL_TRACE_CHECK
...@@ -2717,7 +2714,7 @@ struct Program::Impl ...@@ -2717,7 +2714,7 @@ struct Program::Impl
handle = clCreateProgramWithSource((cl_context)ctx.ptr(), 1, &srcptr, &srclen, &retval); handle = clCreateProgramWithSource((cl_context)ctx.ptr(), 1, &srcptr, &srclen, &retval);
CV_OCL_DBG_CHECK_RESULT(retval, "clCreateProgramWithSource"); CV_OCL_DBG_CHECK_RESULT(retval, "clCreateProgramWithSource");
CV_OclDbgAssert(handle && retval == CL_SUCCESS); CV_Assert(handle || retval != CL_SUCCESS);
if (handle && retval == CL_SUCCESS) if (handle && retval == CL_SUCCESS)
{ {
int i, n = (int)ctx.ndevices(); int i, n = (int)ctx.ndevices();
......
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