From 03002fff5420b1198ba57c443583e5711656d37d Mon Sep 17 00:00:00 2001 From: Kirill Kornyakov Date: Mon, 21 Nov 2011 11:48:56 +0000 Subject: [PATCH] Optimized version of 32F Norm function demands bigger MaxErr value, because it calculates norm in floats instead of double. --- modules/core/test/test_arithm.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/core/test/test_arithm.cpp b/modules/core/test/test_arithm.cpp index dc1215ae3f..ca0bd2e371 100644 --- a/modules/core/test/test_arithm.cpp +++ b/modules/core/test/test_arithm.cpp @@ -1246,7 +1246,11 @@ struct NormOp : public BaseElemWiseOp } double getMaxErr(int) { - return 1e-6; +#ifdef HAVE_TEGRA_OPTIMIZATION + return 2e-6; +#else + return 1e-6; +#endif } int normType; }; @@ -1341,11 +1345,11 @@ TEST_P(ElemWiseTest, accuracy) double maxErr = op->getMaxErr(depth); vector pos; - ASSERT_PRED_FORMAT2(cvtest::MatComparator(maxErr, op->context), dst0, dst) << "\nsrc[0] ~ " << cvtest::MatInfo(!src.empty() ? src[0] : Mat()) << "\ntestCase #" << testIdx << "\n"; + ASSERT_PRED_FORMAT2(cvtest::MatComparator(maxErr, op->context), dst0, dst) << "\nsrc[0] ~ " << cvtest::MatInfo(!src.empty() ? src[0] : Mat()) << "\ntestCase #" << testIdx << "\n"; } } - + INSTANTIATE_TEST_CASE_P(Core_Copy, ElemWiseTest, ::testing::Values(ElemWiseOpPtr(new cvtest::CopyOp))); INSTANTIATE_TEST_CASE_P(Core_Set, ElemWiseTest, ::testing::Values(ElemWiseOpPtr(new cvtest::SetOp))); INSTANTIATE_TEST_CASE_P(Core_SetZero, ElemWiseTest, ::testing::Values(ElemWiseOpPtr(new cvtest::SetZeroOp)));