Fix some compilation errors and warnings.

pull/783/head
peng xiao 12 years ago
parent 77501f3ed0
commit 3fea2620e6
  1. 3
      modules/ocl/src/imgproc.cpp
  2. 3
      modules/ocl/src/match_template.cpp
  3. 8
      modules/ocl/src/opencl/imgproc_mulAndScaleSpectrums.cl

@ -1727,6 +1727,9 @@ static void convolve_run_fft(const oclMat &image, const oclMat &templ, oclMat &r
#else #else
CV_Error(CV_StsNotImplemented, "OpenCL DFT is not implemented"); CV_Error(CV_StsNotImplemented, "OpenCL DFT is not implemented");
#define UNUSED(x) (void)(x);
UNUSED(image) UNUSED(templ) UNUSED(result) UNUSED(ccorr) UNUSED(buf)
#undef UNUSED
#endif #endif
} }
static void convolve_run(const oclMat &src, const oclMat &temp1, oclMat &dst, String kernelName, const char **kernelString) static void convolve_run(const oclMat &src, const oclMat &temp1, oclMat &dst, String kernelName, const char **kernelString)

@ -112,6 +112,9 @@ namespace cv
else else
return false; return false;
#else #else
#define UNUSED(x) (void)(x);
UNUSED(method) UNUSED(depth) UNUSED(size)
#undef UNUSED
return true; return true;
#endif #endif
} }

@ -55,7 +55,7 @@ inline cfloat conjf(cfloat a)
} }
__kernel void __kernel void
mulAndScaleSpectrumsKernel( mulAndScaleSpectrumsKernel(
__global const cfloat* a, __global const cfloat* a,
__global const cfloat* b, __global const cfloat* b,
float scale, float scale,
@ -63,7 +63,7 @@ __kernel void
uint cols, uint cols,
uint rows, uint rows,
uint mstep uint mstep
) )
{ {
const uint x = get_global_id(0); const uint x = get_global_id(0);
const uint y = get_global_id(1); const uint y = get_global_id(1);
@ -75,7 +75,7 @@ __kernel void
} }
} }
__kernel void __kernel void
mulAndScaleSpectrumsKernel_CONJ( mulAndScaleSpectrumsKernel_CONJ(
__global const cfloat* a, __global const cfloat* a,
__global const cfloat* b, __global const cfloat* b,
float scale, float scale,
@ -83,7 +83,7 @@ __kernel void
uint cols, uint cols,
uint rows, uint rows,
uint mstep uint mstep
) )
{ {
const uint x = get_global_id(0); const uint x = get_global_id(0);
const uint y = get_global_id(1); const uint y = get_global_id(1);

Loading…
Cancel
Save