aoclsparse_?csrsv() - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
aoclsparse_status aoclsparse_scsrsv(aoclsparse_operation trans, const float *alpha, aoclsparse_int m, const float *csr_val, const aoclsparse_int *csr_col_ind, const aoclsparse_int *csr_row_ptr, const aoclsparse_mat_descr descr, const float *x, float *y)#
aoclsparse_status aoclsparse_dcsrsv(aoclsparse_operation trans, const double *alpha, aoclsparse_int m, const double *csr_val, const aoclsparse_int *csr_col_ind, const aoclsparse_int *csr_row_ptr, const aoclsparse_mat_descr descr, const double *x, double *y)#

Sparse triangular solve using CSR storage format for single and double data precisions.

Deprecated:

This API is superseded by aoclsparse_strsv() and aoclsparse_dtrsv().

aoclsparse_?csrsv solves a sparse triangular linear system of a sparse \(m \times m\) matrix, defined in CSR storage format, a dense solution vector \(y\) and the right-hand side \(x\) that is multiplied by \(\alpha\), such that

\[ op(A) \, y = \alpha \, x, \]
with
\[\begin{split} op(A) = \left\{ \begin{array}{ll} A, & \text{if } {\bf\mathsf{trans}} = \text{aoclsparse}\_\text{operation}\_\text{none} \\ A^T, & \text{if } {\bf\mathsf{trans}} = \text{aoclsparse}\_\text{operation}\_\text{transpose} \\ A^H, & \text{if } {\bf\mathsf{trans}} = \text{aoclsparse}\_\text{operation}\_\text{conjugate}\_\text{transpose} \end{array} \right. \end{split}\]

Note

Only trans = aoclsparse_operation_none is supported.

Note

The input matrix has to be sparse upper or lower triangular matrix with unit or non-unit main diagonal. Matrix has to be sorted. No diagonal element can be omitted from a sparse storage if the solver is called with the non-unit indicator.

Parameters:
  • trans[in] matrix operation type.

  • alpha[in] scalar \(\alpha\).

  • m[in] number of rows of the sparse CSR matrix.

  • csr_val[in] array of nnz elements of the sparse CSR matrix.

  • csr_row_ptr[in] array of m+1 elements that point to the start of every row of the sparse CSR matrix.

  • csr_col_ind[in] array of nnz elements containing the column indices of the sparse CSR matrix.

  • descr[in] descriptor of the sparse CSR matrix.

  • x[in] array of m elements, holding the right-hand side.

  • y[out] array of m elements, holding the solution.

Return values: