cv::cuda::HostMem Class ReferenceCUDA-accelerated Computer Vision » Core part » Data Structures
Class with reference counting wrapping special memory type allocation functions from CUDA. More...
#include <opencv2/core/cuda.hpp>
Class with reference counting wrapping special memory type allocation functions from CUDA. More...
#include <opencv2/core/cuda.hpp>
Public Types | |
| enum | AllocType { PAGE_LOCKED = 1 , SHARED = 2 , WRITE_COMBINED = 4 } |
Public Member Functions | |
| HostMem (const HostMem &m) | |
| HostMem (HostMem::AllocType alloc_type=HostMem::AllocType::PAGE_LOCKED) | |
| HostMem (InputArray arr, HostMem::AllocType alloc_type=HostMem::AllocType::PAGE_LOCKED) | |
| creates from host memory with coping data | |
| HostMem (int rows, int cols, int type, HostMem::AllocType alloc_type=HostMem::AllocType::PAGE_LOCKED) | |
| HostMem (Size size, int type, HostMem::AllocType alloc_type=HostMem::AllocType::PAGE_LOCKED) | |
| ~HostMem () | |
| int | channels () const |
| HostMem | clone () const |
| returns deep copy of the matrix, i.e. the data is copied | |
| void | create (int rows, int cols, int type) |
| allocates new matrix data unless the matrix already has specified size and type. | |
| void | create (Size size, int type) |
| GpuMat | createGpuMatHeader () const |
| Maps CPU memory to GPU address space and creates the cuda::GpuMat header without reference counting for it. | |
| Mat | createMatHeader () const |
| returns matrix header with disabled reference counting for HostMem data. | |
| int | depth () const |
| size_t | elemSize () const |
| size_t | elemSize1 () const |
| bool | empty () const |
| bool | isContinuous () const |
| HostMem & | operator= (const HostMem &m) |
| void | release () |
| decrements reference counter and released memory if needed. | |
| HostMem | reshape (int cn, int rows=0) const |
| Size | size () const |
| size_t | step1 () const |
| void | swap (HostMem &b) |
| swaps with other smart pointer | |
| int | type () const |
Static Public Member Functions | |
| static MatAllocator * | getAllocator (HostMem::AllocType alloc_type=HostMem::AllocType::PAGE_LOCKED) |
Class with reference counting wrapping special memory type allocation functions from CUDA.
Its interface is also Mat-like but with additional memory type parameters.
| Enumerator | |
|---|---|
| PAGE_LOCKED | |
| SHARED | |
| WRITE_COMBINED | |
| explicit |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem( | [, alloc_type] | ) -> | <cuda_HostMem object> | |
| cv.cuda.HostMem( | rows, cols, type[, alloc_type] | ) -> | <cuda_HostMem object> | |
| cv.cuda.HostMem( | size, type[, alloc_type] | ) -> | <cuda_HostMem object> | |
| cv::cuda::HostMem::HostMem | ( | const HostMem & | m | ) |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem( | [, alloc_type] | ) -> | <cuda_HostMem object> | |
| cv.cuda.HostMem( | rows, cols, type[, alloc_type] | ) -> | <cuda_HostMem object> | |
| cv.cuda.HostMem( | size, type[, alloc_type] | ) -> | <cuda_HostMem object> | |
| cv.cuda.HostMem( | arr[, alloc_type] | ) -> | <cuda_HostMem object> |
| cv::cuda::HostMem::HostMem | ( | int | rows, |
| int | cols, | ||
| int | type, | ||
| HostMem::AllocType | alloc_type = HostMem::AllocType::PAGE_LOCKED ) |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem( | [, alloc_type] | ) -> | <cuda_HostMem object> | |
| cv.cuda.HostMem( | rows, cols, type[, alloc_type] | ) -> | <cuda_HostMem object> | |
| cv.cuda.HostMem( | size, type[, alloc_type] | ) -> |
| cv::cuda::HostMem::HostMem | ( | Size | size, |
| int | type, | ||
| HostMem::AllocType | alloc_type = HostMem::AllocType::PAGE_LOCKED ) |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem( | [, alloc_type] | ) -> | <cuda_HostMem object> | |
| cv.cuda.HostMem( | rows, cols, type[, alloc_type] | ) -> | <cuda_HostMem object> | |
| cv.cuda.HostMem( | size, type[, alloc_type] | ) -> |
| explicit |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem( | [, alloc_type] | ) -> | <cuda_HostMem object> | |
| cv.cuda.HostMem( | rows, cols, type[, alloc_type] | ) -> | <cuda_HostMem object> | |
| cv.cuda.HostMem( | size, type[, alloc_type] | ) -> |
creates from host memory with coping data
| cv::cuda::HostMem::~HostMem | ( | ) |
| int cv::cuda::HostMem::channels | ( | ) | const |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem.channels( | ) -> | retval |
| HostMem cv::cuda::HostMem::clone | ( | ) | const |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem.clone( | ) -> | retval |
returns deep copy of the matrix, i.e. the data is copied
| void cv::cuda::HostMem::create | ( | int | rows, |
| int | cols, | ||
| int | type ) |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem.create( | rows, cols, type | ) -> | None |
allocates new matrix data unless the matrix already has specified size and type.
| void cv::cuda::HostMem::create | ( | Size | size, |
| int | type ) |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem.create( | rows, cols, type | ) -> | None |
| GpuMat cv::cuda::HostMem::createGpuMatHeader | ( | ) | const |
Maps CPU memory to GPU address space and creates the cuda::GpuMat header without reference counting for it.
This can be done only if memory was allocated with the SHARED flag and if it is supported by the hardware. Laptops often share video and CPU memory, so address spaces can be mapped, which eliminates an extra copy.
| int cv::cuda::HostMem::depth | ( | ) | const |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem.depth( | ) -> | retval |
| size_t cv::cuda::HostMem::elemSize | ( | ) | const |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem.elemSize( | ) -> | retval |
| size_t cv::cuda::HostMem::elemSize1 | ( | ) | const |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem.elemSize1( | ) -> | retval |
| bool cv::cuda::HostMem::empty | ( | ) | const |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem.empty( | ) -> | retval |
| static |
| bool cv::cuda::HostMem::isContinuous | ( | ) | const |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem.isContinuous( | ) -> | retval |
| void cv::cuda::HostMem::release | ( | ) |
decrements reference counter and released memory if needed.
| Size cv::cuda::HostMem::size | ( | ) | const |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem.size( | ) -> | retval |
| size_t cv::cuda::HostMem::step1 | ( | ) | const |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem.step1( | ) -> | retval |
| void cv::cuda::HostMem::swap | ( | HostMem & | b | ) |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem.swap( | b | ) -> | None |
swaps with other smart pointer
| int cv::cuda::HostMem::type | ( | ) | const |
| Python: | ||||
|---|---|---|---|---|
| cv.cuda.HostMem.type( | ) -> | retval |
| AllocType cv::cuda::HostMem::alloc_type |
| int cv::cuda::HostMem::cols |
| uchar* cv::cuda::HostMem::data |
| const uchar* cv::cuda::HostMem::dataend |
| uchar* cv::cuda::HostMem::datastart |
| int cv::cuda::HostMem::flags |
| int* cv::cuda::HostMem::refcount |
| int cv::cuda::HostMem::rows |
| size_t cv::cuda::HostMem::step |
| cv.cuda.HostMem( |
| arr[, alloc_type] |
| ) -> |
| <cuda_HostMem object> |
| <cuda_HostMem object> |
| cv.cuda.HostMem( | arr[, alloc_type] | ) -> | <cuda_HostMem object> |
| <cuda_HostMem object> |
| cv.cuda.HostMem( | arr[, alloc_type] | ) -> | <cuda_HostMem object> |
| <cuda_HostMem object> |
| cv.cuda.HostMem( | arr[, alloc_type] | ) -> | <cuda_HostMem object> |