rocsparse_sdense2csc Interface Reference#
hipfort_rocsparse::rocsparse_sdense2csc Interface Reference
This function converts the matrix \(A\) in column-oriented dense format into a sparse matrix in CSC format. More...
Public Member Functions | |
| integer(kind(rocsparse_status_success)) function | rocsparse_sdense2csc_ (handle, m, n, descr, a, ld, nnz_per_columns, csc_val, csc_col_ptr, csc_row_ind) |
| integer(kind(rocsparse_status_success)) function | rocsparse_sdense2csc_rank_0 (handle, m, n, descr, a, ld, nnz_per_columns, csc_val, csc_col_ptr, csc_row_ind) |
| integer(kind(rocsparse_status_success)) function | rocsparse_sdense2csc_rank_1 (handle, m, n, descr, a, ld, nnz_per_columns, csc_val, csc_col_ptr, csc_row_ind) |
| integer(kind(rocsparse_status_success)) function | rocsparse_sdense2csc_full_rank (handle, m, n, descr, a, ld, nnz_per_columns, csc_val, csc_col_ptr, csc_row_ind) |
Detailed Description
This function converts the matrix \(A\) in column-oriented dense format into a sparse matrix in CSC format.
All the parameters are assumed to have been preallocated by the user, and the arrays are filled in based on nnz_per_columns, which can be pre-computed with rocsparse_Xnnz().
- Note
- This function is blocking with respect to the host.
- This routine does not support execution in a hipGraph context.
- Parameters
-
[in] handle - handle to the rocSPARSE library context queue. [in] m - number of rows of the column-oriented dense matrix A.[in] n - number of columns of the column-oriented dense matrix A.[in] descr - the descriptor of the column-oriented dense matrix A. The supported matrix type isrocsparse_matrix_type_generaland also any valid value of therocsparse_index_base.[in] A - column-oriented dense matrix of dimensions ( ld,n).[in] ld - leading dimension of the column-oriented dense matrix A.[in] nnz_per_columns - array of size ncontaining the number of non-zero elements per column.[out] csc_val - array of nnz ( = csc_col_ptr[n] -csc_col_ptr[0] ) non-zero elements of matrixA.[out] csc_col_ptr - integer array of n+1elements that contains the start of every column and the end of the last column plus one.[out] csc_row_ind - integer array of nnz ( = csc_col_ptr[n] -csc_col_ptr[0] ) column indices of the non-zero elements of matrixA.
- Return values
-
rocsparse_status_success the operation completed successfully. rocsparse_status_invalid_handle the library context was not initialized. rocsparse_status_invalid_size m,n, orldis invalid.rocsparse_status_invalid_pointer A,nnz_per_columns,csc_val,csc_col_ptr, orcsc_row_indpointer is invalid.
- Example
Member Function/Subroutine Documentation
◆ rocsparse_sdense2csc_()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sdense2csc::rocsparse_sdense2csc_ | ( | type(c_ptr), value | handle, |
| integer(c_int), value | m, | ||
| integer(c_int), value | n, | ||
| type(c_ptr), value | descr, | ||
| type(c_ptr), value | a, | ||
| integer(c_int), value | ld, | ||
| type(c_ptr), value | nnz_per_columns, | ||
| type(c_ptr), value | csc_val, | ||
| type(c_ptr), value | csc_col_ptr, | ||
| type(c_ptr), value | csc_row_ind | ||
| ) |
◆ rocsparse_sdense2csc_full_rank()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sdense2csc::rocsparse_sdense2csc_full_rank | ( | type(c_ptr) | handle, |
| integer(c_int) | m, | ||
| integer(c_int) | n, | ||
| type(c_ptr) | descr, | ||
| real(c_float), dimension(:,:), target | a, | ||
| integer(c_int) | ld, | ||
| integer(c_int), dimension(:), target | nnz_per_columns, | ||
| real(c_float), dimension(:), target | csc_val, | ||
| integer(c_int), dimension(:), target | csc_col_ptr, | ||
| integer(c_int), dimension(:), target | csc_row_ind | ||
| ) |
◆ rocsparse_sdense2csc_rank_0()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sdense2csc::rocsparse_sdense2csc_rank_0 | ( | type(c_ptr) | handle, |
| integer(c_int) | m, | ||
| integer(c_int) | n, | ||
| type(c_ptr) | descr, | ||
| real(c_float), target | a, | ||
| integer(c_int) | ld, | ||
| integer(c_int), target | nnz_per_columns, | ||
| real(c_float), target | csc_val, | ||
| integer(c_int), target | csc_col_ptr, | ||
| integer(c_int), target | csc_row_ind | ||
| ) |
◆ rocsparse_sdense2csc_rank_1()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sdense2csc::rocsparse_sdense2csc_rank_1 | ( | type(c_ptr) | handle, |
| integer(c_int) | m, | ||
| integer(c_int) | n, | ||
| type(c_ptr) | descr, | ||
| real(c_float), dimension(:), target | a, | ||
| integer(c_int) | ld, | ||
| integer(c_int), dimension(:), target | nnz_per_columns, | ||
| real(c_float), dimension(:), target | csc_val, | ||
| integer(c_int), dimension(:), target | csc_col_ptr, | ||
| integer(c_int), dimension(:), target | csc_row_ind | ||
| ) |
The documentation for this interface was generated from the following file: