- Official OpenBlas Repository
- Official Lapacke Docuementation
- Example Repository for Openblas and Lapacke
- Installation either manually or with packages of the libraries is mandatory :
pacman -S lapack lapacke lapack-doc <openblas or blas> cblas
In order to use correctly the Openblas functions with C the cblas interface is mandatory.
Effectively the use of #include <cblas.h>
and compiling with the -lcblas
is enough to succesfully
run blas calls.
In order to tune the the Openblas library use :
export OPENBLAS_NUM_THREADS=threads openblas_set_num_threads(threads);
export GOTO_NUM_THREADS=threads goto_set_num_threads(threads);
export OMP_NUM_THREADS=threads
List of functions:
- cblas_zdotc_sub: dot product of two complex vectors
- cblas_dgemm: matrix multiplication
- cblas_dscal: scale a vector/array
- cblas_dswap: Exchanges the elements of two vectors (double precision)
- cblas_dcopy: Copies a vector to another vector (double-precision).
- cblas_daxpy: Computes a vector-scalar product and adds the result to a vector.
- cblas_dgemv: Multiplies a matrix by a vector (double precision).
- cblas_dger: Multiplies vector X by the transform of vector Y, then adds matrix A (double precision).
- cblas_ddot: Computes the dot product of two vectors (double-precision).
Similarly with the openblas execution the inclusion of #include <lapacke.h>
and linking with
-llapacke
during compilation is sufficient to run lapack calls.