pub enum MemoryLayout {
C,
Fortran,
Custom,
}Expand description
Describes the memory layout of an N-dimensional array.
Variants§
C
Row-major (C-style) contiguous layout.
Fortran
Column-major (Fortran-style) contiguous layout.
Custom
Non-contiguous or custom stride layout.
Implementations§
Source§impl MemoryLayout
impl MemoryLayout
Sourcepub fn is_c_contiguous(self) -> bool
pub fn is_c_contiguous(self) -> bool
Returns true if the layout is C-contiguous (row-major).
Sourcepub fn is_f_contiguous(self) -> bool
pub fn is_f_contiguous(self) -> bool
Returns true if the layout is Fortran-contiguous (column-major).
Trait Implementations§
Source§impl Clone for MemoryLayout
impl Clone for MemoryLayout
Source§fn clone(&self) -> MemoryLayout
fn clone(&self) -> MemoryLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MemoryLayout
impl Debug for MemoryLayout
Source§impl Display for MemoryLayout
impl Display for MemoryLayout
Source§impl Hash for MemoryLayout
impl Hash for MemoryLayout
Source§impl PartialEq for MemoryLayout
impl PartialEq for MemoryLayout
impl Copy for MemoryLayout
impl Eq for MemoryLayout
impl StructuralPartialEq for MemoryLayout
Auto Trait Implementations§
impl Freeze for MemoryLayout
impl RefUnwindSafe for MemoryLayout
impl Send for MemoryLayout
impl Sync for MemoryLayout
impl Unpin for MemoryLayout
impl UnsafeUnpin for MemoryLayout
impl UnwindSafe for MemoryLayout
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more