aoclsparse_optimize() - aoclsparse_optimize() - 5.3 English - 68552

AOCL API Guide (68552)

Document_ID
68552
Release_Date
2026-05-13
Version
5.3 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.

Note

This function is not thread-safe and must not be called concurrently by multiple threads for the same matrix object.

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_size – m is invalid.

  • aoclsparse_status_invalid_pointer –

  • aoclsparse_status_internal_error – an internal error occurred.