AOCL-Sparse is a library containing basic linear algebra subroutines for sparse matrices and vectors (Sparse BLAS). It is designed to be used with C, C++, and compatible languages.
The current functionality of AOCL-Sparse is organized in the following categories:
Sparse Level 1 functions perform vector operations, such as dot product, vector additions on sparse vectors, gather, scatter, and other similar operations.
Sparse Level 2 functions describe the operations between a matrix in sparse format and a vector in dense format, including matrix-vector product (SpMV), triangular solve (TRSV), and so on.
Sparse Level 3 functions describe the operations between a matrix in sparse format and a matrix in dense/sparse format. The operations comprise of matrix additions (SpADD), matrix-matrix product (SpMM, SpMMd, Sp2M, Sp2Md), triangular solver with multiple right-hand sides (TRSM), symmetric product of 3 matrices (sypr, syprd) and matrix-its transpose product (syrk, syrkd).
Iterative sparse solvers based on Krylov subspace methods (CG, GMRES) and preconditioners (such as SymGS, SOR and ILU0).
Sparse format conversion functions for translating matrices in a variety of sparse storage formats.
Auxiliary functions to allow basic operations, including create, copy, destroy, and modify matrix handles and descriptors.
Additional Highlights
Supported data types: single, double, and the complex variants
0-based and 1-based indexing of sparse formats
Hint & Optimize framework to accelerate the supported functions by a prior matrix analysis based on the users’ hints of expected operations.
Multi-Thread Support
You can set the total number of threads using the environment variables
AOCLSPARSE_NUM_THREADSorOMP_NUM_THREADS. If both environment variables are set, AOCL-Sparse gives higher precedence toAOCLSPARSE_NUM_THREADS. If neither variable is set, the default number of threads is equal to the number of processors identified by the OpenMP library. The functions with multi-thread support include SpMV variants for real and complex datatypes, TRSM, SpMM, Sp2M, CSRMM and SpAdd.
For more information on the AOCL-Sparse APIs, refer AOCL-Sparse_API_Guide.pdf in the docs folder (amd/aocl-sparse).