Trait collenchyma_blas::plugin::Swap
[−]
[src]
pub trait Swap<F> {
fn swap(&self, x: &mut SharedTensor<F>, y: &mut SharedTensor<F>) -> Result<(), Error>;
fn swap_plain(&self, x: &mut SharedTensor<F>, y: &mut SharedTensor<F>) -> Result<(), Error>;
}Provides the swap operation.
Required Methods
fn swap(&self, x: &mut SharedTensor<F>, y: &mut SharedTensor<F>) -> Result<(), Error>
Swaps the content of vector x and vector y with complete memory management.
Saves the resulting vector back into x.
This is a Level 1 BLAS operation.
For a no-memory managed version see swap_plain.
fn swap_plain(&self, x: &mut SharedTensor<F>, y: &mut SharedTensor<F>) -> Result<(), Error>
Swaps the content of vector x and vector y without any memory management.
Saves the resulting vector back into x.
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 swap.