Sparse BLAS Support

The Sparse Basic Linear Algebra Subprograms (BLAS) define a set of fundamental operations on vectors and sparse matrices which can be used to create optimized higher-level linear algebra functionality. GSL supports a limited number of BLAS operations for sparse matrices.

The header file gsl_spblas.h contains the prototypes for the sparse BLAS functions and related declarations.

Sparse BLAS operations

int gsl_spblas_dgemv(const CBLAS_TRANSPOSE_t TransA, const double alpha, const gsl_spmatrix * A, const gsl_vector * x, const double beta, gsl_vector * y)

This function computes the matrix-vector product and sum

System Message: WARNING/2 (y \leftarrow \alpha op(A) x + \beta y)

latex exited with error [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Mageia) (preloaded format=latex) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2017-04-15> Babel <3.10> and hyphenation patterns for 84 language(s) loaded. (/usr/share/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/share/texmf-dist/tex/latex/base/size12.clo)) (/usr/share/texmf-dist/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.158 \endinput ^^M No pages of output. Transcript written on math.log.
, where

System Message: WARNING/2 (op(A) = A, A^T)

latex exited with error [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Mageia) (preloaded format=latex) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2017-04-15> Babel <3.10> and hyphenation patterns for 84 language(s) loaded. (/usr/share/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/share/texmf-dist/tex/latex/base/size12.clo)) (/usr/share/texmf-dist/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.158 \endinput ^^M No pages of output. Transcript written on math.log.
for TransA = CblasNoTrans, CblasTrans. In-place computations are not supported, so x and y must be distinct vectors. The matrix A may be in triplet or compressed format.

int gsl_spblas_dgemm(const double alpha, const gsl_spmatrix * A, const gsl_spmatrix * B, gsl_spmatrix * C)

This function computes the sparse matrix-matrix product

System Message: WARNING/2 (C = \alpha A B)

latex exited with error [stdout] This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017/Mageia) (preloaded format=latex) restricted \write18 enabled. entering extended mode (./math.tex LaTeX2e <2017-04-15> Babel <3.10> and hyphenation patterns for 84 language(s) loaded. (/usr/share/texmf-dist/tex/latex/base/article.cls Document Class: article 2014/09/29 v1.4h Standard LaTeX document class (/usr/share/texmf-dist/tex/latex/base/size12.clo)) (/usr/share/texmf-dist/tex/latex/base/inputenc.sty ! LaTeX Error: File `utf8x.def' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.158 \endinput ^^M No pages of output. Transcript written on math.log.
. The matrices must be in compressed format.

References and Further Reading

The algorithms used by these functions are described in the following sources: