[−][src]Struct opencv::core::HostMem
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]
pub fn as_raw_HostMem(&self) -> *const c_void
[src]
pub fn as_raw_mut_HostMem(&mut self) -> *mut c_void
[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]
rows: i32,
cols: i32,
typ: i32,
alloc_type: HostMem_AllocType
) -> Result<HostMem>
C++ default parameters
- alloc_type: HostMem::AllocType::PAGE_LOCKED
pub fn new_2(
size: Size,
typ: i32,
alloc_type: HostMem_AllocType
) -> Result<HostMem>
[src]
size: Size,
typ: i32,
alloc_type: HostMem_AllocType
) -> Result<HostMem>
C++ default parameters
- alloc_type: HostMem::AllocType::PAGE_LOCKED
pub fn new_3(
arr: &dyn ToInputArray,
alloc_type: HostMem_AllocType
) -> Result<HostMem>
[src]
arr: &dyn ToInputArray,
alloc_type: HostMem_AllocType
) -> Result<HostMem>
creates from host memory with coping data
C++ default parameters
- alloc_type: HostMem::AllocType::PAGE_LOCKED
Trait Implementations
impl Boxed for HostMem
[src]
pub unsafe fn from_raw(ptr: *mut c_void) -> Self
[src]
pub fn into_raw(self) -> *mut c_void
[src]
pub fn as_raw(&self) -> *const c_void
[src]
pub fn as_raw_mut(&mut self) -> *mut c_void
[src]
impl Clone for HostMem
[src]
pub fn clone(&self) -> Self
[src]
Calls try_clone() and panics if that fails
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Drop for HostMem
[src]
impl HostMemTrait for HostMem
[src]
pub fn as_raw_HostMem(&self) -> *const c_void
[src]
pub fn as_raw_mut_HostMem(&mut self) -> *mut c_void
[src]
pub fn flags(&self) -> i32
[src]
pub fn set_flags(&mut self, val: i32)
[src]
pub fn rows(&self) -> i32
[src]
pub fn set_rows(&mut self, val: i32)
[src]
pub fn cols(&self) -> i32
[src]
pub fn set_cols(&mut self, val: i32)
[src]
pub fn step(&self) -> size_t
[src]
pub fn set_step(&mut self, val: size_t)
[src]
pub fn data(&mut self) -> &mut u8
[src]
pub fn set_data(&mut self, val: &mut u8)
[src]
pub fn refcount(&mut self) -> &mut i32
[src]
pub fn set_refcount(&mut self, val: &mut i32)
[src]
pub fn datastart(&mut self) -> &mut u8
[src]
pub fn set_datastart(&mut self, val: &mut u8)
[src]
pub fn dataend(&self) -> &u8
[src]
pub fn alloc_type(&self) -> HostMem_AllocType
[src]
pub fn set_alloc_type(&mut self, val: HostMem_AllocType)
[src]
pub fn swap(&mut self, b: &mut HostMem) -> Result<()>
[src]
pub fn try_clone(&self) -> Result<HostMem>
[src]
pub fn create(&mut self, rows: i32, cols: i32, typ: i32) -> Result<()>
[src]
pub fn create_1(&mut self, size: Size, typ: i32) -> Result<()>
[src]
pub fn reshape(&self, cn: i32, rows: i32) -> Result<HostMem>
[src]
pub fn release(&mut self) -> Result<()>
[src]
pub fn create_mat_header(&self) -> Result<Mat>
[src]
pub fn create_gpu_mat_header(&self) -> Result<GpuMat>
[src]
pub fn is_continuous(&self) -> Result<bool>
[src]
pub fn elem_size(&self) -> Result<size_t>
[src]
pub fn elem_size1(&self) -> Result<size_t>
[src]
pub fn typ(&self) -> Result<i32>
[src]
pub fn depth(&self) -> Result<i32>
[src]
pub fn channels(&self) -> Result<i32>
[src]
pub fn step1(&self) -> Result<size_t>
[src]
pub fn size(&self) -> Result<Size>
[src]
pub fn empty(&self) -> Result<bool>
[src]
impl Send for HostMem
[src]
impl ToInputArray for HostMem
[src]
pub fn input_array(&self) -> Result<_InputArray>
[src]
impl<'_> ToInputArray for &'_ HostMem
[src]
pub fn input_array(&self) -> Result<_InputArray>
[src]
impl ToInputOutputArray for HostMem
[src]
pub fn input_output_array(&mut self) -> Result<_InputOutputArray>
[src]
impl<'_> ToInputOutputArray for &'_ mut HostMem
[src]
pub fn input_output_array(&mut self) -> Result<_InputOutputArray>
[src]
impl ToOutputArray for HostMem
[src]
pub fn output_array(&mut self) -> Result<_OutputArray>
[src]
impl<'_> ToOutputArray for &'_ mut HostMem
[src]
pub fn output_array(&mut self) -> Result<_OutputArray>
[src]
Auto Trait Implementations
impl RefUnwindSafe for HostMem
[src]
impl !Sync for HostMem
[src]
impl Unpin for HostMem
[src]
impl UnwindSafe for HostMem
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,