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