fixed the PR 1582
authorIlya Lavrenov <ilya.lavrenov@itseez.com>
Wed, 9 Oct 2013 10:07:24 +0000 (14:07 +0400)
committerIlya Lavrenov <ilya.lavrenov@itseez.com>
Wed, 9 Oct 2013 10:16:36 +0000 (14:16 +0400)
modules/ocl/src/opencl/arithm_add_scalar.cl
modules/ocl/test/test_arithm.cpp

index f908b89..671bd12 100644 (file)
@@ -70,7 +70,7 @@
 
 #if defined (FUNC_ABS)
 #define EXPRESSION \
-    T value = (src1[src1_index] > 0) ? src1[src1_index] : -src1[src1_index]; \
+    T value = src1[src1_index] > (T)(0) ? src1[src1_index] : -src1[src1_index]; \
     dst[dst_index] = value;
 #endif
 
index db05f45..6eb513f 100644 (file)
@@ -462,7 +462,7 @@ TEST_P(Min, Mat)
         random_roi();
 
         dst1_roi = cv::min(src1_roi, src2_roi);
-        cv::ocl::min(gsrc1, gsrc2, gdst1);
+        cv::ocl::min(gsrc1_roi, gsrc2_roi, gdst1_roi);
         Near(0);
     }
 }
@@ -476,7 +476,7 @@ TEST_P(Max, Mat)
         random_roi();
 
         dst1_roi = cv::min(src1_roi, src2_roi);
-        cv::ocl::min(gsrc1, gsrc2, gdst1);
+        cv::ocl::min(gsrc1_roi, gsrc2_roi, gdst1_roi);
         Near(0);
     }
 }
@@ -492,7 +492,7 @@ TEST_P(Abs, Abs)
         random_roi();
 
         dst1_roi = cv::abs(src1_roi);
-        cv::ocl::abs(gsrc1, gdst1);
+        cv::ocl::abs(gsrc1_roi, gdst1_roi);
         Near(0);
     }
 }