Trait dfdx::tensor::CopySlice

source ·
pub trait CopySlice<E>: Storage<E> {
    // Required methods
    fn copy_from<S: Shape, T>(dst: &mut Tensor<S, E, Self, T>, src: &[E]);
    fn copy_into<S: Shape, T>(src: &Tensor<S, E, Self, T>, dst: &mut [E]);
}
Expand description

Enables copying data into and out of tensors

Required Methods§

source

fn copy_from<S: Shape, T>(dst: &mut Tensor<S, E, Self, T>, src: &[E])

source

fn copy_into<S: Shape, T>(src: &Tensor<S, E, Self, T>, dst: &mut [E])

Implementors§

source§

impl<E: Unit> CopySlice<E> for Cpu

source§

impl<E: Unit> CopySlice<E> for Cuda