Matrix object and descriptor - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
typedef struct _aoclsparse_matrix *aoclsparse_matrix#

Matrix object.

This structure holds the matrix data. It is initialized using e.g. aoclsparse_create_scsr (or other variants, see table below). The returned matrix object needs be passed to all subsequent library calls that involve the matrix. It should be destroyed at the end using aoclsparse_destroy.

Table 11.2 Initialization of matrix objects.#

Storage

Precision P

Initialization function

Compressed Sparse Rows (CSR)

s, d, c, z

aoclsparse_create_Pcsr

Compressed Sparse Columns (CSC)

s, d, c, z

aoclsparse_create_Pcsc

Coordinate storage (COO)

s, d, c, z

aoclsparse_create_Pcoo

Triangular Compressed Sparse Rows (TCSR)

s, d, c, z

aoclsparse_create_Ptcsr

typedef struct _aoclsparse_mat_descr *aoclsparse_mat_descr#

Matrix object descriptor.

This structure holds properties describing a matrix and how to access its data. It must be initialized using aoclsparse_create_mat_descr and the returned descriptor object is passed to all subsequent library calls that involve the matrix. It is destroyed by using aoclsparse_destroy_mat_descr.