added ensureSizeIsEnough into gpu module, updated reduction methods
This commit is contained in:
@@ -252,9 +252,13 @@ namespace cv
|
||||
#include "GpuMat_BetaDeprecated.hpp"
|
||||
#endif
|
||||
|
||||
//! creates continuous GPU matrix
|
||||
//! Creates continuous GPU matrix
|
||||
CV_EXPORTS void createContinuous(int rows, int cols, int type, GpuMat& m);
|
||||
|
||||
//! Ensures that size of the given matrix is not less than (rows, cols) size
|
||||
//! and matrix type is match specified one too
|
||||
CV_EXPORTS void ensureSizeIsEnough(int rows, int cols, int type, GpuMat& m);
|
||||
|
||||
//////////////////////////////// CudaMem ////////////////////////////////
|
||||
// CudaMem is limited cv::Mat with page locked memory allocation.
|
||||
// Page locked memory is only needed for async and faster coping to GPU.
|
||||
|
@@ -364,6 +364,10 @@ inline GpuMat createContinuous(Size size, int type)
|
||||
return m;
|
||||
}
|
||||
|
||||
inline void ensureSizeIsEnough(Size size, int type, GpuMat& m)
|
||||
{
|
||||
ensureSizeIsEnough(size.height, size.width, type, m);
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
@@ -401,6 +405,7 @@ inline CudaMem::CudaMem(const Mat& m, int _alloc_type) : flags(0), rows(0), cols
|
||||
inline CudaMem::~CudaMem()
|
||||
{
|
||||
release();
|
||||
|
||||
}
|
||||
|
||||
inline CudaMem& CudaMem::operator = (const CudaMem& m)
|
||||
|
Reference in New Issue
Block a user