Skip to main content

StrideVec

Type Alias StrideVec 

Source
pub type StrideVec = TinyVec<[isize; 8]>;
Expand description

Stride metadata with inline storage for up to INLINE_RANK dimensions.

Returned by view::col_major_strides and view::row_major_strides, so a computed layout at rank <= INLINE_RANK does not allocate.

§Examples

use strided_view::StrideVec;

let strides: StrideVec = [1isize, 2, 4].into_iter().collect();
assert_eq!(&strides[..], &[1, 2, 4]);

Aliased Type§

pub enum StrideVec {
    Inline(ArrayVec<[isize; 8]>),
    Heap(Vec<isize>),
}

Variants§

§

Inline(ArrayVec<[isize; 8]>)

§

Heap(Vec<isize>)