diff --git a/modules/core/perf/perf_dft.cpp b/modules/core/perf/perf_dft.cpp index 5cf4afb109..81c0d48e26 100644 --- a/modules/core/perf/perf_dft.cpp +++ b/modules/core/perf/perf_dft.cpp @@ -25,4 +25,4 @@ PERF_TEST_P(Size_MatType, dft, TEST_MATS_DFT) } SANITY_CHECK(dst, 1e-5); -} +} diff --git a/modules/core/perf/perf_dot.cpp b/modules/core/perf/perf_dot.cpp new file mode 100644 index 0000000000..1a4b8980e1 --- /dev/null +++ b/modules/core/perf/perf_dot.cpp @@ -0,0 +1,32 @@ +#include "perf_precomp.hpp" + +using namespace std; +using namespace cv; +using namespace perf; + +typedef tr1::tuple MatType_Length_t; +typedef TestBaseWithParam MatType_Length; + +PERF_TEST_P( MatType_Length, dot, + testing::Combine( + testing::Values( CV_8UC1, CV_32SC1, CV_32FC1 ), + testing::Values( 32, 64, 128, 256, 512, 1024 ) + )) +{ + unsigned int type = std::tr1::get<0>(GetParam()); + unsigned int size = std::tr1::get<1>(GetParam()); + Mat a(size, size, type); + Mat b(size, size, type); + + declare.in(a, WARMUP_RNG); + declare.in(b, WARMUP_RNG); + + double product; + + TEST_CYCLE(100) + { + product = a.dot(b); + } + + SANITY_CHECK(product, 1e-5); +} diff --git a/modules/core/perf/perf_minmax.cpp b/modules/core/perf/perf_minmax.cpp index 2d723809a6..d50bfc641a 100644 --- a/modules/core/perf/perf_minmax.cpp +++ b/modules/core/perf/perf_minmax.cpp @@ -8,7 +8,7 @@ using namespace perf; #define TYPICAL_MAT_TYPES_MINMAX CV_8SC1, CV_8SC4, CV_32SC1, CV_32FC1 #define TYPICAL_MATS_MINMAX testing::Combine( testing::Values( TYPICAL_MAT_SIZES_MINMAX), testing::Values( TYPICAL_MAT_TYPES_MINMAX) ) -PERF_TEST_P(Size_MatType, min_double, TYPICAL_MATS_MINMAX) +PERF_TEST_P(Size_MatType, min_double, TYPICAL_MATS_MINMAX) { Size sz = std::tr1::get<0>(GetParam()); int type = std::tr1::get<1>(GetParam()); @@ -23,7 +23,7 @@ PERF_TEST_P(Size_MatType, min_double, TYPICAL_MATS_MINMAX) SANITY_CHECK(c); } -PERF_TEST_P(Size_MatType, max_double, TYPICAL_MATS_MINMAX) +PERF_TEST_P(Size_MatType, max_double, TYPICAL_MATS_MINMAX) { Size sz = std::tr1::get<0>(GetParam()); int type = std::tr1::get<1>(GetParam());