|
|
|
@ -167,32 +167,32 @@ TEST(cornerHarris) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST(integral) |
|
|
|
|
{ |
|
|
|
|
Mat src, sum; |
|
|
|
|
gpu::GpuMat d_src, d_sum, d_buf; |
|
|
|
|
|
|
|
|
|
int size = 4000; |
|
|
|
|
|
|
|
|
|
gen(src, size, size, CV_8U, 0, 256); |
|
|
|
|
sum.create(size + 1, size + 1, CV_32S); |
|
|
|
|
|
|
|
|
|
d_src = src; |
|
|
|
|
d_sum.create(size + 1, size + 1, CV_32S); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 5; ++i) |
|
|
|
|
{ |
|
|
|
|
SUBTEST << "size " << size << ", 8U"; |
|
|
|
|
|
|
|
|
|
CPU_ON; |
|
|
|
|
integral(src, sum); |
|
|
|
|
CPU_OFF; |
|
|
|
|
|
|
|
|
|
GPU_ON; |
|
|
|
|
gpu::integralBuffered(d_src, d_sum, d_buf); |
|
|
|
|
GPU_OFF; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//TEST(integral)
|
|
|
|
|
//{
|
|
|
|
|
// Mat src, sum;
|
|
|
|
|
// gpu::GpuMat d_src, d_sum, d_buf;
|
|
|
|
|
//
|
|
|
|
|
// int size = 4000;
|
|
|
|
|
//
|
|
|
|
|
// gen(src, size, size, CV_8U, 0, 256);
|
|
|
|
|
// sum.create(size + 1, size + 1, CV_32S);
|
|
|
|
|
//
|
|
|
|
|
// d_src = src;
|
|
|
|
|
// d_sum.create(size + 1, size + 1, CV_32S);
|
|
|
|
|
//
|
|
|
|
|
// for (int i = 0; i < 5; ++i)
|
|
|
|
|
// {
|
|
|
|
|
// SUBTEST << "size " << size << ", 8U";
|
|
|
|
|
//
|
|
|
|
|
// CPU_ON;
|
|
|
|
|
// integral(src, sum);
|
|
|
|
|
// CPU_OFF;
|
|
|
|
|
//
|
|
|
|
|
// GPU_ON;
|
|
|
|
|
// gpu::integralBuffered(d_src, d_sum, d_buf);
|
|
|
|
|
// GPU_OFF;
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST(norm) |
|
|
|
@ -202,20 +202,20 @@ TEST(norm) |
|
|
|
|
|
|
|
|
|
for (int size = 2000; size <= 4000; size += 1000) |
|
|
|
|
{ |
|
|
|
|
SUBTEST << "size " << size << ", 32FC4"; |
|
|
|
|
SUBTEST << "size " << size << ", 32FC4, NORM_INF"; |
|
|
|
|
|
|
|
|
|
gen(src, size, size, CV_32FC4, Scalar::all(0), Scalar::all(1)); |
|
|
|
|
|
|
|
|
|
CPU_ON; |
|
|
|
|
for (int i = 0; i < 5; ++i) |
|
|
|
|
norm(src, NORM_L2); |
|
|
|
|
norm(src, NORM_INF); |
|
|
|
|
CPU_OFF; |
|
|
|
|
|
|
|
|
|
d_src = src; |
|
|
|
|
|
|
|
|
|
GPU_ON; |
|
|
|
|
for (int i = 0; i < 5; ++i) |
|
|
|
|
gpu::norm(d_src, NORM_L2, d_buf); |
|
|
|
|
gpu::norm(d_src, NORM_INF, d_buf); |
|
|
|
|
GPU_OFF; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|