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 new_contig(&self, offset: Option<usize>) -> Layout<Self> { ... }
    fn c(&self) -> Layout<Self> { ... }
    fn f(&self) -> 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 new_contig(&self, offset: Option<usize>) -> Layout<Self>

Generate new layout by providing shape and offset; Whether c-contiguous or f-contiguous depends on cargo feature f_prefer.

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.

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.

Implementors§