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§
fn as_raw_GpuMatND(&self) -> *const c_void
Provided Methods§
Sourcefn flags(&self) -> i32
fn flags(&self) -> i32
! includes several bit-fields:
- the magic signature
- continuity flag
- depth
- number of channels
Sourcefn size(&self) -> GpuMatND_SizeArray
fn size(&self) -> GpuMatND_SizeArray
shape of this array
Sourcefn step(&self) -> GpuMatND_StepArray
fn step(&self) -> GpuMatND_StepArray
! step values Their semantics is identical to the semantics of step for Mat.
Sourcefn try_clone(&self) -> Result<GpuMatND>
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.
Sourcefn clone(&self, stream: &mut impl StreamTrait) -> Result<GpuMatND>
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.
Sourcefn ranges(&self, ranges: &Vector<Range>) -> Result<BoxedRef<'_, GpuMatND>>
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.
Sourcefn create_gpu_mat_header(
&self,
idx: GpuMatND_IndexArray,
row_range: impl RangeTrait,
col_range: impl RangeTrait,
) -> Result<BoxedRef<'_, GpuMat>>
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.
Sourcefn create_gpu_mat_header_1(&self) -> Result<BoxedRef<'_, GpuMat>>
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.
Sourcefn rowscols(
&self,
idx: GpuMatND_IndexArray,
row_range: impl RangeTrait,
col_range: impl RangeTrait,
) -> Result<BoxedRef<'_, GpuMat>>
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;
Sourcefn to_gpu_mat(&self) -> Result<GpuMat>
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;
fn download(&self, dst: &mut impl ToOutputArray) -> Result<()>
fn download_1( &self, dst: &mut impl ToOutputArray, stream: &mut impl StreamTrait, ) -> Result<()>
Sourcefn is_continuous(&self) -> Result<bool>
fn is_continuous(&self) -> Result<bool>
returns true iff the GpuMatND data is continuous (i.e. when there are no gaps between successive rows)
Sourcefn is_submatrix(&self) -> Result<bool>
fn is_submatrix(&self) -> Result<bool>
returns true if the matrix is a sub-matrix of another matrix
Sourcefn elem_size1(&self) -> Result<size_t>
fn elem_size1(&self) -> Result<size_t>
returns the size of element channel in bytes
Sourcefn external(&self) -> Result<bool>
fn external(&self) -> Result<bool>
returns true if not empty and points to external(user-allocated) gpu memory
Sourcefn get_device_ptr(&self) -> Result<*mut u8>
fn get_device_ptr(&self) -> Result<*mut u8>
returns pointer to the first byte of the GPU memory
Sourcefn total_mem_size(&self) -> Result<size_t>
fn total_mem_size(&self) -> Result<size_t>
returns the size of underlying memory in bytes
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.