1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge pull request #11409 from tomoaki0705/fixCLAHEfailure

Arm: fix the test failure of OCL_Imgproc/CLAHETest.Accuracy on ODROID-XU4 (#11409)

* fix the test failure of OCL_Imgproc/CLAHETest.Accuracy on ODROID-XU4
  * avoid the race condition in the reduce

* imgproc(ocl): simplify CLAHE code

* remove unused class
This commit is contained in:
Tomoaki Teshima
2018-04-27 22:41:56 +09:00
committed by Alexander Alekhin
parent 71d406b40c
commit 87a4f4ab3a
2 changed files with 17 additions and 68 deletions
+1 -10
View File
@@ -54,16 +54,7 @@ namespace clahe
const int tilesX, const int tilesY, const cv::Size tileSize,
const int clipLimit, const float lutScale)
{
cv::ocl::Kernel _k("calcLut", cv::ocl::imgproc::clahe_oclsrc);
bool is_cpu = cv::ocl::Device::getDefault().type() == cv::ocl::Device::TYPE_CPU;
cv::String opts;
if(is_cpu)
opts = "-D CPU ";
else
opts = cv::format("-D WAVE_SIZE=%d", _k.preferedWorkGroupSizeMultiple());
cv::ocl::Kernel k("calcLut", cv::ocl::imgproc::clahe_oclsrc, opts);
cv::ocl::Kernel k("calcLut", cv::ocl::imgproc::clahe_oclsrc);
if(k.empty())
return false;