From 231bc17de79b773b001dc6dbf08e7ee533872c0b Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 29 Jan 2014 23:00:33 +0400 Subject: [PATCH] added conditional compilation --- modules/imgproc/src/histogram.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/imgproc/src/histogram.cpp b/modules/imgproc/src/histogram.cpp index e5b5cc76b7..6fc23d2ce9 100644 --- a/modules/imgproc/src/histogram.cpp +++ b/modules/imgproc/src/histogram.cpp @@ -1399,12 +1399,14 @@ static void calcHist( const Mat* images, int nimages, const int* channels, } } +#ifdef HAVE_OPENCL + enum { BINS = 256 }; -static bool ocl_calcHist1(InputArrayOfArrays _src, OutputArray _hist, int ddepth = CV_32S) +static bool ocl_calcHist1(InputArray _src, OutputArray _hist, int ddepth = CV_32S) { int compunits = ocl::Device::getDefault().maxComputeUnits(); size_t wgs = ocl::Device::getDefault().maxWorkGroupSize(); @@ -1450,6 +1452,8 @@ static bool ocl_calcHist(InputArrayOfArrays images, OutputArray hist) return ocl_calcHist1(v[0], hist, CV_32F); } +#endif + } void cv::calcHist( const Mat* images, int nimages, const int* channels,