pub trait GpuMatNDTrait: GpuMatNDTraitConst {
    fn as_raw_mut_GpuMatND(&mut self) -> *mut c_void;

    fn set_flags(&mut self, val: i32) { ... }
    fn set_dims(&mut self, val: i32) { ... }
    fn set_size(&mut self, val: GpuMatND_SizeArray) { ... }
    fn set_step(&mut self, val: GpuMatND_StepArray) { ... }
    fn create(&mut self, size: GpuMatND_SizeArray, typ: i32) -> Result<()> { ... }
    fn release(&mut self) -> Result<()> { ... }
    fn swap(&mut self, m: &mut GpuMatND) { ... }
    fn upload(&mut self, src: &dyn ToInputArray) -> Result<()> { ... }
    fn upload_1(
        &mut self,
        src: &dyn ToInputArray,
        stream: &mut Stream
    ) -> Result<()> { ... } }

Required Methods

Provided Methods

! includes several bit-fields:

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

matrix dimensionality

shape of this array

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

Allocates GPU memory. Suppose there is some GPU memory already allocated. In that case, this method may choose to reuse that GPU memory under the specific condition: it must be of the same size and type, not externally allocated, the GPU memory is continuous(i.e., isContinuous() is true), and is not a sub-matrix of another GpuMatND (i.e., isSubmatrix() is false). In other words, this method guarantees that the GPU memory allocated by this method is always continuous and is not a sub-region of another GpuMatND.

Implementors