DimLayoutContigAPI

Trait DimLayoutContigAPI 

Source
pub trait DimLayoutContigAPI:
    DimBaseAPI
    + DimShapeAPI
    + DimStrideAPI {
    // Provided methods
    fn new_c_contig(&self, offset: Option<usize>) -> Layout<Self> { ... }
    fn new_f_contig(&self, offset: Option<usize>) -> Layout<Self> { ... }
    fn c(&self) -> Layout<Self> { ... }
    fn f(&self) -> Layout<Self> { ... }
    fn new_contig(
        &self,
        offset: Option<usize>,
        order: FlagOrder,
    ) -> Layout<Self> { ... }
}

Provided Methods§

Source

fn new_c_contig(&self, offset: Option<usize>) -> Layout<Self>

Generate new layout by providing shape and offset; stride fits into c-contiguous.

Source

fn new_f_contig(&self, offset: Option<usize>) -> Layout<Self>

Generate new layout by providing shape and offset; stride fits into f-contiguous.

Source

fn c(&self) -> Layout<Self>

Simplified function to generate c-contiguous layout. See also DimLayoutContigAPI::new_c_contig.

Source

fn f(&self) -> Layout<Self>

Simplified function to generate f-contiguous layout. See also DimLayoutContigAPI::new_f_contig.

Source

fn new_contig(&self, offset: Option<usize>, order: FlagOrder) -> Layout<Self>

Generate new layout by providing shape, offset and order.

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.

Implementations on Foreign Types§

Source§

impl<const N: usize> DimLayoutContigAPI for [usize; N]

Implementors§