Struct opencv::core::HostMem[][src]

pub struct HostMem { /* fields omitted */ }
Expand description

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.

Implementations

C++ default parameters
  • alloc_type: HostMem::AllocType::PAGE_LOCKED
C++ default parameters
  • alloc_type: HostMem::AllocType::PAGE_LOCKED
C++ default parameters
  • alloc_type: HostMem::AllocType::PAGE_LOCKED

creates from host memory with coping data

C++ default parameters
  • alloc_type: HostMem::AllocType::PAGE_LOCKED

Trait Implementations

Wrap the specified raw pointer Read more

Return an the underlying raw pointer while consuming this wrapper. Read more

Return the underlying raw pointer. Read more

Return the underlying mutable raw pointer Read more

Calls try_clone() and panics if that fails

Performs copy-assignment from source. Read more

Executes the destructor for this type. Read more

swaps with other smart pointer

allocates new matrix data unless the matrix already has specified size and type.

decrements reference counter and released memory if needed.

returns deep copy of the matrix, i.e. the data is copied

creates alternative HostMem header for the same data, with different number of channels and/or different number of rows Read more

returns matrix header with disabled reference counting for HostMem data.

Maps CPU memory to GPU address space and creates the cuda::GpuMat header without reference counting for it. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.