|
Packit |
67cb25 |
.. index::
|
|
Packit |
67cb25 |
single: sparse BLAS
|
|
Packit |
67cb25 |
single: BLAS, sparse
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
*******************
|
|
Packit |
67cb25 |
Sparse BLAS Support
|
|
Packit |
67cb25 |
*******************
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
.. include:: include.rst
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
The Sparse Basic Linear Algebra Subprograms (|blas|) define a set of
|
|
Packit |
67cb25 |
fundamental operations on vectors and sparse matrices which can be used
|
|
Packit |
67cb25 |
to create optimized higher-level linear algebra functionality.
|
|
Packit |
67cb25 |
GSL supports a limited number of BLAS operations for sparse matrices.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
The header file :file:`gsl_spblas.h` contains the prototypes for the
|
|
Packit |
67cb25 |
sparse BLAS functions and related declarations.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
.. index::
|
|
Packit |
67cb25 |
single: sparse matrices, BLAS operations
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
Sparse BLAS operations
|
|
Packit |
67cb25 |
======================
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
.. function:: 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)
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
This function computes the matrix-vector product and sum
|
|
Packit |
67cb25 |
:math:`y \leftarrow \alpha op(A) x + \beta y`, where
|
|
Packit |
67cb25 |
:math:`op(A) = A, A^T` for :data:`TransA` = :code:`CblasNoTrans`,
|
|
Packit |
67cb25 |
:code:`CblasTrans`. In-place computations are not supported, so
|
|
Packit |
67cb25 |
:data:`x` and :data:`y` must be distinct vectors.
|
|
Packit |
67cb25 |
The matrix :data:`A` may be in triplet or compressed format.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
.. function:: int gsl_spblas_dgemm (const double alpha, const gsl_spmatrix * A, const gsl_spmatrix * B, gsl_spmatrix * C)
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
This function computes the sparse matrix-matrix product
|
|
Packit |
67cb25 |
:math:`C = \alpha A B`. The matrices must be in compressed format.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
.. index::
|
|
Packit |
67cb25 |
single: sparse BLAS, references
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
References and Further Reading
|
|
Packit |
67cb25 |
==============================
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
The algorithms used by these functions are described in the
|
|
Packit |
67cb25 |
following sources:
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* Davis, T. A., Direct Methods for Sparse Linear Systems, SIAM, 2006.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
* CSparse software library, https://www.cise.ufl.edu/research/sparse/CSparse
|