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

pub struct HostMem { /* fields omitted */ }

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

impl HostMem[src]

impl HostMem[src]

pub fn new(alloc_type: HostMem_AllocType) -> Result<HostMem>[src]

C++ default parameters

  • alloc_type: HostMem::AllocType::PAGE_LOCKED

pub fn copy(m: &HostMem) -> Result<HostMem>[src]

pub fn new_1(
    rows: i32,
    cols: i32,
    typ: i32,
    alloc_type: HostMem_AllocType
) -> Result<HostMem>
[src]

C++ default parameters

  • alloc_type: HostMem::AllocType::PAGE_LOCKED

pub fn new_2(
    size: Size,
    typ: i32,
    alloc_type: HostMem_AllocType
) -> Result<HostMem>
[src]

C++ default parameters

  • alloc_type: HostMem::AllocType::PAGE_LOCKED

pub fn new_3(
    arr: &dyn ToInputArray,
    alloc_type: HostMem_AllocType
) -> Result<HostMem>
[src]

creates from host memory with coping data

C++ default parameters

  • alloc_type: HostMem::AllocType::PAGE_LOCKED

Trait Implementations

impl Boxed for HostMem[src]

impl Clone for HostMem[src]

pub fn clone(&self) -> Self[src]

Calls try_clone() and panics if that fails

impl Drop for HostMem[src]

impl HostMemTrait for HostMem[src]

impl Send for HostMem[src]

impl ToInputArray for HostMem[src]

impl<'_> ToInputArray for &'_ HostMem[src]

impl ToInputOutputArray for HostMem[src]

impl<'_> ToInputOutputArray for &'_ mut HostMem[src]

impl ToOutputArray for HostMem[src]

impl<'_> ToOutputArray for &'_ mut HostMem[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.