Merge pull request #1589 from ilya-lavrenov:pr1582_fix

This commit is contained in:
Andrey Pavlenko 2013-10-09 16:47:59 +04:00 committed by OpenCV Buildbot
commit e3b42ed137
2 changed files with 5 additions and 5 deletions

View 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

View 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);
}
}
@ -1466,7 +1466,7 @@ TEST_P(Norm, NORM_L1)
const double cpuRes = cv::norm(src1_roi, src2_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);
}
}