Commit e3b42ed1 authored by Andrey Pavlenko's avatar Andrey Pavlenko Committed by OpenCV Buildbot

Merge pull request #1589 from ilya-lavrenov:pr1582_fix

parents 6b69a66c fccd37de
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
#if defined (FUNC_ABS) #if defined (FUNC_ABS)
#define EXPRESSION \ #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; dst[dst_index] = value;
#endif #endif
......
...@@ -462,7 +462,7 @@ TEST_P(Min, Mat) ...@@ -462,7 +462,7 @@ TEST_P(Min, Mat)
random_roi(); random_roi();
dst1_roi = cv::min(src1_roi, src2_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); Near(0);
} }
} }
...@@ -476,7 +476,7 @@ TEST_P(Max, Mat) ...@@ -476,7 +476,7 @@ TEST_P(Max, Mat)
random_roi(); random_roi();
dst1_roi = cv::min(src1_roi, src2_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); Near(0);
} }
} }
...@@ -492,7 +492,7 @@ TEST_P(Abs, Abs) ...@@ -492,7 +492,7 @@ TEST_P(Abs, Abs)
random_roi(); random_roi();
dst1_roi = cv::abs(src1_roi); dst1_roi = cv::abs(src1_roi);
cv::ocl::abs(gsrc1, gdst1); cv::ocl::abs(gsrc1_roi, gdst1_roi);
Near(0); Near(0);
} }
} }
...@@ -1466,7 +1466,7 @@ TEST_P(Norm, NORM_L1) ...@@ -1466,7 +1466,7 @@ TEST_P(Norm, NORM_L1)
const double cpuRes = cv::norm(src1_roi, src2_roi, type); const double cpuRes = cv::norm(src1_roi, src2_roi, type);
const double gpuRes = cv::ocl::norm(gsrc1_roi, gsrc2_roi, type); const double gpuRes = cv::ocl::norm(gsrc1_roi, gsrc2_roi, type);
EXPECT_NEAR(cpuRes, gpuRes, 0.1); EXPECT_NEAR(cpuRes, gpuRes, 0.2);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment