Module rustml::ops_inplace
[−]
[src]
Provides scalar, vector, vector-vector, vector-matrix and matrix-matrix operations.
Most of the operations are optimized using the underlying BLAS implementation. For each function it is explicitly documented whether or not BLAS is used.
Examples
The following example adds two vectors using BLAS and stores the result in the first vector.
use rustml::*; let mut a = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]; let b = [3.0, 6.0, 2.0, 3.0, 6.0, 9.0]; a.iadd(&b); assert_eq!(a, [4.0, 8.0, 5.0, 7.0, 11.0, 15.0]);
Traits
FunctionsInPlace |
Trait for common mathematical functions for scalars, vectors and matrices. |
MatrixMatrixOpsInPlace |
Trait for matrix-matrix operations. |
MatrixScalarOpsInPlace |
Trait for matrix-scalar operations. |
VectorVectorOpsInPlace |
Trait for inplace vector-vector operations. |
Functions
d_axpy |
Computes |
d_gemm |
Computes |
d_gemv |
Computes |
d_nrm2 |
Computes the L2 norm (euclidean norm) of a vector. (optimized via BLAS) |
s_axpy |
Computes |
s_gemm |
Computes |
s_gemv |
Computes |
s_nrm2 |
Computes the L2 norm (euclidean norm) of a vector. (optimized via BLAS) |