enabled gemm and dft erf test
authorilya-lavrenov <ilya.lavrenov@itseez.com>
Wed, 4 Sep 2013 07:55:00 +0000 (11:55 +0400)
committerilya-lavrenov <ilya.lavrenov@itseez.com>
Wed, 4 Sep 2013 16:02:02 +0000 (20:02 +0400)
modules/ocl/perf/perf_fft.cpp
modules/ocl/perf/perf_gemm.cpp
modules/ocl/perf/perf_precomp.hpp

index 840f009..4cba47e 100644 (file)
@@ -43,6 +43,7 @@
 // the use of this software, even if advised of the possibility of such damage.
 //
 //M*/
+
 #include "perf_precomp.hpp"
 
 using namespace perf;
@@ -51,7 +52,9 @@ using namespace perf;
 
 typedef TestBaseWithParam<Size> dftFixture;
 
-PERF_TEST_P(dftFixture, DISABLED_dft, OCL_TYPICAL_MAT_SIZES) // TODO not implemented
+#ifdef HAVE_CLAMDFFT
+
+PERF_TEST_P(dftFixture, dft, OCL_TYPICAL_MAT_SIZES)
 {
     const Size srcSize = GetParam();
 
@@ -70,7 +73,7 @@ PERF_TEST_P(dftFixture, DISABLED_dft, OCL_TYPICAL_MAT_SIZES) // TODO not impleme
 
         oclDst.download(dst);
 
-        SANITY_CHECK(dst);
+        SANITY_CHECK(dst, 1.5);
     }
     else if (RUN_PLAIN_IMPL)
     {
@@ -81,3 +84,5 @@ PERF_TEST_P(dftFixture, DISABLED_dft, OCL_TYPICAL_MAT_SIZES) // TODO not impleme
     else
         OCL_PERF_ELSE
 }
+
+#endif
index aaa1dac..803e1f9 100644 (file)
@@ -51,8 +51,9 @@ using namespace perf;
 
 typedef TestBaseWithParam<Size> gemmFixture;
 
-PERF_TEST_P(gemmFixture, DISABLED_gemm,
-            ::testing::Values(OCL_SIZE_1000, OCL_SIZE_2000)) // TODO not implemented
+#ifdef HAVE_CLAMDBLAS
+
+PERF_TEST_P(gemmFixture, gemm, ::testing::Values(OCL_SIZE_1000, OCL_SIZE_2000))
 {
     const Size srcSize = GetParam();
 
@@ -72,14 +73,16 @@ PERF_TEST_P(gemmFixture, DISABLED_gemm,
 
         oclDst.download(dst);
 
-        SANITY_CHECK(dst);
+        SANITY_CHECK(dst, 0.01);
     }
     else if (RUN_PLAIN_IMPL)
     {
         TEST_CYCLE() cv::gemm(src1, src2, 1.0, src3, 1.0, dst);
 
-        SANITY_CHECK(dst);
+        SANITY_CHECK(dst, 0.01);
     }
     else
         OCL_PERF_ELSE
 }
+
+#endif
index a93d74e..a6d9eab 100644 (file)
@@ -59,6 +59,7 @@
 #include <vector>
 #include <numeric>
 
+#include "cvconfig.h"
 #include "opencv2/core/core.hpp"
 #include "opencv2/imgproc/imgproc.hpp"
 #include "opencv2/highgui/highgui.hpp"
@@ -93,7 +94,7 @@ using namespace cv;
 
 #ifdef HAVE_OPENCV_GPU
 #define OCL_PERF_ELSE               \
-        if (RUN_GPU_IMPL)          \
+        if (RUN_GPU_IMPL)           \
             CV_TEST_FAIL_NO_IMPL(); \
         else                        \
             CV_TEST_FAIL_NO_IMPL();