Trait ha_ndarray::ops::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>

Object Safety§

This trait is not object safe.

Implementors§

source§

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

§

type Broadcast = View<A, T>

§

type Slice = Slice<A, T>

§

type Transpose = View<A, T>

source§

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

§

type Broadcast = View<A, T>

§

type Slice = Slice<A, T>

§

type Transpose = View<A, T>