Commit 7e3c69c8 authored by Alexey Spizhevoy's avatar Alexey Spizhevoy

added GPU memory allocation performance test

parent 72b0ec90
...@@ -132,3 +132,24 @@ TEST(cornerHarris) ...@@ -132,3 +132,24 @@ TEST(cornerHarris)
GPU_OFF; GPU_OFF;
} }
} }
TEST(memoryAllocation)
{
Mat mat;
gpu::GpuMat d_mat;
int begin = 100, end = 8000, step = 100;
DESCRIPTION << "32F matrices from " << begin << " to " << end;
CPU_ON;
for (int size = begin; size <= end; size += step)
mat.create(size, size, CV_32FC1);
CPU_OFF;
GPU_ON;
for (int size = begin; size <= end; size += step)
d_mat.create(size, size, CV_32FC1);
GPU_OFF;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment