From c942c6539acb4655494232c2891ec8114c671192 Mon Sep 17 00:00:00 2001 From: Alexander Karsakov Date: Mon, 8 Sep 2014 13:02:50 +0400 Subject: [PATCH] Remove mul24 since id can be larger 2^23 --- modules/core/src/opencl/meanstddev.cl | 2 +- modules/core/src/opencl/reduce.cl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/core/src/opencl/meanstddev.cl b/modules/core/src/opencl/meanstddev.cl index ed68c64538..f00439c11a 100644 --- a/modules/core/src/opencl/meanstddev.cl +++ b/modules/core/src/opencl/meanstddev.cl @@ -68,7 +68,7 @@ __kernel void meanStdDev(__global const uchar * srcptr, int src_step, int src_of #endif { #ifdef HAVE_SRC_CONT - int src_index = mul24(id, srcTSIZE); + int src_index = id * srcTSIZE; #else int src_index = mad24(id / cols, src_step, mul24(id % cols, srcTSIZE)); #endif diff --git a/modules/core/src/opencl/reduce.cl b/modules/core/src/opencl/reduce.cl index c89f1cf005..933aebcaff 100644 --- a/modules/core/src/opencl/reduce.cl +++ b/modules/core/src/opencl/reduce.cl @@ -578,13 +578,13 @@ __kernel void reduce(__global const uchar * srcptr, int src_step, int src_offset for (int grain = groupnum * WGS * kercn; id < total; id += grain) { #ifdef HAVE_SRC_CONT - int src_index = mul24(id, srcTSIZE); + int src_index = id * srcTSIZE; #else int src_index = mad24(id / cols, src_step, mul24(id % cols, srcTSIZE)); #endif #ifdef HAVE_SRC2 #ifdef HAVE_SRC2_CONT - int src2_index = mul24(id, srcTSIZE); + int src2_index = id * srcTSIZE; #else int src2_index = mad24(id / cols, src2_step, mul24(id % cols, srcTSIZE)); #endif