now Allocator accepts GpuMat* instead of 3 pointers

This commit is contained in:
Vladislav Vinogradov
2013-10-08 16:17:41 +04:00
parent 3b412b51ac
commit 342e007dc6
4 changed files with 28 additions and 29 deletions

View File

@@ -66,8 +66,9 @@ public:
public:
virtual ~Allocator() {}
virtual bool allocate(uchar** devPtr, size_t* step, int** refcount, int rows, int cols, size_t elemSize) = 0;
virtual void free(uchar* devPtr, int* refcount) = 0;
// allocator must fill data, step and refcount fields
virtual bool allocate(GpuMat* mat, int rows, int cols, size_t elemSize) = 0;
virtual void free(GpuMat* mat) = 0;
};
//! default allocator

View File

@@ -98,8 +98,8 @@ namespace cv { namespace cuda
explicit StackAllocator(cudaStream_t stream);
~StackAllocator();
bool allocate(uchar** devPtr, size_t* step, int** refcount, int rows, int cols, size_t elemSize);
void free(uchar* devPtr, int* refcount);
bool allocate(GpuMat* mat, int rows, int cols, size_t elemSize);
void free(GpuMat* mat);
private:
StackAllocator(const StackAllocator&);