Porting MKL’s Traditional SPARSE BLAS APIs to AOCL-Sparse - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English

Table 11.4 shows the mapping between MKL’s traditional Sparse BLAS and AOCL-Sparse’s APIs. Unlike the MKL’s I/E APIs, the traditional APIs work with pointers, without utilizing any abstract data structures. Some of the APIs of interest are listed in the table with the corresponding AOCL-Sparse API. Additionally, Table 11.5 lists the mappings of various types (value of pointers) within MKL’s traditional interface with AOCL-Sparse types. This section describes the porting process with a few illustrations.

Table 11.4 Mapping MKL’s traditional APIs to AOCL-Sparse#

MKL Old

AOCL-Sparse

Comments

mkl_?csrcsc

aoclsparse_convert_csr()

mkl_cspblas_dcsrgemv
mkl_?csrmv
mkl_?csrgemv
mkl_?csrsymv

aoclsparse_?mv()

mkl_?csrtrsv
mkl_?csrsv

aoclsparse_?trsv()

mkl_dcsrmultcsr

aoclsparse_sp2m()

mkl_dcsrmm

aoclsparse_?csrmm()

General, symmetric and Hermitian matrices supported

mkl_?csrsm

aoclsparse_?trsm()

mkl_dcsradd

aoclsparse_?add()

mkl_sparse_destroy

aoclsparse_destroy()

Table 11.5 Mapping MKL Parameters to AOCL-Sparse#

MKL

AOCL-Sparse

Comments

transa

N or n

op = aoclsparse_operation_none

transa

T or t

op = aoclsparse_operation_transpose

transa

C or c

op = aoclsparse_operation_conjugate_transpose

matdescra[b]

G

mat_type = aoclsparse_matrix_type_general

b is 0/1 based on zero/one-based indexing

matdescra[b]

S

mat_type = aoclsparse_matrix_type_symmetric

matdescra[b]

H

mat_type = aoclsparse_matrix_type_hermitian

matdescra[b]

T

mat_type = aoclsparse_matrix_type_triangular

matdescra[b+1]
*uplo

L

fill = aoclsparse_fill_mode_lower

matdescra[b+1] is S or H or T

matdescra[b+1]
*uplo

U

fill = aoclsparse_fill_mode_upper

matdescra[b+1] is S or H or T

matdescra[b+2]

N

diag = aoclsparse_diag_type_non_unit

matdescra[b+1] is S or H or T

matdescra[b+2]

U

diag = aoclsparse_diag_type_unit

matdescra[b+1] is S or H or T

matdescra[b+3]

C

base = aoclsparse_index_base_zero

matdescra[b+3]

F

base = aoclsparse_index_base_one