Developer Reference for Intel® oneAPI Math Kernel Library for C
Naming Conventions in Inspector-Executor Sparse BLAS Routines
mkl_sparse_[<character>_]<operation>[_<format>]
Where square brackets indicate optional components.
Data Type Character
The <character> field indicates the data type of the operation:
Character |
Data Type |
|---|---|
s |
real, single precision |
c |
complex, single precision |
d |
real, double precision |
z |
complex, double precision |
(omitted) |
Type-agnostic operation |
When included: The character appears for operations that have data type-specific arguments like dense matrices, vectors, or scalar floating-point parameters (e.g., mkl_sparse_s_create_csr, mkl_sparse_d_mv, mkl_sparse_c_add, mkl_sparse_z_export_bsr).
When omitted: The character is absent for operations that only have data type-erased or type-agnostic arguments like sparse matrix handles or matrix descriptors (e.g., mkl_sparse_copy, mkl_sparse_destroy, mkl_sparse_optimize, mkl_sparse_convert_csr).
Operation Field
The <operation> field indicates the type of operation performed.
Matrix Management Operations
Routines for creating, modifying, and destroying sparse matrix handles.
Operation |
Description |
|---|---|
create |
Create matrix handle |
copy |
Create a copy of matrix handle |
convert |
Convert matrix between sparse formats |
convert_dense |
Convert from a sparse matrix format to a dense matrix representation |
dense2<fmt> |
Convert from a dense matrix representation to a sparse matrix format |
export |
Export matrix from internal representation to CSR/CSC/COO/BSR format |
destroy |
Free memory allocated for matrix handle |
set_value |
Change a value in a matrix |
order |
Perform ordering of column indexes of the matrix in CSR format |
Analysis and Optimization Operations
Routines for analyzing matrix structure and optimizing performance.
Operation |
Description |
|---|---|
set_<op>_hint |
Provide information about number of upcoming compute operations and operation type for optimization purposes, where <op> is one of mv, sv, mm, sm, dotmv, symgs, sorv, lu_smoother, or memory |
optimize |
Analyze the matrix using hints and store optimization information in matrix handle |
Matrix-Vector Operations
Routines for sparse matrix-vector computations.
Operation |
Description |
|---|---|
mv |
Compute sparse matrix-vector product |
trsv |
Solve a triangular system |
dotmv |
Compute a sparse matrix-vector product with dot product |
Matrix-Matrix Operations
Routines for sparse matrix-matrix computations.
Operation |
Description |
|---|---|
mm |
Compute sparse matrix by dense matrix product |
trsm |
Solve a triangular system with multiple right-hand sides |
add |
Compute sum of two sparse matrices |
spmm / spmmd |
Compute sparse-sparse matrix-matrix product and store the result as a sparse/dense matrix |
sp2m / sp2md |
Compute sparse-sparse matrix-matrix product (with operations on both matrices) and store the result as a sparse/dense matrix |
sypr |
Compute the symmetric or Hermitian triple product of sparse matrices and store the result as a sparse matrix |
syprd |
Compute the symmetric or Hermitian triple product of sparse and dense matrices and store the result as a dense matrix |
syrk |
Compute the sparse-sparse symmetric rank-k update using \(A \cdot A^T\) and store the result as a sparse matrix |
syrkd |
Compute the sparse-sparse symmetric rank-k update using \(A \cdot A^T\) and store the result as a dense matrix |
Preconditioner Operations
Routines for preconditioner computations used in iterative solvers.
Operation |
Description |
|---|---|
symgs |
Apply a single iteration of a symmetric Gauss-Seidel preconditioner |
symgs_mv |
Apply a single iteration of a symmetric Gauss-Seidel preconditioner along with a matrix-vector multiplication on output. |
sorv |
Apply a single iteration of a forward, backward or symmetric sweep of a successive over-relaxation preconditioner |
lu_smoother |
Apply a single iteration of a preconditioner which corresponds to the approximate matrix decomposition |
Format Field
The <format> field indicates the sparse matrix storage format:
Format |
Description |
|---|---|
coo |
Coordinate format |
bsr |
Block sparse row format (4-array or 3-array representation) |
csr |
Compressed sparse row format (4-array or 3-array representation) |
csc |
Compressed sparse column format (4-array or 3-array representation) |