Associated with matrix descriptor (aoclsparse_mat_descr) - 5.2 English - 68552

AOCL API Guide (68552)

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

Specify the matrix type.

Specifies the type of a matrix. A matrix object descriptor describes how to interpret the type of the matrix. The data in the matrix object need not match the type in the matrix object descriptor. It can be set using aoclsparse_set_mat_type and retrieved using aoclsparse_get_mat_type.

Values:

enumerator aoclsparse_matrix_type_general#

general matrix, no special pattern.

enumerator aoclsparse_matrix_type_symmetric#

symmetric matrix, \( A=A^T\). It stores only a single triangle specified using aoclsparse_fill_mode.

enumerator aoclsparse_matrix_type_hermitian#

hermitian matrix, \( A=A^H\). Same storage comment as for the symmetric case.

enumerator aoclsparse_matrix_type_triangular#

triangular matrix, \( A=\text{tril}(A) \) or \( A=\text{triu}(A). \) Here too, aoclsparse_fill_mode specifies which triangle is available.

enum aoclsparse_index_base#

Specify the matrix index base.

Indicate the base used on the matrix indices, either 0-base (C, C++) or 1-base (Fortran). The base is set using aoclsparse_set_mat_index_base. The current of a matrix object can be obtained by calling aoclsparse_get_mat_index_base.

Note

The base-indexing information is stored in two distinc locations: the matrix object aoclsparse_matrix and the matrix object descriptior aoclsparse_mat_descr, these must coincide, either be both zero or both one. Any function accepting both objects will fail if these do not match.

Values:

enumerator aoclsparse_index_base_zero#

zero based indexing, C/C++ indexing.

enumerator aoclsparse_index_base_one#

one based indexing, Fortran indexing.

enum aoclsparse_diag_type#

Indicates how to interpret the diagonal entries of a matrix.

Used to indicate how to use the diagonal elements of a matrix. The purpose of this is to optimize certain operations inside the kernels. If the diagonal elements are not stored but should be interpreted has being all ones, then this can accelerate the operation by avoiding unnecessary memory accesses. For a given aoclsparse_mat_descr, the diagonal type can be set using aoclsparse_set_mat_diag_type and can be retrieved by calling aoclsparse_get_mat_diag_type.

Values:

enumerator aoclsparse_diag_type_non_unit#

diagonal entries are present and arbitrary.

enumerator aoclsparse_diag_type_unit#

diagonal entries are to be considered all ones. Kernels will not access the diagonal elements in the matrix data.

enumerator aoclsparse_diag_type_zero#

ignore diagonal entries: for specifying strict lower or upper triangular matrices.

enum aoclsparse_fill_mode#

Specify the matrix fill mode.

Indicates if the lower or the upper part of a triangular or symmetric matrix is stored. The fill mode can be set using aoclsparse_set_mat_fill_mode, and can be retrieved by calling aoclsparse_get_mat_fill_mode.

Values:

enumerator aoclsparse_fill_mode_lower#

lower triangular part is stored.

enumerator aoclsparse_fill_mode_upper#

upper triangular part is stored.

enum aoclsparse_order#

Specify the memory layout (order) used to store a dense matrix.

Values:

enumerator aoclsparse_order_row#

Row major, (C/C++ storage).

enumerator aoclsparse_order_column#

Column major, (Fortran storage).