diff --git a/modules/ocl/perf/perf_arithm.cpp b/modules/ocl/perf/perf_arithm.cpp index 1fb82f1221..814b272f02 100644 --- a/modules/ocl/perf/perf_arithm.cpp +++ b/modules/ocl/perf/perf_arithm.cpp @@ -76,7 +76,7 @@ PERF_TEST_P(LUTFixture, LUT, { ocl::oclMat oclSrc(src), oclLut(lut), oclDst(srcSize, dstType); - TEST_CYCLE() cv::ocl::LUT(oclSrc, oclLut, oclDst); + OCL_TEST_CYCLE() cv::ocl::LUT(oclSrc, oclLut, oclDst); oclDst.download(dst); SANITY_CHECK(dst); @@ -111,7 +111,7 @@ PERF_TEST_P(ExpFixture, Exp, OCL_TYPICAL_MAT_SIZES) { ocl::oclMat oclSrc(src), oclDst(srcSize, src.type()); - TEST_CYCLE() cv::ocl::exp(oclSrc, oclDst); + OCL_TEST_CYCLE() cv::ocl::exp(oclSrc, oclDst); oclDst.download(dst); @@ -150,7 +150,7 @@ PERF_TEST_P(LogFixture, Log, OCL_TYPICAL_MAT_SIZES) { ocl::oclMat oclSrc(src), oclDst(srcSize, src.type()); - TEST_CYCLE() cv::ocl::log(oclSrc, oclDst); + OCL_TEST_CYCLE() cv::ocl::log(oclSrc, oclDst); oclDst.download(dst); @@ -190,7 +190,7 @@ PERF_TEST_P(AddFixture, Add, { ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::add(oclSrc1, oclSrc2, oclDst); + OCL_TEST_CYCLE() cv::ocl::add(oclSrc1, oclSrc2, oclDst); oclDst.download(dst); @@ -229,7 +229,7 @@ PERF_TEST_P(MulFixture, Mul, ::testing::Combine(OCL_TYPICAL_MAT_SIZES, { ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::multiply(oclSrc1, oclSrc2, oclDst); + OCL_TEST_CYCLE() cv::ocl::multiply(oclSrc1, oclSrc2, oclDst); oclDst.download(dst); @@ -275,7 +275,7 @@ PERF_TEST_P(DivFixture, Div, { ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::divide(oclSrc1, oclSrc2, oclDst); + OCL_TEST_CYCLE() cv::ocl::divide(oclSrc1, oclSrc2, oclDst); oclDst.download(dst); @@ -312,7 +312,7 @@ PERF_TEST_P(AbsDiffFixture, Absdiff, { ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::absdiff(oclSrc1, oclSrc2, oclDst); + OCL_TEST_CYCLE() cv::ocl::absdiff(oclSrc1, oclSrc2, oclDst); oclDst.download(dst); @@ -351,7 +351,7 @@ PERF_TEST_P(CartToPolarFixture, CartToPolar, OCL_TYPICAL_MAT_SIZES) ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclDst1(srcSize, src1.type()), oclDst2(srcSize, src1.type()); - TEST_CYCLE() cv::ocl::cartToPolar(oclSrc1, oclSrc2, oclDst1, oclDst2); + OCL_TEST_CYCLE() cv::ocl::cartToPolar(oclSrc1, oclSrc2, oclDst1, oclDst2); oclDst1.download(dst1); oclDst2.download(dst2); @@ -392,7 +392,7 @@ PERF_TEST_P(PolarToCartFixture, PolarToCart, OCL_TYPICAL_MAT_SIZES) ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclDst1(srcSize, src1.type()), oclDst2(srcSize, src1.type()); - TEST_CYCLE() cv::ocl::polarToCart(oclSrc1, oclSrc2, oclDst1, oclDst2); + OCL_TEST_CYCLE() cv::ocl::polarToCart(oclSrc1, oclSrc2, oclDst1, oclDst2); oclDst1.download(dst1); oclDst2.download(dst2); @@ -430,7 +430,7 @@ PERF_TEST_P(MagnitudeFixture, Magnitude, OCL_TYPICAL_MAT_SIZES) ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclDst(srcSize, src1.type()); - TEST_CYCLE() cv::ocl::magnitude(oclSrc1, oclSrc2, oclDst); + OCL_TEST_CYCLE() cv::ocl::magnitude(oclSrc1, oclSrc2, oclDst); oclDst.download(dst); @@ -465,7 +465,7 @@ PERF_TEST_P(TransposeFixture, Transpose, { ocl::oclMat oclSrc(src), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::transpose(oclSrc, oclDst); + OCL_TEST_CYCLE() cv::ocl::transpose(oclSrc, oclDst); oclDst.download(dst); @@ -500,7 +500,7 @@ PERF_TEST_P(FlipFixture, Flip, { ocl::oclMat oclSrc(src), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::flip(oclSrc, oclDst, 0); + OCL_TEST_CYCLE() cv::ocl::flip(oclSrc, oclDst, 0); oclDst.download(dst); @@ -538,7 +538,7 @@ PERF_TEST_P(minMaxFixture, minMax, { ocl::oclMat oclSrc(src); - TEST_CYCLE() cv::ocl::minMax(oclSrc, &min_val, &max_val); + OCL_TEST_CYCLE() cv::ocl::minMax(oclSrc, &min_val, &max_val); ASSERT_GE(max_val, min_val); SANITY_CHECK(min_val); @@ -581,7 +581,7 @@ PERF_TEST_P(minMaxLocFixture, minMaxLoc, { ocl::oclMat oclSrc(src); - TEST_CYCLE() cv::ocl::minMaxLoc(oclSrc, &min_val, &max_val, &min_loc, &max_loc); + OCL_TEST_CYCLE() cv::ocl::minMaxLoc(oclSrc, &min_val, &max_val, &min_loc, &max_loc); ASSERT_GE(max_val, min_val); SANITY_CHECK(min_val); @@ -620,7 +620,7 @@ PERF_TEST_P(SumFixture, Sum, { ocl::oclMat oclSrc(src); - TEST_CYCLE() result = cv::ocl::sum(oclSrc); + OCL_TEST_CYCLE() result = cv::ocl::sum(oclSrc); SANITY_CHECK(result); } @@ -655,7 +655,7 @@ PERF_TEST_P(countNonZeroFixture, countNonZero, { ocl::oclMat oclSrc(src); - TEST_CYCLE() result = cv::ocl::countNonZero(oclSrc); + OCL_TEST_CYCLE() result = cv::ocl::countNonZero(oclSrc); SANITY_CHECK(result); } @@ -688,7 +688,7 @@ PERF_TEST_P(PhaseFixture, Phase, OCL_TYPICAL_MAT_SIZES) ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclDst(srcSize, src1.type()); - TEST_CYCLE() cv::ocl::phase(oclSrc1, oclSrc2, oclDst, 1); + OCL_TEST_CYCLE() cv::ocl::phase(oclSrc1, oclSrc2, oclDst, 1); oclDst.download(dst); @@ -725,7 +725,7 @@ PERF_TEST_P(BitwiseAndFixture, bitwise_and, { ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclDst(srcSize, src1.type()); - TEST_CYCLE() cv::ocl::bitwise_and(oclSrc1, oclSrc2, oclDst); + OCL_TEST_CYCLE() cv::ocl::bitwise_and(oclSrc1, oclSrc2, oclDst); oclDst.download(dst); @@ -760,7 +760,7 @@ PERF_TEST_P(BitwiseAndFixture, bitwise_not, { ocl::oclMat oclSrc(src), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::bitwise_not(oclSrc, oclDst); + OCL_TEST_CYCLE() cv::ocl::bitwise_not(oclSrc, oclDst); oclDst.download(dst); @@ -795,7 +795,7 @@ PERF_TEST_P(CompareFixture, compare, { ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclDst(srcSize, CV_8UC1); - TEST_CYCLE() cv::ocl::compare(oclSrc1, oclSrc2, oclDst, CMP_EQ); + OCL_TEST_CYCLE() cv::ocl::compare(oclSrc1, oclSrc2, oclDst, CMP_EQ); oclDst.download(dst); @@ -826,7 +826,7 @@ PERF_TEST_P(PowFixture, pow, OCL_TYPICAL_MAT_SIZES) { ocl::oclMat oclSrc(src), oclDst(srcSize, src.type()); - TEST_CYCLE() cv::ocl::pow(oclSrc, -2.0, oclDst); + OCL_TEST_CYCLE() cv::ocl::pow(oclSrc, -2.0, oclDst); oclDst.download(dst); @@ -858,7 +858,7 @@ PERF_TEST_P(MagnitudeSqrFixture, MagnitudeSqr, OCL_TYPICAL_MAT_SIZES) { ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclDst(srcSize, src1.type()); - TEST_CYCLE() cv::ocl::magnitudeSqr(oclSrc1, oclSrc2, oclDst); + OCL_TEST_CYCLE() cv::ocl::magnitudeSqr(oclSrc1, oclSrc2, oclDst); oclDst.download(dst); @@ -910,7 +910,7 @@ PERF_TEST_P(AddWeightedFixture, AddWeighted, { ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::addWeighted(oclSrc1, alpha, oclSrc2, beta, gama, oclDst); + OCL_TEST_CYCLE() cv::ocl::addWeighted(oclSrc1, alpha, oclSrc2, beta, gama, oclDst); oclDst.download(dst); diff --git a/modules/ocl/perf/perf_blend.cpp b/modules/ocl/perf/perf_blend.cpp index ea53c8a66d..018ec63154 100644 --- a/modules/ocl/perf/perf_blend.cpp +++ b/modules/ocl/perf/perf_blend.cpp @@ -97,7 +97,7 @@ PERF_TEST_P(blendLinearFixture, blendLinear, OCL_TYPICAL_MAT_SIZES) ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclDst; ocl::oclMat oclWeights1(weights1), oclWeights2(weights2); - TEST_CYCLE() cv::ocl::blendLinear(oclSrc1, oclSrc2, oclWeights1, oclWeights2, oclDst); + OCL_TEST_CYCLE() cv::ocl::blendLinear(oclSrc1, oclSrc2, oclWeights1, oclWeights2, oclDst); oclDst.download(dst); diff --git a/modules/ocl/perf/perf_brute_force_matcher.cpp b/modules/ocl/perf/perf_brute_force_matcher.cpp index af93b1b103..f4062568c4 100644 --- a/modules/ocl/perf/perf_brute_force_matcher.cpp +++ b/modules/ocl/perf/perf_brute_force_matcher.cpp @@ -76,7 +76,7 @@ PERF_TEST_P(BruteForceMatcherFixture, DISABLED_match, ocl::BruteForceMatcher_OCL_base oclMatcher(ocl::BruteForceMatcher_OCL_base::L2Dist); ocl::oclMat oclQuery(query), oclTrain(train); - TEST_CYCLE() oclMatcher.match(oclQuery, oclTrain, matches); + OCL_TEST_CYCLE() oclMatcher.match(oclQuery, oclTrain, matches); SANITY_CHECK_MATCHES(matches); } @@ -112,7 +112,7 @@ PERF_TEST_P(BruteForceMatcherFixture, DISABLED_knnMatch, ocl::BruteForceMatcher_OCL_base oclMatcher(ocl::BruteForceMatcher_OCL_base::L2Dist); ocl::oclMat oclQuery(query), oclTrain(train); - TEST_CYCLE() oclMatcher.knnMatch(oclQuery, oclTrain, matches, 2); + OCL_TEST_CYCLE() oclMatcher.knnMatch(oclQuery, oclTrain, matches, 2); std::vector & matches0 = matches[0], & matches1 = matches[1]; SANITY_CHECK_MATCHES(matches0); @@ -150,7 +150,7 @@ PERF_TEST_P(BruteForceMatcherFixture, DISABLED_radiusMatch, ocl::oclMat oclQuery(query), oclTrain(train); ocl::BruteForceMatcher_OCL_base oclMatcher(ocl::BruteForceMatcher_OCL_base::L2Dist); - TEST_CYCLE() oclMatcher.radiusMatch(oclQuery, oclTrain, matches, max_distance); + OCL_TEST_CYCLE() oclMatcher.radiusMatch(oclQuery, oclTrain, matches, max_distance); std::vector & matches0 = matches[0], & matches1 = matches[1]; SANITY_CHECK_MATCHES(matches0); diff --git a/modules/ocl/perf/perf_calib3d.cpp b/modules/ocl/perf/perf_calib3d.cpp index a155fc371a..08bb88f917 100644 --- a/modules/ocl/perf/perf_calib3d.cpp +++ b/modules/ocl/perf/perf_calib3d.cpp @@ -69,7 +69,7 @@ PERF_TEST(StereoMatchBMFixture, DISABLED_StereoMatchBM) // TODO doesn't work pro oclDisp(left_image.size(), CV_16SC1); ocl::StereoBM_OCL oclBM(0, n_disp, winSize); - TEST_CYCLE() oclBM(oclLeft, oclRight, oclDisp); + OCL_TEST_CYCLE() oclBM(oclLeft, oclRight, oclDisp); oclDisp.download(disp); diff --git a/modules/ocl/perf/perf_canny.cpp b/modules/ocl/perf/perf_canny.cpp index 3a5c633f56..a7847c687c 100644 --- a/modules/ocl/perf/perf_canny.cpp +++ b/modules/ocl/perf/perf_canny.cpp @@ -61,7 +61,7 @@ PERF_TEST(CannyFixture, DISABLED_Canny) // TODO difference between implmentation { ocl::oclMat oclImg(img), oclEdges(img.size(), CV_8UC1); - TEST_CYCLE() ocl::Canny(oclImg, oclEdges, 50.0, 100.0); + OCL_TEST_CYCLE() ocl::Canny(oclImg, oclEdges, 50.0, 100.0); oclEdges.download(edges); SANITY_CHECK(edges); diff --git a/modules/ocl/perf/perf_color.cpp b/modules/ocl/perf/perf_color.cpp index 703cc36cec..fc136f1b1a 100644 --- a/modules/ocl/perf/perf_color.cpp +++ b/modules/ocl/perf/perf_color.cpp @@ -62,7 +62,7 @@ PERF_TEST_P(cvtColorFixture, cvtColor, OCL_TYPICAL_MAT_SIZES) { ocl::oclMat oclSrc(src), oclDst(src.size(), CV_8UC4); - TEST_CYCLE() ocl::cvtColor(oclSrc, oclDst, CV_RGBA2GRAY, 4); + OCL_TEST_CYCLE() ocl::cvtColor(oclSrc, oclDst, CV_RGBA2GRAY, 4); oclDst.download(dst); SANITY_CHECK(dst); diff --git a/modules/ocl/perf/perf_fft.cpp b/modules/ocl/perf/perf_fft.cpp index ae0291c3e6..840f009a36 100644 --- a/modules/ocl/perf/perf_fft.cpp +++ b/modules/ocl/perf/perf_fft.cpp @@ -66,7 +66,7 @@ PERF_TEST_P(dftFixture, DISABLED_dft, OCL_TYPICAL_MAT_SIZES) // TODO not impleme { ocl::oclMat oclSrc(src), oclDst; - TEST_CYCLE() cv::ocl::dft(oclSrc, oclDst); + OCL_TEST_CYCLE() cv::ocl::dft(oclSrc, oclDst); oclDst.download(dst); diff --git a/modules/ocl/perf/perf_filters.cpp b/modules/ocl/perf/perf_filters.cpp index 588c0569ea..28c290096f 100644 --- a/modules/ocl/perf/perf_filters.cpp +++ b/modules/ocl/perf/perf_filters.cpp @@ -71,7 +71,7 @@ PERF_TEST_P(BlurFixture, Blur, { ocl::oclMat oclSrc(src), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::blur(oclSrc, oclDst, ksize, Point(-1, -1), bordertype); + OCL_TEST_CYCLE() cv::ocl::blur(oclSrc, oclDst, ksize, Point(-1, -1), bordertype); oclDst.download(dst); @@ -109,7 +109,7 @@ PERF_TEST_P(LaplacianFixture, Laplacian, { ocl::oclMat oclSrc(src), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::Laplacian(oclSrc, oclDst, -1, ksize, 1); + OCL_TEST_CYCLE() cv::ocl::Laplacian(oclSrc, oclDst, -1, ksize, 1); oclDst.download(dst); @@ -148,7 +148,7 @@ PERF_TEST_P(ErodeFixture, Erode, { ocl::oclMat oclSrc(src), oclDst(srcSize, type), oclKer(ker); - TEST_CYCLE() cv::ocl::erode(oclSrc, oclDst, oclKer); + OCL_TEST_CYCLE() cv::ocl::erode(oclSrc, oclDst, oclKer); oclDst.download(dst); @@ -189,7 +189,7 @@ PERF_TEST_P(SobelFixture, Sobel, { ocl::oclMat oclSrc(src), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::Sobel(oclSrc, oclDst, -1, dx, dy); + OCL_TEST_CYCLE() cv::ocl::Sobel(oclSrc, oclDst, -1, dx, dy); oclDst.download(dst); @@ -230,7 +230,7 @@ PERF_TEST_P(ScharrFixture, Scharr, { ocl::oclMat oclSrc(src), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::Scharr(oclSrc, oclDst, -1, dx, dy); + OCL_TEST_CYCLE() cv::ocl::Scharr(oclSrc, oclDst, -1, dx, dy); oclDst.download(dst); @@ -267,7 +267,7 @@ PERF_TEST_P(GaussianBlurFixture, GaussianBlur, { ocl::oclMat oclSrc(src), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::GaussianBlur(oclSrc, oclDst, Size(ksize, ksize), 0); + OCL_TEST_CYCLE() cv::ocl::GaussianBlur(oclSrc, oclDst, Size(ksize, ksize), 0); oclDst.download(dst); @@ -306,7 +306,7 @@ PERF_TEST_P(filter2DFixture, filter2D, { ocl::oclMat oclSrc(src), oclDst(srcSize, type), oclKernel(kernel); - TEST_CYCLE() cv::ocl::filter2D(oclSrc, oclDst, -1, oclKernel); + OCL_TEST_CYCLE() cv::ocl::filter2D(oclSrc, oclDst, -1, oclKernel); oclDst.download(dst); diff --git a/modules/ocl/perf/perf_gemm.cpp b/modules/ocl/perf/perf_gemm.cpp index fb68b92f72..ee043375c4 100644 --- a/modules/ocl/perf/perf_gemm.cpp +++ b/modules/ocl/perf/perf_gemm.cpp @@ -67,7 +67,7 @@ PERF_TEST_P(gemmFixture, DISABLED_gemm, OCL_TYPICAL_MAT_SIZES) // TODO not imple ocl::oclMat oclSrc1(src1), oclSrc2(src2), oclSrc3(src3), oclDst(srcSize, CV_32FC1); - TEST_CYCLE() cv::ocl::gemm(oclSrc1, oclSrc2, 1.0, oclSrc3, 1.0, oclDst); + OCL_TEST_CYCLE() cv::ocl::gemm(oclSrc1, oclSrc2, 1.0, oclSrc3, 1.0, oclDst); oclDst.download(dst); diff --git a/modules/ocl/perf/perf_gftt.cpp b/modules/ocl/perf/perf_gftt.cpp index 7fe16c2082..8a29adc0cc 100644 --- a/modules/ocl/perf/perf_gftt.cpp +++ b/modules/ocl/perf/perf_gftt.cpp @@ -77,7 +77,7 @@ PERF_TEST_P(GoodFeaturesToTrackFixture, GoodFeaturesToTrack, ocl::oclMat oclFrame(frame), pts_oclmat; ocl::GoodFeaturesToTrackDetector_OCL detector(maxCorners, qualityLevel, minDistance); - TEST_CYCLE() detector(oclFrame, pts_oclmat); + OCL_TEST_CYCLE() detector(oclFrame, pts_oclmat); detector.downloadPoints(pts_oclmat, pts_gold); diff --git a/modules/ocl/perf/perf_haar.cpp b/modules/ocl/perf/perf_haar.cpp index eac2b516fd..88f6c8d0fc 100644 --- a/modules/ocl/perf/perf_haar.cpp +++ b/modules/ocl/perf/perf_haar.cpp @@ -113,7 +113,7 @@ PERF_TEST(HaarFixture, Haar) ASSERT_TRUE(faceCascade.load(getDataPath("gpu/haarcascade/haarcascade_frontalface_alt.xml"))) << "can't load haarcascade_frontalface_alt.xml"; - TEST_CYCLE() faceCascade.detectMultiScale(oclImg, faces, + OCL_TEST_CYCLE() faceCascade.detectMultiScale(oclImg, faces, 1.1, 2, 0 | CV_HAAR_SCALE_IMAGE, Size(30, 30)); SANITY_CHECK(faces, 4 + 1e-4); diff --git a/modules/ocl/perf/perf_hog.cpp b/modules/ocl/perf/perf_hog.cpp index 2288215f48..15846d8315 100644 --- a/modules/ocl/perf/perf_hog.cpp +++ b/modules/ocl/perf/perf_hog.cpp @@ -72,7 +72,7 @@ PERF_TEST(HOGFixture, HOG) ocl_hog.setSVMDetector(ocl_hog.getDefaultPeopleDetector()); ocl::oclMat oclSrc(src); - TEST_CYCLE() ocl_hog.detectMultiScale(oclSrc, found_locations); + OCL_TEST_CYCLE() ocl_hog.detectMultiScale(oclSrc, found_locations); SANITY_CHECK(found_locations, 1 + DBL_EPSILON); } diff --git a/modules/ocl/perf/perf_imgproc.cpp b/modules/ocl/perf/perf_imgproc.cpp index f530e2602b..a6859d09d4 100644 --- a/modules/ocl/perf/perf_imgproc.cpp +++ b/modules/ocl/perf/perf_imgproc.cpp @@ -64,7 +64,7 @@ PERF_TEST_P(equalizeHistFixture, equalizeHist, OCL_TYPICAL_MAT_SIZES) { ocl::oclMat oclSrc(src), oclDst(srcSize, src.type()); - TEST_CYCLE() cv::ocl::equalizeHist(oclSrc, oclDst); + OCL_TEST_CYCLE() cv::ocl::equalizeHist(oclSrc, oclDst); oclDst.download(dst); @@ -101,7 +101,7 @@ PERF_TEST_P(CopyMakeBorderFixture, CopyMakeBorder, { ocl::oclMat oclSrc(src), oclDst(dstSize, type); - TEST_CYCLE() cv::ocl::copyMakeBorder(oclSrc, oclDst, 7, 5, 5, 7, borderType, cv::Scalar(1.0)); + OCL_TEST_CYCLE() cv::ocl::copyMakeBorder(oclSrc, oclDst, 7, 5, 5, 7, borderType, cv::Scalar(1.0)); oclDst.download(dst); @@ -141,7 +141,7 @@ PERF_TEST_P(cornerMinEigenValFixture, cornerMinEigenVal, { ocl::oclMat oclSrc(src), oclDst(srcSize, CV_32FC1); - TEST_CYCLE() cv::ocl::cornerMinEigenVal(oclSrc, oclDst, blockSize, apertureSize, borderType); + OCL_TEST_CYCLE() cv::ocl::cornerMinEigenVal(oclSrc, oclDst, blockSize, apertureSize, borderType); oclDst.download(dst); @@ -178,7 +178,7 @@ PERF_TEST_P(cornerHarrisFixture, cornerHarris, { ocl::oclMat oclSrc(src), oclDst(srcSize, CV_32FC1); - TEST_CYCLE() cv::ocl::cornerHarris(oclSrc, oclDst, 5, 7, 0.1, borderType); + OCL_TEST_CYCLE() cv::ocl::cornerHarris(oclSrc, oclDst, 5, 7, 0.1, borderType); oclDst.download(dst); @@ -209,7 +209,7 @@ PERF_TEST_P(integralFixture, DISABLED_integral, OCL_TYPICAL_MAT_SIZES) // TODO d { ocl::oclMat oclSrc(src), oclDst; - TEST_CYCLE() cv::ocl::integral(oclSrc, oclDst); + OCL_TEST_CYCLE() cv::ocl::integral(oclSrc, oclDst); oclDst.download(dst); @@ -252,7 +252,7 @@ PERF_TEST_P(WarpAffineFixture, WarpAffine, { ocl::oclMat oclSrc(src), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::warpAffine(oclSrc, oclDst, M, srcSize, interpolation); + OCL_TEST_CYCLE() cv::ocl::warpAffine(oclSrc, oclDst, M, srcSize, interpolation); oclDst.download(dst); @@ -297,7 +297,7 @@ PERF_TEST_P(WarpPerspectiveFixture, WarpPerspective, { ocl::oclMat oclSrc(src), oclDst(srcSize, type); - TEST_CYCLE() cv::ocl::warpPerspective(oclSrc, oclDst, M, srcSize, interpolation); + OCL_TEST_CYCLE() cv::ocl::warpPerspective(oclSrc, oclDst, M, srcSize, interpolation); oclDst.download(dst); @@ -342,7 +342,7 @@ PERF_TEST_P(resizeFixture, resize, { ocl::oclMat oclSrc(src), oclDst(dstSize, type); - TEST_CYCLE() cv::ocl::resize(oclSrc, oclDst, Size(), scale, scale, interType); + OCL_TEST_CYCLE() cv::ocl::resize(oclSrc, oclDst, Size(), scale, scale, interType); oclDst.download(dst); @@ -381,7 +381,7 @@ PERF_TEST_P(ThreshFixture, threshold, { ocl::oclMat oclSrc(src), oclDst(srcSize, CV_8U); - TEST_CYCLE() cv::ocl::threshold(oclSrc, oclDst, 50.0, 0.0, threshType); + OCL_TEST_CYCLE() cv::ocl::threshold(oclSrc, oclDst, 50.0, 0.0, threshType); oclDst.download(dst); @@ -611,7 +611,7 @@ PERF_TEST_P(meanShiftFilteringFixture, meanShiftFiltering, { ocl::oclMat oclSrc(src), oclDst(srcSize, CV_8UC4); - TEST_CYCLE() ocl::meanShiftFiltering(oclSrc, oclDst, sp, sr, crit); + OCL_TEST_CYCLE() ocl::meanShiftFiltering(oclSrc, oclDst, sp, sr, crit); oclDst.download(dst); @@ -706,7 +706,7 @@ PERF_TEST_P(meanShiftProcFixture, meanShiftProc, ocl::oclMat oclSrc(src), oclDst1(srcSize, CV_8UC4), oclDst2(srcSize, CV_16SC2); - TEST_CYCLE() ocl::meanShiftProc(oclSrc, oclDst1, oclDst2, 5, 6, crit); + OCL_TEST_CYCLE() ocl::meanShiftProc(oclSrc, oclDst1, oclDst2, 5, 6, crit); oclDst1.download(dst1); oclDst2.download(dst2); @@ -763,7 +763,7 @@ PERF_TEST_P(remapFixture, remap, ocl::oclMat oclSrc(src), oclDst(srcSize, type); ocl::oclMat oclXMap(xmap), oclYMap(ymap); - TEST_CYCLE() cv::ocl::remap(oclSrc, oclDst, oclXMap, oclYMap, interpolation, borderMode); + OCL_TEST_CYCLE() cv::ocl::remap(oclSrc, oclDst, oclXMap, oclYMap, interpolation, borderMode); oclDst.download(dst); @@ -800,7 +800,7 @@ PERF_TEST_P(CLAHEFixture, CLAHE, OCL_TYPICAL_MAT_SIZES) ocl::oclMat oclSrc(src), oclDst; cv::Ptr oclClahe = cv::ocl::createCLAHE(clipLimit); - TEST_CYCLE() oclClahe->apply(oclSrc, oclDst); + OCL_TEST_CYCLE() oclClahe->apply(oclSrc, oclDst); oclDst.download(dst); @@ -845,7 +845,7 @@ PERF_TEST_P(columnSumFixture, columnSum, OCL_TYPICAL_MAT_SIZES) { ocl::oclMat oclSrc(src), oclDst(srcSize, CV_32FC1); - TEST_CYCLE() cv::ocl::columnSum(oclSrc, oclDst); + OCL_TEST_CYCLE() cv::ocl::columnSum(oclSrc, oclDst); oclDst.download(dst); diff --git a/modules/ocl/perf/perf_match_template.cpp b/modules/ocl/perf/perf_match_template.cpp index 2cf06a4d76..cd90fe65a0 100644 --- a/modules/ocl/perf/perf_match_template.cpp +++ b/modules/ocl/perf/perf_match_template.cpp @@ -72,7 +72,7 @@ PERF_TEST_P(CV_TM_CCORRFixture, matchTemplate, { ocl::oclMat oclSrc(src), oclTempl(templ), oclDst(dstSize, CV_32F); - TEST_CYCLE() cv::ocl::matchTemplate(oclSrc, oclTempl, oclDst, CV_TM_CCORR); + OCL_TEST_CYCLE() cv::ocl::matchTemplate(oclSrc, oclTempl, oclDst, CV_TM_CCORR); oclDst.download(dst); @@ -104,7 +104,7 @@ PERF_TEST_P(CV_TM_CCORR_NORMEDFixture, matchTemplate, OCL_TYPICAL_MAT_SIZES) { ocl::oclMat oclSrc(src), oclTempl(templ), oclDst(dstSize, CV_8UC1); - TEST_CYCLE() cv::ocl::matchTemplate(oclSrc, oclTempl, oclDst, CV_TM_CCORR_NORMED); + OCL_TEST_CYCLE() cv::ocl::matchTemplate(oclSrc, oclTempl, oclDst, CV_TM_CCORR_NORMED); oclDst.download(dst); diff --git a/modules/ocl/perf/perf_matrix_operation.cpp b/modules/ocl/perf/perf_matrix_operation.cpp index 1fe4616ac3..ad13275030 100644 --- a/modules/ocl/perf/perf_matrix_operation.cpp +++ b/modules/ocl/perf/perf_matrix_operation.cpp @@ -70,7 +70,7 @@ PERF_TEST_P(ConvertToFixture, ConvertTo, { ocl::oclMat oclSrc(src), oclDst(srcSize, dstType); - TEST_CYCLE() oclSrc.convertTo(oclDst, dstType); + OCL_TEST_CYCLE() oclSrc.convertTo(oclDst, dstType); oclDst.download(dst); @@ -105,7 +105,7 @@ PERF_TEST_P(copyToFixture, copyTo, { ocl::oclMat oclSrc(src), oclDst(srcSize, type); - TEST_CYCLE() oclSrc.copyTo(oclDst); + OCL_TEST_CYCLE() oclSrc.copyTo(oclDst); oclDst.download(dst); @@ -141,7 +141,7 @@ PERF_TEST_P(setToFixture, setTo, { ocl::oclMat oclSrc(srcSize, type); - TEST_CYCLE() oclSrc.setTo(val); + OCL_TEST_CYCLE() oclSrc.setTo(val); oclSrc.download(src); SANITY_CHECK(src); diff --git a/modules/ocl/perf/perf_moments.cpp b/modules/ocl/perf/perf_moments.cpp index 200a27db82..6ecc766517 100644 --- a/modules/ocl/perf/perf_moments.cpp +++ b/modules/ocl/perf/perf_moments.cpp @@ -72,7 +72,7 @@ PERF_TEST_P(MomentsFixture, DISABLED_Moments, { ocl::oclMat oclSrc(src); - TEST_CYCLE() mom = cv::ocl::ocl_moments(oclSrc, binaryImage); // TODO Use oclSrc + OCL_TEST_CYCLE() mom = cv::ocl::ocl_moments(oclSrc, binaryImage); // TODO Use oclSrc cv::HuMoments(mom, dst); SANITY_CHECK(dst); diff --git a/modules/ocl/perf/perf_norm.cpp b/modules/ocl/perf/perf_norm.cpp index 736645d904..363bcd2b33 100644 --- a/modules/ocl/perf/perf_norm.cpp +++ b/modules/ocl/perf/perf_norm.cpp @@ -68,7 +68,7 @@ PERF_TEST_P(normFixture, DISABLED_norm, OCL_TYPICAL_MAT_SIZES) // TODO doesn't w { ocl::oclMat oclSrc1(src1), oclSrc2(src2); - TEST_CYCLE() value = cv::ocl::norm(oclSrc1, oclSrc2, NORM_INF); + OCL_TEST_CYCLE() value = cv::ocl::norm(oclSrc1, oclSrc2, NORM_INF); SANITY_CHECK(value); } diff --git a/modules/ocl/perf/perf_opticalflow.cpp b/modules/ocl/perf/perf_opticalflow.cpp index 34651d1af8..725b517c32 100644 --- a/modules/ocl/perf/perf_opticalflow.cpp +++ b/modules/ocl/perf/perf_opticalflow.cpp @@ -128,7 +128,7 @@ PERF_TEST_P(PyrLKOpticalFlowFixture, ocl::oclMat oclPts(1, static_cast(pts.size()), CV_32FC2, (void *)&pts[0]); ocl::oclMat oclNextPts, oclStatus, oclErr; - TEST_CYCLE() + OCL_TEST_CYCLE() oclPyrLK.sparse(oclFrame0, oclFrame1, oclPts, oclNextPts, oclStatus, &oclErr); MatToVector(oclNextPts, nextPts); @@ -175,7 +175,7 @@ PERF_TEST(tvl1flowFixture, tvl1flow) ocl::oclMat oclFrame0(frame0), oclFrame1(frame1), oclFlow1(srcSize, CV_32FC1), oclFlow2(srcSize, CV_32FC1); - TEST_CYCLE() oclAlg(oclFrame0, oclFrame1, oclFlow1, oclFlow2); + OCL_TEST_CYCLE() oclAlg(oclFrame0, oclFrame1, oclFlow1, oclFlow2); oclAlg.collectGarbage(); @@ -259,7 +259,7 @@ PERF_TEST_P(FarnebackOpticalFlowFixture, FarnebackOpticalFlow, farn.flags |= OPTFLOW_USE_INITIAL_FLOW; } - TEST_CYCLE() + OCL_TEST_CYCLE() farn(oclFrame0, oclFrame1, oclFlowx, oclFlowy); oclFlowx.download(flowx); diff --git a/modules/ocl/perf/perf_precomp.hpp b/modules/ocl/perf/perf_precomp.hpp index 5e6cd2266c..a93d74eb2e 100644 --- a/modules/ocl/perf/perf_precomp.hpp +++ b/modules/ocl/perf/perf_precomp.hpp @@ -102,4 +102,8 @@ using namespace cv; CV_TEST_FAIL_NO_IMPL(); #endif +#define OCL_TEST_CYCLE_N(n) for(declare.iterations(n); startTimer(), next(); ocl::finish(), stopTimer()) +#define OCL_TEST_CYCLE() for(; startTimer(), next(); ocl::finish(), stopTimer()) +#define OCL_TEST_CYCLE_MULTIRUN(runsNum) for(declare.runs(runsNum); startTimer(), next(); stopTimer()) for(int r = 0; r < runsNum; ocl::finish(), ++r) + #endif diff --git a/modules/ocl/perf/perf_pyramid.cpp b/modules/ocl/perf/perf_pyramid.cpp index c7f949d2c8..19c728bb77 100644 --- a/modules/ocl/perf/perf_pyramid.cpp +++ b/modules/ocl/perf/perf_pyramid.cpp @@ -70,7 +70,7 @@ PERF_TEST_P(pyrDownFixture, pyrDown, { ocl::oclMat oclSrc(src), oclDst(dstSize, type); - TEST_CYCLE() ocl::pyrDown(oclSrc, oclDst); + OCL_TEST_CYCLE() ocl::pyrDown(oclSrc, oclDst); oclDst.download(dst); @@ -107,7 +107,7 @@ PERF_TEST_P(pyrUpFixture, pyrUp, { ocl::oclMat oclSrc(src), oclDst(dstSize, type); - TEST_CYCLE() ocl::pyrDown(oclSrc, oclDst); + OCL_TEST_CYCLE() ocl::pyrDown(oclSrc, oclDst); oclDst.download(dst); diff --git a/modules/ocl/perf/perf_split_merge.cpp b/modules/ocl/perf/perf_split_merge.cpp index 48d64c100e..3821a8e163 100644 --- a/modules/ocl/perf/perf_split_merge.cpp +++ b/modules/ocl/perf/perf_split_merge.cpp @@ -78,7 +78,7 @@ PERF_TEST_P(MergeFixture, Merge, for (vector::size_type i = 0, end = src.size(); i < end; ++i) oclSrc[i] = src[i]; - TEST_CYCLE() cv::ocl::merge(oclSrc, oclDst); + OCL_TEST_CYCLE() cv::ocl::merge(oclSrc, oclDst); oclDst.download(dst); @@ -114,7 +114,7 @@ PERF_TEST_P(SplitFixture, Split, ocl::oclMat oclSrc(src); vector oclDst(channels, ocl::oclMat(srcSize, CV_MAKE_TYPE(depth, 1))); - TEST_CYCLE() cv::ocl::split(oclSrc, oclDst); + OCL_TEST_CYCLE() cv::ocl::split(oclSrc, oclDst); ASSERT_EQ(3, channels); Mat dst0, dst1, dst2;