-
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_?csrsvsolves 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
nnzelements of the sparse CSR matrix.csr_row_ptr – [in] array of
m+1elements that point to the start of every row of the sparse CSR matrix.csr_col_ind – [in] array of
nnzelements containing the column indices of the sparse CSR matrix.descr – [in] descriptor of the sparse CSR matrix.
x – [in] array of
melements, holding the right-hand side.y – [out] array of
melements, holding the solution.
- Return values:
aoclsparse_status_success – the operation completed successfully.
aoclsparse_status_invalid_size –
mis invalid.aoclsparse_status_invalid_pointer –
descr,alpha,csr_val,csr_row_ptr,csr_col_ind,xorypointer is invalid.aoclsparse_status_internal_error – an internal error occurred.
aoclsparse_status_not_implemented –
trans= aoclsparse_operation_conjugate_transpose ortrans= aoclsparse_operation_transpose or aoclsparse_matrix_type is not aoclsparse_matrix_type_general.