Suppress warning when compiling deprecated OpenCL function on GNU compilers.

This commit is contained in:
peng xiao 2013-05-06 17:16:45 +08:00
parent 1eca49f40b
commit d34e7eca60

View File

@ -179,6 +179,10 @@ namespace cv
else else
#endif #endif
{ {
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
texture = clCreateImage2D( texture = clCreateImage2D(
(cl_context)mat.clCxt->oclContext(), (cl_context)mat.clCxt->oclContext(),
CL_MEM_READ_WRITE, CL_MEM_READ_WRITE,
@ -188,6 +192,9 @@ namespace cv
0, 0,
NULL, NULL,
&err); &err);
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
} }
size_t origin[] = { 0, 0, 0 }; size_t origin[] = { 0, 0, 0 };
size_t region[] = { mat.cols, mat.rows, 1 }; size_t region[] = { mat.cols, mat.rows, 1 };