Experimental BLAS (Basic Linear Algebra Subprograms) integration
Depends on crate rblas
, (docs).
extern crate ndarray;
extern crate ndarray_rblas;
extern crate rblas;
use Gemv;
use Transpose;
use ;
use AsBlas;
Use the methods in trait AsBlas
to convert an array into a view that
implements rblas’ Vector
or Matrix
traits.
Blas supports strided vectors and matrices; Matrices need to be contiguous
in their lowest dimension, so they will be copied into c-contiguous layout
automatically if needed. You should be able to use blocks sliced out
from a larger matrix without copying. Use the transpose flags in blas
instead of transposing with ndarray
.
Blas has its own error reporting system and will not panic on errors (that I know), instead output its own error conditions, for example on dimension mismatch in a matrix multiplication.