pub type MatUninitMut<'a, T, Rows = usize, Cols = usize, RStride = isize, CStride = isize> = Mat<UninitMut<'a, T, Rows, Cols, RStride, CStride>>;Expand description
mutable view over a matrix whose elements may be uninitialized.
Unlike MatMut, this type does not expose element references. It is
intended for APIs that overwrite every logical destination element before
the storage is converted into an initialized matrix. The only operations
available on this type are metadata queries and raw-pointer access for
write-only kernels.
Aliased Type§
#[repr(transparent)]pub struct MatUninitMut<'a, T, Rows = usize, Cols = usize, RStride = isize, CStride = isize>(/* private fields */);Implementations§
Source§impl<'a, T, Rows: Shape, Cols: Shape, RStride: Stride, CStride: Stride> MatUninitMut<'a, T, Rows, Cols, RStride, CStride>
impl<'a, T, Rows: Shape, Cols: Shape, RStride: Stride, CStride: Stride> MatUninitMut<'a, T, Rows, Cols, RStride, CStride>
Sourcepub const unsafe fn from_raw_parts_mut(
ptr: *mut MaybeUninit<T>,
nrows: Rows,
ncols: Cols,
row_stride: RStride,
col_stride: CStride,
) -> Self
pub const unsafe fn from_raw_parts_mut( ptr: *mut MaybeUninit<T>, nrows: Rows, ncols: Cols, row_stride: RStride, col_stride: CStride, ) -> Self
creates a write-only matrix view from a raw pointer.
§safety
the pointed-to memory must contain the complete matrix described by the
dimensions and strides, be properly aligned for MaybeUninit<T>, and
remain exclusively borrowed for 'a. Matrix elements must not overlap
each other. Unlike [MatMut::from_raw_parts_mut], the elements do not
need to be initialized.
Sourcepub fn as_ptr_mut(&self) -> *mut MaybeUninit<T>
pub fn as_ptr_mut(&self) -> *mut MaybeUninit<T>
returns the raw pointer to the first matrix element.
Sourcepub fn row_stride(&self) -> RStride
pub fn row_stride(&self) -> RStride
returns the row stride in elements.
Sourcepub fn col_stride(&self) -> CStride
pub fn col_stride(&self) -> CStride
returns the column stride in elements.
Source§impl<'a, T, Rows: Shape, Cols: Shape> MatUninitMut<'a, T, Rows, Cols, isize, isize>
impl<'a, T, Rows: Shape, Cols: Shape> MatUninitMut<'a, T, Rows, Cols, isize, isize>
Sourcepub fn from_column_major_slice_mut(
slice: &'a mut [MaybeUninit<T>],
nrows: Rows,
ncols: Cols,
) -> Self
pub fn from_column_major_slice_mut( slice: &'a mut [MaybeUninit<T>], nrows: Rows, ncols: Cols, ) -> Self
creates a column-major write-only view over a MaybeUninit slice.
Sourcepub fn from_row_major_slice_mut(
slice: &'a mut [MaybeUninit<T>],
nrows: Rows,
ncols: Cols,
) -> Self
pub fn from_row_major_slice_mut( slice: &'a mut [MaybeUninit<T>], nrows: Rows, ncols: Cols, ) -> Self
creates a row-major write-only view over a MaybeUninit slice.