Rate This Document
Findability
Accuracy
Completeness
Readability

Function Description

The naming rules of the Sparse BLAS Level 2 or 3 (CSR format) functions are as follows:

  1. kml_sparse_<character><data><operation>
  2. kml_sparse_<character><data><mtype><operation> (only for one-based indexing of matrices)
  3. kml_csparse_<character><data><mtype><operation> (only for zero-based indexing of matrices)

<character> indicates the data type. Possible values are s (single-precision real floating-point), d (double-precision real floating-point), c (single-precision complex), and z (double-precision complex).

<data> indicates the storage type. Possible values are coo, csr, dia, sky, csc, and bsr.

<mtype> indicates the matrix type. Possible values are ge (general matrix), sy (symmetric matrix), and tr (triangular matrix).

<operation> indicates the matrix operation.

Table 1 Simple interfaces (only for one-based indexing)

Function Family

Data Type

Description

kml_sparse_?csrgemv

s, d, c, z

Computes the product of a matrix and a vector. The matrix is a sparse general matrix stored in the CSR format (3-array variation) with one-based indexing.

kml_sparse_?csrsymv

s, d, c, z

Computes the product of a matrix and a vector. The matrix is a sparse symmetric matrix stored in the CSR format (3-array variation) with one-based indexing.

Table 2 Simple interfaces (only for zero-based indexing)

Function Family

Data Type

Description

kml_csparse_?csrgemv

s, d, c, z

Computes the product of a matrix and a vector. The matrix is a sparse general matrix stored in the CSR format (3-array variation) with zero-based indexing.

kml_csparse_?csrsymv

s, d, c, z

Computes the product of a matrix and a vector. The matrix is a sparse symmetric matrix stored in the CSR format (3-array variation) with zero-based indexing.

Table 3 Common interfaces (for one- and zero-based indexing)

Function Family

Data Type

Description

kml_sparse_?csrmv

s, d, c, z

Computes the product of a matrix and a vector. The matrix is a sparse matrix stored in the CSR format.

kml_sparse_?csrsv

s, d, c, z

Solves a system of linear equations for a sparse matrix that is stored in the CSR format.

kml_sparse_?csrmm

s, d, c, z

Computes the product of a sparse matrix and a dense matrix that are stored in the CSR format.

Table 4 Interfaces for sparse matrix operation

Function Family

Data Type

Description

kml_sparse_?csradd

s, d, c, z

Computes the sum of two sparse matrices that are stored in the CSR format (3-array variation) with one-based indexing. The result is stored in a sparse matrix.

kml_sparse_?csrmultcsr

s, d, c, z

Computes the product of two sparse matrices that are stored in the CSR format (3-array variation) with one-based indexing. The result is stored in a sparse matrix.

kml_sparse_?csrmultd

s, d, c, z

Computes the product of two sparse matrices that are stored in the CSR format (3-array variation) with one-based indexing. The result is stored in a dense matrix.

matdescra Parameter Values

Parameter matdescra is a char pointer and contains six elements (only the first four are used).

Element

Value

Element 1

  • G: general matrix
  • S: symmetric matrix (A = A')
  • H: Hermitian matrix (A = conjg(A'))
  • T: triangular matrix
  • D: diagonal matrix

Element 2

  • L: lower triangle
  • U: upper triangle

Element 3

  • N: non-identity matrix
  • U: identity matrix

Element 4

  • F: one-based indexing
  • C: zero-based indexing

Table 4-8 lists the possible values of matdescra.

Table 5 Possible values of matdescra

Element 1

Element 2

Element 3

Element 4

G

0 (ignored)

0 (ignored)

F or C

S or H

L

N

F or C

S or H

L

U

F or C

S or H

U

N

F or C

S or H

U

U

F or C

T

L

N

F or C

T

L

U

F or C

T

U

N

F or C

T

U

U

F or C

D

0 (ignored)

N

F or C

D

0 (ignored)

U

F or C