Class with reference counting wrapping special memory type allocation functions from CUDA.
More...
|
CV_WRAP | HostMem (HostMem::AllocType alloc_type=HostMem::AllocType::PAGE_LOCKED) |
|
| HostMem (const HostMem &m) |
|
CV_WRAP | HostMem (int rows, int cols, int type, HostMem::AllocType alloc_type=HostMem::AllocType::PAGE_LOCKED) |
|
CV_WRAP | HostMem (Size size, int type, HostMem::AllocType alloc_type=HostMem::AllocType::PAGE_LOCKED) |
|
CV_WRAP | HostMem (InputArray arr, HostMem::AllocType alloc_type=HostMem::AllocType::PAGE_LOCKED) |
| creates from host memory with coping data More...
|
|
| ~HostMem () |
|
HostMem & | operator= (const HostMem &m) |
|
CV_WRAP void | swap (HostMem &b) |
| swaps with other smart pointer More...
|
|
CV_WRAP HostMem | clone () const |
| returns deep copy of the matrix, i.e. the data is copied More...
|
|
CV_WRAP void | create (int rows, int cols, int type) |
| allocates new matrix data unless the matrix already has specified size and type. More...
|
|
void | create (Size size, int type) |
|
CV_WRAP HostMem | reshape (int cn, int rows=0) const |
|
void | release () |
| decrements reference counter and released memory if needed. More...
|
|
CV_WRAP Mat | createMatHeader () const |
| returns matrix header with disabled reference counting for HostMem data. More...
|
|
GpuMat | createGpuMatHeader () const |
| Maps CPU memory to GPU address space and creates the cuda::GpuMat header without reference counting for it. More...
|
|
CV_WRAP bool | isContinuous () const |
|
CV_WRAP size_t | elemSize () const |
|
CV_WRAP size_t | elemSize1 () const |
|
CV_WRAP int | type () const |
|
CV_WRAP int | depth () const |
|
CV_WRAP int | channels () const |
|
CV_WRAP size_t | step1 () const |
|
CV_WRAP Size | size () const |
|
CV_WRAP bool | empty () const |
|
Class with reference counting wrapping special memory type allocation functions from CUDA.
Its interface is also Mat-like but with additional memory type parameters.
- PAGE_LOCKED sets a page locked memory type used commonly for fast and asynchronous uploading/downloading data from/to GPU.
- SHARED specifies a zero copy memory allocation that enables mapping the host memory to GPU address space, if supported.
- WRITE_COMBINED sets the write combined buffer that is not cached by CPU. Such buffers are used to supply GPU with data when GPU only reads it. The advantage is a better CPU cache utilization.
- Note
- Allocation size of such memory types is usually limited. For more details, see CUDA 2.2 Pinned Memory APIs document or CUDA C Programming Guide.