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

pub unsafe trait NumElements<T> {
    type Output: Unsigned + ArrayLength<T>;
    fn num_elements() -> usize { ... }
}

Marker trait implemented on static shapes that provides a type-level number of elements and its runtime counterpart.

This is only useful for tensors stored on the stack that require the number of elements to be known at compile time.

Associated Types

Loading content...

Provided methods

Loading content...

Implementations on Foreign Types

impl<T> NumElements<T> for ATerm[src]

type Output = U1

impl<T, S, A> NumElements<T> for TArr<S, A> where
    A: NumElements<T>,
    S: StaticDim + Mul<<A as NumElements<T>>::Output>,
    Prod<S, <A as NumElements<T>>::Output>: Unsigned + ArrayLength<T>, 
[src]

type Output = Prod<S, <A as NumElements<T>>::Output>

Loading content...

Implementors

Loading content...