aoclsparse_optimize() - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
aoclsparse_status aoclsparse_optimize(aoclsparse_matrix mat)#

Performs analysis and possible data allocations and matrix restructuring operations to accelerate sparse operations involving matrices.

In aoclsparse_optimize() sparse matrices are restructured based on matrix analysis, into different storage formats to improve data access and thus performance.

Parameters:

mat[in] sparse matrix in CSR format and sparse format information inside

Return values:
  • aoclsparse_status_success – the operation completed successfully.

  • aoclsparse_status_invalid_sizem is invalid.

  • aoclsparse_status_invalid_pointer

  • aoclsparse_status_internal_error – an internal error occurred.