StridedDynArray

Type Alias StridedDynArray 

Source
pub type StridedDynArray<Item, const NDIM: usize> = Array<StridedBaseArray<VectorContainer<Item>, NDIM>, NDIM>;
Expand description

A basic dynamically allocated array with a given stride.

Aliased Type§

pub struct StridedDynArray<Item, const NDIM: usize>(/* private fields */);

Implementations§

Source§

impl<Item: Copy + Default, const NDIM: usize> StridedDynArray<Item, NDIM>

Source

pub fn from_shape_and_stride( shape: [usize; NDIM], stride: [usize; NDIM], ) -> Self

Create a new heap allocated array from a given shape and stride.

Source§

impl<Item, const NDIM: usize> StridedDynArray<Item, NDIM>
where Item: Copy + Default,

Source

pub fn new_from<ArrayImpl>( stride: [usize; NDIM], arr: &Array<ArrayImpl, NDIM>, ) -> Self
where ArrayImpl: UnsafeRandom1DAccessByValue<Item = Item> + Shape<NDIM>,

Create a new strided array with stride and fill with values from arr.

Source

pub fn row_major_from<ArrayImpl>(arr: &Array<ArrayImpl, NDIM>) -> Self
where ArrayImpl: UnsafeRandom1DAccessByValue<Item = Item> + Shape<NDIM>,

Create a new row-major array from existing array arr.