Trait Transform

Source
pub trait Transform<A: Access<T>, T: CType>: PlatformInstance {
    type Broadcast: ReadOp<Self, T>;
    type Slice: ReadOp<Self, T>;
    type Transpose: ReadOp<Self, T>;

    // Required methods
    fn broadcast(
        self,
        access: A,
        shape: Shape,
        broadcast: Shape,
    ) -> Result<AccessOp<Self::Broadcast, Self>, Error>;
    fn slice(
        self,
        access: A,
        shape: &[usize],
        range: Range,
    ) -> Result<AccessOp<Self::Slice, Self>, Error>;
    fn transpose(
        self,
        access: A,
        shape: Shape,
        permutation: Axes,
    ) -> Result<AccessOp<Self::Transpose, Self>, Error>;
}

Required Associated Types§

Source

type Broadcast: ReadOp<Self, T>

Source

type Slice: ReadOp<Self, T>

Source

type Transpose: ReadOp<Self, T>

Required Methods§

Source

fn broadcast( self, access: A, shape: Shape, broadcast: Shape, ) -> Result<AccessOp<Self::Broadcast, Self>, Error>

Source

fn slice( self, access: A, shape: &[usize], range: Range, ) -> Result<AccessOp<Self::Slice, Self>, Error>

Source

fn transpose( self, access: A, shape: Shape, permutation: Axes, ) -> Result<AccessOp<Self::Transpose, Self>, Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'a, A, T> Transform<A, T> for Host
where A: Access<T>, T: CType,

Source§

type Broadcast = View<A, T>

Source§

type Slice = Slice<A, T>

Source§

type Transpose = View<A, T>

Source§

impl<A: Access<T>, T: CType> Transform<A, T> for Platform

Source§

type Broadcast = View<A, T>

Source§

type Slice = Slice<A, T>

Source§

type Transpose = View<A, T>