OpenCV453
|
Class with reference counting wrapping special memory type allocation functions from CUDA. [詳解]
#include <cuda.hpp>
公開型 | |
enum | AllocType { PAGE_LOCKED = 1 , SHARED = 2 , WRITE_COMBINED = 4 } |
公開メンバ関数 | |
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 | |
HostMem & | operator= (const HostMem &m) |
CV_WRAP void | swap (HostMem &b) |
swaps with other smart pointer | |
CV_WRAP HostMem | clone () const |
returns deep copy of the matrix, i.e. the data is copied | |
CV_WRAP 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) |
CV_WRAP HostMem | reshape (int cn, int rows=0) const |
void | release () |
decrements reference counter and released memory if needed. | |
CV_WRAP Mat | createMatHeader () const |
returns matrix header with disabled reference counting for HostMem data. | |
GpuMat | createGpuMatHeader () const |
Maps CPU memory to GPU address space and creates the cuda::GpuMat header without reference counting for it. [詳解] | |
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 |
静的公開メンバ関数 | |
static MatAllocator * | getAllocator (HostMem::AllocType alloc_type=HostMem::AllocType::PAGE_LOCKED) |
公開変数類 | |
int | flags |
int | rows |
int | cols |
CV_PROP size_t | step |
uchar * | data |
int * | refcount |
uchar * | datastart |
const uchar * | dataend |
AllocType | alloc_type |
Class with reference counting wrapping special memory type allocation functions from CUDA.
Its interface is also Mat-like but with additional memory type parameters.
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.
CV_WRAP HostMem cv::cuda::HostMem::reshape | ( | int | cn, |
int | rows = 0 |
||
) | const |
creates alternative HostMem header for the same data, with different number of channels and/or different number of rows