Trait collenchyma_blas::plugin::Nrm2
[−]
[src]
pub trait Nrm2<F> { fn nrm2(&self, x: &mut SharedTensor<F>, result: &mut SharedTensor<F>) -> Result<(), Error>; fn nrm2_plain(&self, x: &SharedTensor<F>, result: &mut SharedTensor<F>) -> Result<(), Error>; }
Provides the nrm2 operation.
Required Methods
fn nrm2(&self, x: &mut SharedTensor<F>, result: &mut SharedTensor<F>) -> Result<(), Error>
Computes the L2 norm aka. euclidean length 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 nrm2_plain
.
fn nrm2_plain(&self, x: &SharedTensor<F>, result: &mut SharedTensor<F>) -> Result<(), Error>
Computes the L2 norm aka. euclidean length 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 nrm2
.