Trait rten_tensor::IntoLayout
source · pub trait IntoLayout: AsRef<[usize]> {
type Layout: MutLayout;
// Required method
fn into_layout(self) -> Self::Layout;
}Expand description
Trait for shapes which can be used to create a contiguous layout.
This is implemented for [usize; N] for creating static-rank layouts from
arrays, and &[usize] for creating dynamic-rank layouts from slices.
Required Associated Types§
Required Methods§
sourcefn into_layout(self) -> Self::Layout
fn into_layout(self) -> Self::Layout
Convert this shape into a contiguous layout.