added performance test
authorIlya Lavrenov <ilya.lavrenov@itseez.com>
Fri, 30 May 2014 14:34:04 +0000 (18:34 +0400)
committerIlya Lavrenov <ilya.lavrenov@itseez.com>
Fri, 30 May 2014 14:34:04 +0000 (18:34 +0400)
modules/core/perf/opencl/perf_matop.cpp

index 51605b9..9bb3755 100644 (file)
@@ -122,6 +122,29 @@ OCL_PERF_TEST_P(CopyToFixture, CopyToWithMask,
     SANITY_CHECK(dst);
 }
 
+OCL_PERF_TEST_P(CopyToFixture, CopyToWithMaskUninit,
+                ::testing::Combine(OCL_PERF_ENUM(OCL_SIZE_1, OCL_SIZE_2, OCL_SIZE_3), OCL_TEST_TYPES))
+{
+    const Size_MatType_t params = GetParam();
+    const Size srcSize = get<0>(params);
+    const int type = get<1>(params);
+
+    checkDeviceMaxMemoryAllocSize(srcSize, type);
+
+    UMat src(srcSize, type), dst, mask(srcSize, CV_8UC1);
+    declare.in(src, mask, WARMUP_RNG);
+
+    for ( ;  next(); )
+    {
+        dst.release();
+        startTimer();
+        src.copyTo(dst, mask);
+        stopTimer();
+    }
+
+    SANITY_CHECK(dst);
+}
+
 } } // namespace cvtest::ocl
 
 #endif // HAVE_OPENCL