aoclsparse_?csr2dense() - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
aoclsparse_status aoclsparse_scsr2dense(aoclsparse_int m, aoclsparse_int n, const aoclsparse_mat_descr descr, const float *csr_val, const aoclsparse_int *csr_row_ptr, const aoclsparse_int *csr_col_ind, float *A, aoclsparse_int ld, aoclsparse_order order)#
aoclsparse_status aoclsparse_dcsr2dense(aoclsparse_int m, aoclsparse_int n, const aoclsparse_mat_descr descr, const double *csr_val, const aoclsparse_int *csr_row_ptr, const aoclsparse_int *csr_col_ind, double *A, aoclsparse_int ld, aoclsparse_order order)#
aoclsparse_status aoclsparse_ccsr2dense(aoclsparse_int m, aoclsparse_int n, const aoclsparse_mat_descr descr, const aoclsparse_float_complex *csr_val, const aoclsparse_int *csr_row_ptr, const aoclsparse_int *csr_col_ind, aoclsparse_float_complex *A, aoclsparse_int ld, aoclsparse_order order)#
aoclsparse_status aoclsparse_zcsr2dense(aoclsparse_int m, aoclsparse_int n, const aoclsparse_mat_descr descr, const aoclsparse_double_complex *csr_val, const aoclsparse_int *csr_row_ptr, const aoclsparse_int *csr_col_ind, aoclsparse_double_complex *A, aoclsparse_int ld, aoclsparse_order order)#

This function converts the sparse matrix in CSR format into a dense matrix.

Parameters:
  • m[in] number of rows of the dense matrix A.

  • n[in] number of columns of the dense matrix A.

  • descr[in] the descriptor of the dense matrix A, the supported matrix type is aoclsparse_matrix_type_general. Base index from the descriptor is used in the conversion process.

  • csr_val[in] array of size at least nnz nonzero elements of matrix A.

  • csr_row_ptr[in] CSR row pointer array of size (m +1).

  • csr_col_ind[in] An array of CSR column indices of at least nnz column indices of the nonzero elements of matrix A.

  • A[out] array of dimensions (lda, n)

  • ld[in] leading dimension of dense array A.

  • order[in] memory layout of a dense matrix A. It can be either aoclsparse_order_column or aoclsparse_order_row.

Return values:
  • aoclsparse_status_success – the operation completed successfully.

  • aoclsparse_status_invalid_sizem or n or ld is invalid.

  • aoclsparse_status_invalid_pointerA, csr_val, csr_row_ptr, or csr_col_ind pointers are invalid.