Trait collenchyma_blas::plugin::Asum [] [src]

pub trait Asum<F> {
    fn asum(&self, x: &mut SharedTensor<F>, result: &mut SharedTensor<F>) -> Result<(), Error>;
    fn asum_plain(&self, x: &SharedTensor<F>, result: &mut SharedTensor<F>) -> Result<(), Error>;
}

Provides the asum operation.

Required Methods

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

Computes the absolute sum of vector x with complete memory management.

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

For a no-memory managed version see asum_plain.

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

Computes the absolute sum of vector x without any memory management.

Saves the result to result. 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 asum.

Implementors