mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #25978 from chacha21:cuda_stdallocator
Adding getStdAllocator() to cv::cuda::GpuMat
This commit is contained in:
commit
9de2ebbec1
@ -118,6 +118,7 @@ public:
|
||||
//! default allocator
|
||||
CV_WRAP static GpuMat::Allocator* defaultAllocator();
|
||||
CV_WRAP static void setDefaultAllocator(GpuMat::Allocator* allocator);
|
||||
CV_WRAP static GpuMat::Allocator* getStdAllocator();
|
||||
|
||||
//! default constructor
|
||||
CV_WRAP explicit GpuMat(GpuMat::Allocator* allocator = GpuMat::defaultAllocator());
|
||||
|
@ -135,6 +135,7 @@ namespace
|
||||
|
||||
DefaultAllocator cudaDefaultAllocator;
|
||||
GpuMat::Allocator* g_defaultAllocator = &cudaDefaultAllocator;
|
||||
GpuMat::Allocator* g_stdAllocator = &cudaDefaultAllocator;
|
||||
}
|
||||
|
||||
GpuMat::Allocator* cv::cuda::GpuMat::defaultAllocator()
|
||||
@ -148,6 +149,12 @@ void cv::cuda::GpuMat::setDefaultAllocator(Allocator* allocator)
|
||||
g_defaultAllocator = allocator;
|
||||
}
|
||||
|
||||
GpuMat::Allocator* cv::cuda::GpuMat::getStdAllocator()
|
||||
{
|
||||
return g_stdAllocator;
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/// create
|
||||
|
||||
|
@ -420,6 +420,11 @@ void cv::cuda::GpuMat::setDefaultAllocator(Allocator* allocator)
|
||||
throw_no_cuda();
|
||||
}
|
||||
|
||||
GpuMat::Allocator* cv::cuda::GpuMat::getStdAllocator()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cv::cuda::GpuMat::create(int _rows, int _cols, int _type)
|
||||
{
|
||||
CV_UNUSED(_rows);
|
||||
|
Loading…
Reference in New Issue
Block a user