Trait ReshapeArgs

Source
pub trait ReshapeArgs<const D2: usize> {
    // Required method
    fn into_shape<B, const D: usize, K>(self, tensor: &Tensor<B, D, K>) -> Shape
       where B: Backend,
             K: BasicOps<B>;
}
Expand description

Trait used for reshape arguments.

Required Methods§

Source

fn into_shape<B, const D: usize, K>(self, tensor: &Tensor<B, D, K>) -> Shape
where B: Backend, K: BasicOps<B>,

Converts to a shape.

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.

Implementations on Foreign Types§

Source§

impl<const D2: usize> ReshapeArgs<D2> for [i32; D2]

Source§

fn into_shape<B, const D: usize, K>(self, tensor: &Tensor<B, D, K>) -> Shape
where B: Backend, K: BasicOps<B>,

Source§

impl<const D2: usize> ReshapeArgs<D2> for [usize; D2]

Source§

fn into_shape<B, const D: usize, K>(self, tensor: &Tensor<B, D, K>) -> Shape
where B: Backend, K: BasicOps<B>,

Implementors§

Source§

impl<const D2: usize> ReshapeArgs<D2> for Shape