Module rustml::blas
[−]
[src]
Bindings for BLAS/ATLAS for high performance vector and matrix operations.
from here:
The BLAS (Basic Linear Algebra Subprograms) are routines that provide standard building blocks for performing basic vector and matrix operations. The Level 1 BLAS perform scalar, vector and vectorvector operations, the Level 2 BLAS perform matrixvector operations, and the Level 3 BLAS perform matrixmatrix operations. Because the BLAS are efficient, portable, and widely available, they are commonly used in the development of high quality linear algebra software.
There are several implementations of BLAS:
The Netlib BLAS implementation (reference implementation) is usually required when
compiling rustml but you can switch to
any of these implementations without recompiling rustml simply by setting the
LD_PRELOAD
environment variable to the location of the library you want to use
before running your application.
Example: Let's assume you have installed ATLAS into /opt/atlas
and want to start you
application with cargo. Then, you can use the
ATLAS implementation simply by starting your application as follows (depending on your
installation):
LD_PRELOAD=/opt/atlas/lib/libtatlas.so cargo run myapp
Using BLAS for vector and matrix operations
This module provides low level functions to access the BLAS functions. It is highly recommended to use the wrappers in the module ops_inplace which provide a more convenient and safer high level interface.
Enums
Order 
Enum to specify how a matrix is arranged. Required for the

Transpose 
Enum to specify how to transform a matrix before doing an
operation on it. Required for the 
Functions
cblas_daxpy 
Computes 
cblas_dgemm 
Computes 
cblas_dgemv 
Computes 
cblas_dnrm2 
Computes the L2 norm (euclidean norm) of a vector of elements of type f64 (doubles). 
cblas_saxpy 
Computes 
cblas_sgemm 
Computes 
cblas_sgemv 
Computes 
cblas_snrm2 
Computes the L2 norm (euclidean norm) of a vector of elements of type f32 (floats 