Trait GpuMatNDTraitConst

Source
pub trait GpuMatNDTraitConst {
Show 24 methods // Required method fn as_raw_GpuMatND(&self) -> *const c_void; // Provided methods fn flags(&self) -> i32 { ... } fn dims(&self) -> i32 { ... } fn size(&self) -> GpuMatND_SizeArray { ... } fn step(&self) -> GpuMatND_StepArray { ... } fn try_clone(&self) -> Result<GpuMatND> { ... } fn clone(&self, stream: &mut impl StreamTrait) -> Result<GpuMatND> { ... } fn ranges(&self, ranges: &Vector<Range>) -> Result<BoxedRef<'_, GpuMatND>> { ... } fn create_gpu_mat_header( &self, idx: GpuMatND_IndexArray, row_range: impl RangeTrait, col_range: impl RangeTrait, ) -> Result<BoxedRef<'_, GpuMat>> { ... } fn create_gpu_mat_header_1(&self) -> Result<BoxedRef<'_, GpuMat>> { ... } fn rowscols( &self, idx: GpuMatND_IndexArray, row_range: impl RangeTrait, col_range: impl RangeTrait, ) -> Result<BoxedRef<'_, GpuMat>> { ... } fn to_gpu_mat(&self) -> Result<GpuMat> { ... } fn download(&self, dst: &mut impl ToOutputArray) -> Result<()> { ... } fn download_1( &self, dst: &mut impl ToOutputArray, stream: &mut impl StreamTrait, ) -> Result<()> { ... } fn is_continuous(&self) -> Result<bool> { ... } fn is_submatrix(&self) -> Result<bool> { ... } fn elem_size(&self) -> Result<size_t> { ... } fn elem_size1(&self) -> Result<size_t> { ... } fn empty(&self) -> Result<bool> { ... } fn external(&self) -> Result<bool> { ... } fn get_device_ptr(&self) -> Result<*mut u8> { ... } fn total(&self) -> Result<size_t> { ... } fn total_mem_size(&self) -> Result<size_t> { ... } fn typ(&self) -> Result<i32> { ... }
}
Expand description

Constant methods for core::GpuMatND

Required Methods§

Provided Methods§

Source

fn flags(&self) -> i32

! includes several bit-fields:

  • the magic signature
  • continuity flag
  • depth
  • number of channels
Source

fn dims(&self) -> i32

matrix dimensionality

Source

fn size(&self) -> GpuMatND_SizeArray

shape of this array

Source

fn step(&self) -> GpuMatND_StepArray

! step values Their semantics is identical to the semantics of step for Mat.

Source

fn try_clone(&self) -> Result<GpuMatND>

Creates a full copy of the array and the underlying data. The method creates a full copy of the array. It mimics the behavior of Mat::clone(), i.e. the original step is not taken into account. So, the array copy is a continuous array occupying total()*elemSize() bytes.

Source

fn clone(&self, stream: &mut impl StreamTrait) -> Result<GpuMatND>

Creates a full copy of the array and the underlying data. The method creates a full copy of the array. It mimics the behavior of Mat::clone(), i.e. the original step is not taken into account. So, the array copy is a continuous array occupying total()*elemSize() bytes.

§Overloaded parameters

This overload is non-blocking, so it may return even if the copy operation is not finished.

Source

fn ranges(&self, ranges: &Vector<Range>) -> Result<BoxedRef<'_, GpuMatND>>

Extracts a sub-matrix. The operator makes a new header for the specified sub-array of *this. The operator is an O(1) operation, that is, no matrix data is copied.

§Parameters
  • ranges: Array of selected ranges along each dimension.
Source

fn create_gpu_mat_header( &self, idx: GpuMatND_IndexArray, row_range: impl RangeTrait, col_range: impl RangeTrait, ) -> Result<BoxedRef<'_, GpuMat>>

Creates a GpuMat header for a 2D plane part of an n-dim matrix.

Note: The returned GpuMat is constructed with the constructor for user-allocated data. That is, It does not perform reference counting.

Note: This function does not increment this GpuMatND’s reference counter.

Source

fn create_gpu_mat_header_1(&self) -> Result<BoxedRef<'_, GpuMat>>

Creates a GpuMat header for a 2D plane part of an n-dim matrix.

Note: The returned GpuMat is constructed with the constructor for user-allocated data. That is, It does not perform reference counting.

Note: This function does not increment this GpuMatND’s reference counter.

§Overloaded parameters

Creates a GpuMat header if this GpuMatND is effectively 2D.

Note: The returned GpuMat is constructed with the constructor for user-allocated data. That is, It does not perform reference counting.

Note: This function does not increment this GpuMatND’s reference counter.

Source

fn rowscols( &self, idx: GpuMatND_IndexArray, row_range: impl RangeTrait, col_range: impl RangeTrait, ) -> Result<BoxedRef<'_, GpuMat>>

Extracts a 2D plane part of an n-dim matrix. It differs from createGpuMatHeader(IndexArray, Range, Range) in that it clones a part of this GpuMatND to the returned GpuMat.

Note: This operator does not increment this GpuMatND’s reference counter;

Source

fn to_gpu_mat(&self) -> Result<GpuMat>

Extracts a 2D plane part of an n-dim matrix if this GpuMatND is effectively 2D. It differs from createGpuMatHeader() in that it clones a part of this GpuMatND.

Note: This operator does not increment this GpuMatND’s reference counter;

Source

fn download(&self, dst: &mut impl ToOutputArray) -> Result<()>

Source

fn download_1( &self, dst: &mut impl ToOutputArray, stream: &mut impl StreamTrait, ) -> Result<()>

Source

fn is_continuous(&self) -> Result<bool>

returns true iff the GpuMatND data is continuous (i.e. when there are no gaps between successive rows)

Source

fn is_submatrix(&self) -> Result<bool>

returns true if the matrix is a sub-matrix of another matrix

Source

fn elem_size(&self) -> Result<size_t>

returns element size in bytes

Source

fn elem_size1(&self) -> Result<size_t>

returns the size of element channel in bytes

Source

fn empty(&self) -> Result<bool>

returns true if data is null

Source

fn external(&self) -> Result<bool>

returns true if not empty and points to external(user-allocated) gpu memory

Source

fn get_device_ptr(&self) -> Result<*mut u8>

returns pointer to the first byte of the GPU memory

Source

fn total(&self) -> Result<size_t>

returns the total number of array elements

Source

fn total_mem_size(&self) -> Result<size_t>

returns the size of underlying memory in bytes

Source

fn typ(&self) -> Result<i32>

returns element type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§