added ensureSizeIsEnough into gpu module, updated reduction methods

This commit is contained in:
Alexey Spizhevoy
2011-01-18 12:36:01 +00:00
parent f3a2656808
commit cbb132ccb1
6 changed files with 151 additions and 115 deletions

View File

@@ -551,6 +551,13 @@ void cv::gpu::createContinuous(int rows, int cols, int type, GpuMat& m)
m = m.reshape(0, rows);
}
void cv::gpu::ensureSizeIsEnough(int rows, int cols, int type, GpuMat& m)
{
if (m.type() == type && m.rows >= rows && m.cols >= cols)
return;
m.create(rows, cols, type);
}
///////////////////////////////////////////////////////////////////////
//////////////////////////////// CudaMem //////////////////////////////