Trait coaster_blas::plugin::Swap

source ·
pub trait Swap<F> {
    // Required method
    fn swap(
        &self,
        x: &mut SharedTensor<F>,
        y: &mut SharedTensor<F>
    ) -> Result<(), Error>;
}
Expand description

Provides the swap operation.

Required Methods§

source

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.

Implementations on Foreign Types§

source§

impl Swap<f32> for Backend<Cuda>

source§

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

source§

impl Swap<f32> for Backend<Native>

source§

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

source§

impl Swap<f64> for Backend<Native>

source§

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

Implementors§