rocsparse_csr2bsr_nnz Interface Reference#
hipfort_rocsparse::rocsparse_csr2bsr_nnz Interface Reference
This function computes the number of nonzero block columns per row and the total number of nonzero blocks in a sparse BSR matrix given a sparse CSR matrix as input. More...
Public Member Functions | |
integer(kind(rocsparse_status_success)) function | rocsparse_csr2bsr_nnz_ (handle, dir, m, n, csr_descr, csr_row_ptr, csr_col_ind, block_dim, bsr_descr, bsr_row_ptr, bsr_nnz) |
integer(kind(rocsparse_status_success)) function | rocsparse_csr2bsr_nnz_rank_0 (handle, dir, m, n, csr_descr, csr_row_ptr, csr_col_ind, block_dim, bsr_descr, bsr_row_ptr, bsr_nnz) |
integer(kind(rocsparse_status_success)) function | rocsparse_csr2bsr_nnz_rank_1 (handle, dir, m, n, csr_descr, csr_row_ptr, csr_col_ind, block_dim, bsr_descr, bsr_row_ptr, bsr_nnz) |
Detailed Description
This function computes the number of nonzero block columns per row and the total number of nonzero blocks in a sparse BSR matrix given a sparse CSR matrix as input.
The routine does support asynchronous execution if the pointer mode is set to device.
- Parameters
-
[in] handle handle to the rocsparse library context queue. [in] dir direction that specified whether to count nonzero elements by rocsparse_direction_row
or byrocsparse_direction_row
.[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_general
is supported.[in] csr_row_ptr integer array containing m+1
elements 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] block_dim the block dimension of the BSR matrix. Between 1 and min(m, n) [in] bsr_descr descriptor of the sparse BSR matrix. Currently, only rocsparse_matrix_type_general
is supported.[out] bsr_row_ptr integer array containing mb+1
elements that point to the start of each block row of the BSR matrix[out] bsr_nnz total number of nonzero elements in device or host memory.
- Return values
-
rocsparse_status_success the operation completed successfully. rocsparse_status_invalid_handle the library context was not initialized. rocsparse_status_invalid_size m
orn
orblock_dim
is invalid.rocsparse_status_invalid_pointer csr_row_ptr
orcsr_col_ind
orbsr_row_ptr
orbsr_nnz
pointer is invalid.
Member Function/Subroutine Documentation
◆ rocsparse_csr2bsr_nnz_()
integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csr2bsr_nnz::rocsparse_csr2bsr_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, | ||
integer(c_int), value | block_dim, | ||
type(c_ptr), value | bsr_descr, | ||
type(c_ptr), value | bsr_row_ptr, | ||
type(c_ptr), value | bsr_nnz | ||
) |
◆ rocsparse_csr2bsr_nnz_rank_0()
integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csr2bsr_nnz::rocsparse_csr2bsr_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, | ||
integer(c_int) | block_dim, | ||
type(c_ptr) | bsr_descr, | ||
integer(c_int), target | bsr_row_ptr, | ||
integer(c_int), target | bsr_nnz | ||
) |
◆ rocsparse_csr2bsr_nnz_rank_1()
integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_csr2bsr_nnz::rocsparse_csr2bsr_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, | ||
integer(c_int) | block_dim, | ||
type(c_ptr) | bsr_descr, | ||
integer(c_int), dimension(:), target | bsr_row_ptr, | ||
integer(c_int), dimension(:), target | bsr_nnz | ||
) |
The documentation for this interface was generated from the following file: