rocsparse_csr2gebsr_nnz Interface Reference#
hipfort_rocsparse::rocsparse_csr2gebsr_nnz Interface Reference
Public Member Functions | |
| integer(kind(rocsparse_status_success)) function | rocsparse_csr2gebsr_nnz_ (handle, dir, m, n, csr_descr, csr_row_ptr, csr_col_ind, bsr_descr, bsr_row_ptr, row_block_dim, col_block_dim, bsr_nnz_devhost, temp_buffer) |
| integer(kind(rocsparse_status_success)) function | rocsparse_csr2gebsr_nnz_rank_0 (handle, dir, m, n, csr_descr, csr_row_ptr, csr_col_ind, bsr_descr, bsr_row_ptr, row_block_dim, col_block_dim, bsr_nnz_devhost, temp_buffer) |
| integer(kind(rocsparse_status_success)) function | rocsparse_csr2gebsr_nnz_rank_1 (handle, dir, m, n, csr_descr, csr_row_ptr, csr_col_ind, bsr_descr, bsr_row_ptr, row_block_dim, col_block_dim, bsr_nnz_devhost, temp_buffer) |
Detailed Description
This function takes a sparse CSR matrix as input and computes the block row offset array, bsr_row_ptr, and the total number of non-zero blocks, bsr_nnz_devhost, that will result from converting the CSR format input matrix to a general BSR format output matrix. This function is the second step in the conversion and is used in conjunction with rocsparse_Xcsr2gebsr_buffer_size() and rocsparse_Xcsr2gebsr().
rocsparse_csr2gebsr_nnz accepts both host and device pointers for bsr_nnz_devhost, which can be set by calling rocsparse_set_pointer_mode prior to calling rocsparse_csr2gebsr_nnz.
- 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] dir - direction that specifies whether to count non-zero elements by rocsparse_direction_rowor byrocsparse_direction_column.[in] m - number of rows of the sparse CSR matrix. [in] n - number of columns of the sparse CSR matrix. [in] csr_descr - descriptor of the sparse CSR matrix. Currently, only rocsparse_matrix_type_generalis supported.[in] csr_row_ptr - integer array containing m+1elements that point to the start of each row of the CSR matrix.[in] csr_col_ind - integer array of the column indices for each non-zero element in the CSR matrix. [in] bsr_descr - descriptor of the sparse general BSR matrix. Currently, only rocsparse_matrix_type_generalis supported.[out] bsr_row_ptr - integer array containing mb+1elements that point to the start of each block row of the general BSR matrix.[in] row_block_dim - the row block dimension of the general BSR matrix. Between \(1\) and \(\min(m, n)\). [in] col_block_dim - the col block dimension of the general BSR matrix. Between \(1\) and \(\min(m, n)\). [out] bsr_nnz_devhost - total number of non-zero elements in device or host memory. [in] temp_buffer - buffer allocated by the user. Its size is determined by calling rocsparse_Xcsr2gebsr_buffer_size().
- 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,row_block_dim, orcol_block_dimis invalid.rocsparse_status_invalid_pointer csr_row_ptr,csr_col_ind,bsr_row_ptr, orbsr_nnz_devhostpointer is invalid.
Member Function/Subroutine Documentation
◆ rocsparse_csr2gebsr_nnz_()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csr2gebsr_nnz::rocsparse_csr2gebsr_nnz_ | ( | type(c_ptr), value | handle, |
| integer(kind(rocsparse_direction_row)), value | dir, | ||
| integer(c_int), value | m, | ||
| integer(c_int), value | n, | ||
| type(c_ptr), value | csr_descr, | ||
| type(c_ptr), value | csr_row_ptr, | ||
| type(c_ptr), value | csr_col_ind, | ||
| type(c_ptr), value | bsr_descr, | ||
| type(c_ptr), value | bsr_row_ptr, | ||
| integer(c_int), value | row_block_dim, | ||
| integer(c_int), value | col_block_dim, | ||
| type(c_ptr), value | bsr_nnz_devhost, | ||
| type(c_ptr), value | temp_buffer | ||
| ) |
◆ rocsparse_csr2gebsr_nnz_rank_0()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csr2gebsr_nnz::rocsparse_csr2gebsr_nnz_rank_0 | ( | type(c_ptr) | handle, |
| integer(kind(rocsparse_direction_row)) | dir, | ||
| integer(c_int) | m, | ||
| integer(c_int) | n, | ||
| type(c_ptr) | csr_descr, | ||
| integer(c_int), target | csr_row_ptr, | ||
| integer(c_int), target | csr_col_ind, | ||
| type(c_ptr) | bsr_descr, | ||
| integer(c_int), target | bsr_row_ptr, | ||
| integer(c_int) | row_block_dim, | ||
| integer(c_int) | col_block_dim, | ||
| type(c_ptr) | bsr_nnz_devhost, | ||
| type(c_ptr) | temp_buffer | ||
| ) |
◆ rocsparse_csr2gebsr_nnz_rank_1()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csr2gebsr_nnz::rocsparse_csr2gebsr_nnz_rank_1 | ( | type(c_ptr) | handle, |
| integer(kind(rocsparse_direction_row)) | dir, | ||
| integer(c_int) | m, | ||
| integer(c_int) | n, | ||
| type(c_ptr) | csr_descr, | ||
| integer(c_int), dimension(:), target | csr_row_ptr, | ||
| integer(c_int), dimension(:), target | csr_col_ind, | ||
| type(c_ptr) | bsr_descr, | ||
| integer(c_int), dimension(:), target | bsr_row_ptr, | ||
| integer(c_int) | row_block_dim, | ||
| integer(c_int) | col_block_dim, | ||
| type(c_ptr) | bsr_nnz_devhost, | ||
| type(c_ptr) | temp_buffer | ||
| ) |
The documentation for this interface was generated from the following file: