[][src]Trait melange::tensor::shape::StaticShape

pub unsafe trait StaticShape: Shape {
    const NUM_ELEMENTS: usize;

    fn to_vec() -> Vec<usize>;
fn strides() -> Vec<usize>; }

Marker trait implemented on shapes containing type-level unsigned integers only. Provides means of conversion for runtime use.

Associated Constants

const NUM_ELEMENTS: usize

Number of elements in the tensor, i.e. product of all dimensions of the shape.

Loading content...

Required methods

fn to_vec() -> Vec<usize>

Outputs a Vec containing the runtime version of the shape.

fn strides() -> Vec<usize>

Outputs a Vec containing the intrinsic strides of the shape. Note that these strides do not account for the real layout.

Loading content...

Implementations on Foreign Types

impl StaticShape for ATerm[src]

impl<D, A> StaticShape for TArr<D, A> where
    A: StaticShape,
    D: StaticDim
[src]

Loading content...

Implementors

Loading content...