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:
committed by
Alexander Alekhin
parent
71d406b40c
commit
87a4f4ab3a
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user