Trait collenchyma_blas::plugin::Copy [] [src]

pub trait Copy<F> {
    fn copy(&self, x: &mut SharedTensor<F>, y: &mut SharedTensor<F>) -> Result<(), Error>;
    fn copy_plain(&self, x: &SharedTensor<F>, y: &mut SharedTensor<F>) -> Result<(), Error>;
}

Provides the copy operation.

Required Methods

fn copy(&self, x: &mut SharedTensor<F>, y: &mut SharedTensor<F>) -> Result<(), Error>

Copies x.len() elements of vector x into vector y with complete memory management.

Saves the result to y. This is a Level 1 BLAS operation.

For a no-memory managed version see copy_plain.

fn copy_plain(&self, x: &SharedTensor<F>, y: &mut SharedTensor<F>) -> Result<(), Error>

Copies x.len() elements of vector x into vector y without any memory management.

Saves the result to y. This is a Level 1 BLAS operation.

Attention:
For a correct computation result, you need to manage the memory allocation and synchronization yourself.
For a memory managed version see copy.

Implementors