hipsparsescsc2dense Interface Reference#
hipsparseXcsc2dense functions convert the sparse matrix in CSC format into a dense matrix.
More...
Public Member Functions | |
| integer(kind(hipsparse_status_success)) function | hipsparsescsc2dense_ (handle, m, n, descr, cscval, cscrowind, csccolptr, a, ld) |
| integer(kind(hipsparse_status_success)) function | hipsparsescsc2dense_rank_0 (handle, m, n, descr, cscval, cscrowind, csccolptr, a, ld) |
| integer(kind(hipsparse_status_success)) function | hipsparsescsc2dense_rank_1 (handle, m, n, descr, cscval, cscrowind, csccolptr, a, ld) |
| integer(kind(hipsparse_status_success)) function | hipsparsescsc2dense_full_rank (handle, m, n, descr, cscval, cscrowind, csccolptr, a, ld) |
Detailed Description
hipsparseXcsc2dense functions convert the sparse matrix in CSC format into a dense matrix.
Given the input CSC matrix of size mxn, the routine writes the matrix to the dense array A such that A has leading dimension ld and is column ordered. This means that A has size ldxn where ld>=m. All the parameters are assumed to have been preallocated by the user. If the input CSC matrix has index base of one, it must be set in the hipsparseMatDescr_t. See hipsparseSetMatIndexBase () prior to calling hipsparseXcsc2dense.
For example, consider the sparse CSC matrix:
\[ \begin{align} \text{cscRowInd} &= \begin{bmatrix} 0 & 1 & 2 & 1 & 2 & 0 & 2 \end{bmatrix} \\% \text{cscColPtr} &= \begin{bmatrix} 0 & 3 & 4 & 5 & 7 \end{bmatrix} \\% \text{cscVal} &= \begin{bmatrix} 1 & 3 & 5 & 4 & 6 & 2 & 7 \end{bmatrix} \\% \end{align} \]
hipsparseXcsc2dense is used to convert to the dense matrix:
\[ \begin{bmatrix} 1 & 0 & 0 & 2 \\% 3 & 4 & 0 & 0 \\% 5 & 0 & 6 & 7 \end{bmatrix} \]
where the values in the A array are column ordered:
\[ \text{A} &= \begin{bmatrix} 1 & 3 & 5 & 0 & 4 & 0 & 0 & 0 & 6 & 2 & 0 & 7 \end{bmatrix} \\% \]
- Note
- This function is executed asynchronously with respect to the host and can return control to the application on the host before the entire result is ready.
- Deprecated:
- This function is deprecated when using the CUDA backend (CUDA 11.0+) and will be removed in CUDA 12.0. This deprecation does not apply to the ROCm backend.
- Parameters
-
[in] handle - handle to the hipSPARSE library context queue. [in] m - number of rows of the dense matrix A. Must be non-negative.[in] n - number of columns of the dense matrix A. Must be non-negative.[in] descr - the descriptor of the dense matrix A. The supported matrix type isHIPSPARSE_MATRIX_TYPE_GENERALand any valid value of thehipsparseIndexBase_t.[in] cscVal - array of nnz ( = cscColPtr[n] -cscColPtr[0] ) non-zero elements of matrixA.[in] cscRowInd - integer array of nnz ( = cscColPtr[n] -cscColPtr[0] ) column indices of the non-zero elements of matrixA.[in] cscColPtr - integer array of n+1elements that contains the start of every column and the end of the last column plus one.[out] A - array of dimensions ( ld,n).[in] ld - leading dimension of dense array A. Must be at leastm.
- Return values
-
HIPSPARSE_STATUS_SUCCESS the operation completed successfully. HIPSPARSE_STATUS_NOT_INITIALIZED handleis not initialized.HIPSPARSE_STATUS_INVALID_VALUE handle,descr,cscVal,cscColPtr,cscRowInd, orAis nullptr,mornis negative, orldis invalid.
Member Function/Subroutine Documentation
◆ hipsparsescsc2dense_()
| integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsescsc2dense::hipsparsescsc2dense_ | ( | type(c_ptr), value | handle, |
| integer(c_int), value | m, | ||
| integer(c_int), value | n, | ||
| type(c_ptr), value | descr, | ||
| type(c_ptr), value | cscval, | ||
| type(c_ptr), value | cscrowind, | ||
| type(c_ptr), value | csccolptr, | ||
| type(c_ptr), value | a, | ||
| integer(c_int), value | ld | ||
| ) |
◆ hipsparsescsc2dense_full_rank()
| integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsescsc2dense::hipsparsescsc2dense_full_rank | ( | type(c_ptr) | handle, |
| integer(c_int) | m, | ||
| integer(c_int) | n, | ||
| type(c_ptr) | descr, | ||
| real(c_float), dimension(:), target | cscval, | ||
| integer(c_int), dimension(:), target | cscrowind, | ||
| integer(c_int), dimension(:), target | csccolptr, | ||
| real(c_float), dimension(:,:), target | a, | ||
| integer(c_int) | ld | ||
| ) |
◆ hipsparsescsc2dense_rank_0()
| integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsescsc2dense::hipsparsescsc2dense_rank_0 | ( | type(c_ptr) | handle, |
| integer(c_int) | m, | ||
| integer(c_int) | n, | ||
| type(c_ptr) | descr, | ||
| real(c_float), target | cscval, | ||
| integer(c_int), target | cscrowind, | ||
| integer(c_int), target | csccolptr, | ||
| real(c_float), target | a, | ||
| integer(c_int) | ld | ||
| ) |
◆ hipsparsescsc2dense_rank_1()
| integer(kind(hipsparse_status_success)) function hipfort_hipsparse::hipsparsescsc2dense::hipsparsescsc2dense_rank_1 | ( | type(c_ptr) | handle, |
| integer(c_int) | m, | ||
| integer(c_int) | n, | ||
| type(c_ptr) | descr, | ||
| real(c_float), dimension(:), target | cscval, | ||
| integer(c_int), dimension(:), target | cscrowind, | ||
| integer(c_int), dimension(:), target | csccolptr, | ||
| real(c_float), dimension(:), target | a, | ||
| integer(c_int) | ld | ||
| ) |
The documentation for this interface was generated from the following file: