Merge pull request #2325 from alalek:perf_fix

This commit is contained in:
Roman Donchenko 2014-02-20 13:39:54 +04:00 committed by OpenCV Buildbot
commit 61976b8461
2 changed files with 18 additions and 16 deletions

View File

@ -85,7 +85,7 @@ OCL_PERF_TEST_P(MergeFixture, Merge,
typedef MergeParams SplitParams;
typedef TestBaseWithParam<SplitParams> 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();

View File

@ -876,22 +876,24 @@ void TestBase::warmup(cv::InputOutputArray a, WarmUpType wtype)
{
if (a.empty())
return;
else if (a.isUMat() && wtype != WARMUP_READ)
else if (a.isUMat())
{
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");
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)