Trait collenchyma_blas::plugin::Axpy
[−]
[src]
pub trait Axpy<F> { fn axpy(&self, a: &mut SharedTensor<F>, x: &mut SharedTensor<F>, y: &mut SharedTensor<F>) -> Result<(), Error>; fn axpy_plain(&self, a: &SharedTensor<F>, x: &SharedTensor<F>, y: &mut SharedTensor<F>) -> Result<(), Error>; }
Provides the axpy operation.
Required Methods
fn axpy(&self, a: &mut SharedTensor<F>, x: &mut SharedTensor<F>, y: &mut SharedTensor<F>) -> Result<(), Error>
Computes a vector x
times a constant a
plus a vector y
aka. a * x + y
with complete memory management.
Saves the resulting vector back into y
.
This is a Level 1 BLAS operation.
For a no-memory managed version see axpy_plain
.
fn axpy_plain(&self, a: &SharedTensor<F>, x: &SharedTensor<F>, y: &mut SharedTensor<F>) -> Result<(), Error>
Computes a vector x
times a constant a
plus a vector y
aka. a * x + y
without any memory management.
Saves the resulting vector back into 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 axpy
.