opencv/modules/imgproc/src/opencl
Zhigang Gong 0b08d2559e fix potential race condition in canny.cl.
See the below code snippet:

while(l_counter != 0)
{
    int mod = l_counter % LOCAL_TOTAL;
    int pix_per_thr = l_counter / LOCAL_TOTAL + ((lid < mod) ? 1 : 0);

    for (int i = 0; i < pix_per_thr; ++i)
    {
        int index = atomic_dec(&l_counter) - 1;
        ....
    }
    ....
    barrier(CLK_LOCAL_MEM_FENCE);
}

If we don't put a barrier before the for loop, then there is a possiblity
that some work item enter this loop but the others are not, the the l_counter
will be reduced in the for loop and may be changed to zero, and the other
work items may can't enter the while loop. If this happens, it breaks the
barrier's rule which requires all the work items reach the same barrier.
And it may hang the GPU depends on the implementation of opencl platform.

This issue is raised at:
https://github.com/Itseez/opencv/issues/5175

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2016-03-15 19:11:15 +08:00
..
accumulate.cl optimization of cv::accumulate** 2014-08-25 11:25:01 +04:00
bilateral.cl White space fixes 2014-04-15 09:32:34 -07:00
blend_linear.cl added cv::blendLinear 2013-12-10 13:07:52 +04:00
boxFilter.cl added 3-channels support to cv::boxFilter, cv::blur, cv::sqrBoxFilter 2014-03-24 14:31:42 +04:00
calc_back_project.cl Added ROUNDING_EPS for identical rounding after dividing on different platforms 2014-08-12 14:28:48 +04:00
canny.cl fix potential race condition in canny.cl. 2016-03-15 19:11:15 +08:00
clahe.cl CLAHE 2013-12-27 10:12:22 +04:00
corner.cl corners 2014-07-10 17:17:24 +04:00
covardata.cl Fixed calculation of l_stack_size 2014-09-03 17:40:17 +04:00
cvtcolor.cl Added optimized loading to YUV2RGB_422 kernel 2014-10-28 15:07:51 +03:00
filter2D.cl Optimization OpenCL version of Filter2D 2014-09-11 12:59:51 +04:00
filter2DSmall.cl multiple yet minor fixes to make most of the tests pass on Mac with Iris graphics 2014-08-16 00:29:10 +04:00
filterSep_singlePass.cl Fixed calculation of l_stack_size 2014-09-03 17:40:17 +04:00
filterSepCol.cl Changed integer operations to float for Intel devices 2014-04-23 11:00:32 +04:00
filterSepRow.cl Changed integer operations to float for Intel devices 2014-04-23 11:00:32 +04:00
filterSmall.cl fix for ocl_morphSmall 2014-08-21 16:31:24 +04:00
gftt.cl fix gftt opencv kernel when using mask 2015-04-22 16:13:50 +02:00
histogram.cl Fixed calculate_histogram kernel 2014-08-07 10:39:24 +04:00
hough_lines.cl Fix OpenCL version of HoughLinesP function 2014-11-05 14:31:06 +04:00
integral_sum.cl fixed ocl_integral 2014-08-05 12:01:28 +04:00
laplacian5.cl Fixed calculation of l_stack_size 2014-09-03 17:40:17 +04:00
match_template.cl Use vload to read unaligned data instead of dereference operator. 2014-09-17 19:28:07 +08:00
medianFilter.cl Moved new kernels under conditional compilation to disable their build for 3-channel images; added condition to use new kernels only for images that are big enough 2014-05-27 16:16:00 +04:00
moments.cl replaced factors computation by precomputed values, added kernel for 2014-06-23 11:04:39 +04:00
morph.cl multiple yet minor fixes to make most of the tests pass on Mac with Iris graphics 2014-08-16 00:29:10 +04:00
precornerdetect.cl implemented OpenCL version of cv::preCornerDetect 2014-01-22 13:46:26 +04:00
pyr_down.cl Fixed extrapolation in pyrDown 2014-08-07 10:39:25 +04:00
pyr_up.cl Optimize pyrUp_unrolled() by mad function. 2014-11-26 16:55:08 +08:00
remap.cl Fixed rounding in remap INTER_LINEAR mode 2014-08-07 10:39:24 +04:00
resize.cl multiple yet minor fixes to make most of the tests pass on Mac with Iris graphics 2014-08-16 00:29:10 +04:00
threshold.cl Optimized memory access by using stride pattern 2014-05-16 10:22:03 +04:00
warp_affine.cl Revert optimization for warpAffine INTER_NEAREST mode 2014-08-07 10:39:18 +04:00
warp_perspective.cl 3-channel support in OpenCL kernels for setTo, resize, warpAffine and warpPerspective 2014-02-12 19:29:18 +04:00