From 79eba54a4f7b3d16e8687ea2c5b029bc43764159 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 12 Feb 2014 18:12:22 +0400 Subject: [PATCH] some fixes in perf tests --- modules/core/perf/opencl/perf_channels.cpp | 2 +- modules/ts/src/ts_perf.cpp | 34 ++++++++++++---------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/modules/core/perf/opencl/perf_channels.cpp b/modules/core/perf/opencl/perf_channels.cpp index 3a25bc3094..1dbad51a06 100644 --- a/modules/core/perf/opencl/perf_channels.cpp +++ b/modules/core/perf/opencl/perf_channels.cpp @@ -85,7 +85,7 @@ OCL_PERF_TEST_P(MergeFixture, Merge, typedef MergeParams SplitParams; typedef TestBaseWithParam SplitFixture; -OCL_PERF_TEST_P(SplitFixture, DISABLED_Split, +OCL_PERF_TEST_P(SplitFixture, Split, ::testing::Combine(OCL_TEST_SIZES, OCL_PERF_ENUM(CV_8U, CV_32F), Values(2, 3))) { const SplitParams params = GetParam(); diff --git a/modules/ts/src/ts_perf.cpp b/modules/ts/src/ts_perf.cpp index 68879225e1..5c1c32b50c 100644 --- a/modules/ts/src/ts_perf.cpp +++ b/modules/ts/src/ts_perf.cpp @@ -876,22 +876,24 @@ void TestBase::warmup(cv::InputOutputArray a, WarmUpType wtype) { if (a.empty()) return; - else if (a.isUMat() && wtype != WARMUP_READ) - { - int depth = a.depth(); - if (depth == CV_8U) - cv::randu(a, 0, 256); - else if (depth == CV_8S) - cv::randu(a, -128, 128); - else if (depth == CV_16U) - cv::randu(a, 0, 1024); - else if (depth == CV_32F || depth == CV_64F) - cv::randu(a, -1.0, 1.0); - else if (depth == CV_16S || depth == CV_32S) - cv::randu(a, -4096, 4096); - else - CV_Error(cv::Error::StsUnsupportedFormat, "Unsupported format"); - + else if (a.isUMat()) + { + if (wtype == WARMUP_RNG || wtype == WARMUP_WRITE) + { + int depth = a.depth(); + if (depth == CV_8U) + cv::randu(a, 0, 256); + else if (depth == CV_8S) + cv::randu(a, -128, 128); + else if (depth == CV_16U) + cv::randu(a, 0, 1024); + else if (depth == CV_32F || depth == CV_64F) + cv::randu(a, -1.0, 1.0); + else if (depth == CV_16S || depth == CV_32S) + cv::randu(a, -4096, 4096); + else + CV_Error(cv::Error::StsUnsupportedFormat, "Unsupported format"); + } return; } else if (a.kind() != cv::_InputArray::STD_VECTOR_MAT && a.kind() != cv::_InputArray::STD_VECTOR_VECTOR)