Trait collenchyma_blas::plugin::Scal
[−]
[src]
pub trait Scal<F> { fn scal(&self, a: &mut SharedTensor<F>, x: &mut SharedTensor<F>) -> Result<(), Error>; fn scal_plain(&self, a: &SharedTensor<F>, x: &mut SharedTensor<F>) -> Result<(), Error>; }
Provides the scal operation.
Required Methods
fn scal(&self, a: &mut SharedTensor<F>, x: &mut SharedTensor<F>) -> Result<(), Error>
Scales a vector x
by a constant a
aka. a * x
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 scale_plain
.
fn scal_plain(&self, a: &SharedTensor<F>, x: &mut SharedTensor<F>) -> Result<(), Error>
Scales a vector x
by a constant a
aka. a * x
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 scale
.