added GPU memory allocation performance test
This commit is contained in:
parent
72b0ec90b9
commit
7e3c69c82f
@ -131,4 +131,25 @@ TEST(cornerHarris)
|
|||||||
gpu::cornerHarris(d_src, d_dst, 5, 7, 0.1);
|
gpu::cornerHarris(d_src, d_dst, 5, 7, 0.1);
|
||||||
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;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user