added buffered version of norm, updated performance sample and docs

This commit is contained in:
Alexey Spizhevoy
2011-02-01 10:46:19 +00:00
parent 3795142604
commit 16e74ab306
4 changed files with 32 additions and 11 deletions

View File

@@ -198,22 +198,24 @@ TEST(integral)
TEST(norm)
{
Mat src;
gpu::GpuMat d_src;
gpu::GpuMat d_src, d_buf;
for (int size = 1000; size <= 8000; size *= 2)
{
SUBTEST << "size " << size << ", 8U";
SUBTEST << "size " << size << ", 32F";
gen(src, size, size, CV_8U, 0, 256);
gen(src, size, size, CV_32F, 0, 1);
CPU_ON;
norm(src);
for (int i = 0; i < 10; ++i)
norm(src, NORM_L2);
CPU_OFF;
d_src = src;
GPU_ON;
gpu::norm(d_src);
for (int i = 0; i < 10; ++i)
gpu::norm(d_src, NORM_L2, d_buf);
GPU_OFF;
}
}