2011-10-07 15:55:26 +02:00
|
|
|
#include "perf_precomp.hpp"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace cv;
|
|
|
|
using namespace perf;
|
2011-12-29 17:46:16 +01:00
|
|
|
using std::tr1::make_tuple;
|
|
|
|
using std::tr1::get;
|
2011-10-07 15:55:26 +02:00
|
|
|
|
|
|
|
typedef perf::TestBaseWithParam<size_t> VectorLength;
|
|
|
|
|
|
|
|
PERF_TEST_P(VectorLength, phase32f, testing::Values(128, 1000, 128*1024, 512*1024, 1024*1024))
|
|
|
|
{
|
2012-03-16 22:21:04 +01:00
|
|
|
size_t length = GetParam();
|
2011-10-07 15:55:26 +02:00
|
|
|
vector<float> X(length);
|
|
|
|
vector<float> Y(length);
|
|
|
|
vector<float> angle(length);
|
|
|
|
|
|
|
|
declare.in(X, Y, WARMUP_RNG).out(angle);
|
|
|
|
|
2011-12-29 17:46:16 +01:00
|
|
|
TEST_CYCLE_N(200) cv::phase(X, Y, angle, true);
|
2011-10-07 15:55:26 +02:00
|
|
|
|
2011-12-27 17:37:24 +01:00
|
|
|
SANITY_CHECK(angle, 5e-5);
|
2011-10-07 15:55:26 +02:00
|
|
|
}
|