Developer Reference for Intel® oneAPI Math Kernel Library for C
Sparse BLAS Level 1 Routines
This section describes Sparse BLAS Level 1, an extension of BLAS Level 1 included in the Intel® oneAPI Math Kernel Library (oneMKL) beginning with the Intel® oneMKL release 2.1.
Sparse BLAS Level 1 is a group of routines and functions that perform a number of common vector operations on sparse vectors stored in compressed form.
Sparse Vectors
Sparse vectors are those in which the majority of elements are zeros and so are often stored in a special data structure to take advantage of the sparsity. Sparse BLAS routines and functions are specially implemented to take advantage of vector sparsity allowing you to achieve large savings in computer time and memory. If nz is the number of non-zero vector elements, the computer time taken by Sparse BLAS level 1 operations will be O(nz) .
See Vector Arguments for more details on how to represent sparse vectors in compressed form and how to use them as arguments in Sparse BLAS routines and functions.
See Naming Conventions for Sparse BLAS Routines for the naming conventions of the Sparse BLAS Level 1 routines and functions.
There are other BLAS Level 1 routines that can be used with sparse vectors, but they do not take advantage of the sparsity and so are not included in this section. See BLAS Level 1 Routines for Sparse Vectors for more details.
Sparse BLAS Routines and Their Data Types
Routines and data types supported in the Intel® oneMKL implementation of Sparse BLAS are listed in Table “Sparse BLAS Routines and Their Data Types” .
Routine/Function |
Data Types |
Description |
|---|---|---|
s, d, c, z |
Adds a scalar multiple of compressed sparse vector to a full-storage vector |
|
s, d |
Computes the dot product of a compressed sparse real vector by a full-storage real vector. |
|
c, z |
Computes the conjugated dot product of a compressed sparse complex vector with a full-storage complex vector. |
|
c, z |
Computes the dot product of a compressed sparse complex vector by a full-storage complex vector. |
|
s, d, c, z |
Gathering a full-storage sparse vector into compressed form nz , x , indx (routines) |
|
s, d, c, z |
Gathering a full-storage sparse vector into compressed form and assigning zeros to gathered elements in the full-storage vector (routines) |
|
s, d |
Applies Givens rotation to sparse vectors one of which is in compressed form. |
|
s, d, c, z |
Scattering a vector from compressed form to full-storage form (routines) |