From: Vadim Pisarevsky Date: Wed, 13 Aug 2014 12:32:01 +0000 (+0400) Subject: now the tests pass with loop_times==30 X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~3026^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d97f9fc477272b7b35e2737147ca733854c1d1e9;p=platform%2Fupstream%2Fopencv.git now the tests pass with loop_times==30 --- diff --git a/modules/core/src/arithm.cpp b/modules/core/src/arithm.cpp index 2a177cb..277270d 100644 --- a/modules/core/src/arithm.cpp +++ b/modules/core/src/arithm.cpp @@ -1491,9 +1491,6 @@ static bool ocl_arithm_op(InputArray _src1, InputArray _src2, OutputArray _dst, if (!doubleSupport && (depth2 == CV_64F || depth1 == CV_64F)) return false; - if( (oclop == OCL_OP_MUL_SCALE || oclop == OCL_OP_DIV_SCALE) && (depth1 >= CV_32F || depth2 >= CV_32F || ddepth >= CV_32F) ) - return false; - int kercn = haveMask || haveScalar ? cn : ocl::predictOptimalVectorWidth(_src1, _src2, _dst); int scalarcn = kercn == 3 ? 4 : kercn, rowsPerWI = d.isIntel() ? 4 : 1; diff --git a/modules/core/src/copy.cpp b/modules/core/src/copy.cpp index 2bd6ebb..3003c81 100644 --- a/modules/core/src/copy.cpp +++ b/modules/core/src/copy.cpp @@ -762,7 +762,7 @@ void flip( InputArray _src, OutputArray _dst, int flip_mode ) flipHoriz( dst.data, dst.step, dst.data, dst.step, dst.size(), esz ); } -/*#ifdef HAVE_OPENCL +#if defined HAVE_OPENCL && !defined __APPLE__ static bool ocl_repeat(InputArray _src, int ny, int nx, OutputArray _dst) { @@ -790,7 +790,7 @@ static bool ocl_repeat(InputArray _src, int ny, int nx, OutputArray _dst) return k.run(2, globalsize, NULL, false); } -#endif*/ +#endif void repeat(InputArray _src, int ny, int nx, OutputArray _dst) { @@ -800,8 +800,10 @@ void repeat(InputArray _src, int ny, int nx, OutputArray _dst) Size ssize = _src.size(); _dst.create(ssize.height*ny, ssize.width*nx, _src.type()); - /*CV_OCL_RUN(_dst.isUMat(), - ocl_repeat(_src, ny, nx, _dst))*/ +#if !defined __APPLE__ + CV_OCL_RUN(_dst.isUMat(), + ocl_repeat(_src, ny, nx, _dst)) +#endif Mat src = _src.getMat(), dst = _dst.getMat(); Size dsize = dst.size(); diff --git a/modules/core/test/ocl/test_arithm.cpp b/modules/core/test/ocl/test_arithm.cpp index 3af01f3..6e0884c 100644 --- a/modules/core/test/ocl/test_arithm.cpp +++ b/modules/core/test/ocl/test_arithm.cpp @@ -341,7 +341,7 @@ OCL_TEST_P(Mul, Mat_Scalar_Scale) OCL_OFF(cv::multiply(src1_roi, val, dst1_roi, val[0])); OCL_ON(cv::multiply(usrc1_roi, val, udst1_roi, val[0])); - Near(udst1_roi.depth() >= CV_32F ? 1e-2 : 1); + Near(udst1_roi.depth() >= CV_32F ? 2e-2 : 1); } } @@ -397,7 +397,7 @@ OCL_TEST_P(Div, Mat_Scale) OCL_OFF(cv::divide(src1_roi, src2_roi, dst1_roi, val[0])); OCL_ON(cv::divide(usrc1_roi, usrc2_roi, udst1_roi, val[0])); - Near(udst1_roi.depth() >= CV_32F ? 4e-3 : 1); + Near(udst1_roi.depth() >= CV_32F ? 2e-2 : 1); } }