1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 08:13:04 +04:00

Relax accuracy requirements in the OpenCL sqrt perf arithmetic test.

Also bring perf_imgproc CornerMinEigenVal accuracy requirements in line with
the test_imgproc accuracy requirements on that test and fix indentation on
the latter.

Partially addresses issue #9821
This commit is contained in:
Aaron Greig
2021-03-31 10:16:19 +01:00
parent 6f1eefec69
commit f3f46096d6
3 changed files with 22 additions and 5 deletions
+6 -1
View File
@@ -678,7 +678,12 @@ OCL_PERF_TEST_P(SqrtFixture, Sqrt, ::testing::Combine(
OCL_TEST_CYCLE() cv::sqrt(src, dst);
if (CV_MAT_DEPTH(type) >= CV_32F)
// To square root 32 bit floats we use native_sqrt, which has implementation
// defined accuracy. We know intel devices have accurate native_sqrt, but
// otherwise stick to a relaxed sanity check. For types larger than 32 bits
// we can do the accuracy check for all devices as normal.
if (CV_MAT_DEPTH(type) > CV_32F || !ocl::useOpenCL() ||
ocl::Device::getDefault().isIntel())
SANITY_CHECK(dst, 1e-5, ERROR_RELATIVE);
else
SANITY_CHECK(dst, 1);