From f64dfeb222ff0806d4dc454c9bfb49204b0e08da Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Tue, 13 May 2014 14:21:07 +0400 Subject: [PATCH] fix for cv::norm (norm_inf) --- modules/core/src/opencl/reduce.cl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/opencl/reduce.cl b/modules/core/src/opencl/reduce.cl index 6b4ccddeba..a697cbaecd 100644 --- a/modules/core/src/opencl/reduce.cl +++ b/modules/core/src/opencl/reduce.cl @@ -187,7 +187,7 @@ if (mask[mask_index]) \ { \ temp = loadpix(srcptr + src_index); \ - maxval = max(maxval, (srcT)(temp >= 0 ? temp : -temp)); \ + maxval = max(maxval, (srcT)(temp >= (srcT)(0) ? temp : -temp)); \ } #define SET_LOCAL_1 \ localmem_max[lid] = maxval