From 63584bffdaebf06433e9e2873a9f7699230ce614 Mon Sep 17 00:00:00 2001 From: vbystricky Date: Fri, 23 May 2014 11:09:57 +0400 Subject: [PATCH] fix code in the kernel --- modules/core/src/opencl/reduce2.cl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/opencl/reduce2.cl b/modules/core/src/opencl/reduce2.cl index a41cc8574a..6f3ad7bacb 100644 --- a/modules/core/src/opencl/reduce2.cl +++ b/modules/core/src/opencl/reduce2.cl @@ -110,7 +110,7 @@ __kernel void reduce_horz_pre(__global const uchar * srcptr, int src_step, int s dstT tmp[cn] = { INIT_VALUE }; int src_step_mul = BUF_COLS * cn; - for (int x = 0; x < cols; x += BUF_COLS, src += src_step_mul) + for (int idx = x; idx < cols; idx += BUF_COLS, src += src_step_mul) { #pragma unroll for (int c = 0; c < cn; ++c)