Sparse BLAS Routines

The Intel® oneAPI Math Kernel Library provides a Data Parallel C++ interface to some of the Sparse BLAS routines. This section describes the Sparse BLAS routines included in the Intel® oneAPI Math Kernel Library (oneMKL).

Sparse BLAS provides basic operations on sparse vectors and matrices and separates them into three stages: initialization, analysis (also called inspector stage or optimize stage) and execution. For a given matrix, the analysis would typically be called one time and the execution may be called multiple times. During the analysis stage, the API inspects the matrix properties including size, sparsity pattern and available parallelism and can apply matrix format or structure changes to enable a more optimized algorithm. In the execution stage, multiple routine calls can take advantage of the analysis stage data in order to improve performance.

The supported sparse formats in Sparse BLAS routines are described in Sparse Storage Formats.

Routine or Function Group

Data Types

Description

sparse::init_matrix_handle

N/A

Initialize a sparse::matrix_handle_t object

sparse::release_matrix_handle

N/A

Release a sparse::matrix_handle_t object

sparse::set_csr_data

float, double

Set internal representation of sparse::matrix_handle_t to compressed sparse row (CSR) format with user provided CSR data arrays.

sparse::optimize_gemv

N/A

Perform internal optimizations for the sparse::gemv operation.

sparse::optimize_trmv

N/A

Perform internal optimizations for the sparse::trmv operation.

sparse::optimize_trsv

N/A

Perform internal optimizations for the sparse::trsv operation.

sparse::gemv

float, double

General sparse matrix-dense vector product

sparse::gemvdot

float, double

General sparse matrix-dense vector product with fused dot product

sparse::symv

float, double

Symmetric sparse matrix-dense vector product

sparse::trmv

float, double

Triangular sparse matrix-dense vector product

sparse::trsv

float, double

Triangular solve of sparse matrix against a dense vector.

sparse::gemm

float, double

General sparse matrix-dense matrix product

sparse::init_matmat_descr

N/A

Initialize the matmat_descr_t object. For use with sparse::matmat

sparse::set_matmat_data

N/A

Populate the matmat_descr_t object with desired operation description. For use with sparse::matmat

sparse::get_matmat_data

N/A

Query the operation description housed in the matmat_descr_t object. For use with sparse::matmat

sparse::release_matmat_descr

N/A

Release the matmat_descr_t object. For use with sparse::matmat

sparse::matmat

float, double

General sparse matrix-sparse matrix product

The currently supported sparse storage formats can be found in Sparse Storage Formats.