rocsparse_gebsr2gebsr_nnz Interface Reference#
hipfort_rocsparse::rocsparse_gebsr2gebsr_nnz Interface Reference
This function is used when converting a general BSR sparse matrix A
to another general BSR sparse matrix C
.
More...
Public Member Functions | |
integer(kind(rocsparse_status_success)) function | rocsparse_gebsr2gebsr_nnz_ (handle, dir, mb, nb, nnzb, descr_A, bsr_row_ptr_A, bsr_col_ind_A, row_block_dim_A, col_block_dim_A, descr_C, bsr_row_ptr_C, row_block_dim_C, col_block_dim_C, nnz_total_dev_host_ptr, temp_buffer) |
Detailed Description
This function is used when converting a general BSR sparse matrix A
to another general BSR sparse matrix C
.
Specifically, this function determines the number of non-zero blocks that will exist in C
(stored using either a host or device pointer), and computes the row pointer array for C
.
The routine does support asynchronous execution.
- Parameters
-
[in] handle handle to the rocsparse library context queue. [in] dir the storage format of the blocks, rocsparse_direction_row
orrocsparse_direction_column
[in] mb number of block rows of the general BSR sparse matrix A
.[in] nb number of block columns of the general BSR sparse matrix A
.[in] nnzb number of blocks in the general BSR sparse matrix A
.[in] descr_A the descriptor of the general BSR sparse matrix A
, the supported matrix type is rocsparse_matrix_type_general and also any valid value of therocsparse_index_base
.[in] bsr_row_ptr_A array of mb+1
elements that point to the start of every block row of the sparse general BSR matrixA
.[in] bsr_col_ind_A array of nnzb
elements containing the block column indices of the sparse general BSR matrixA
.[in] row_block_dim_A row size of the blocks in the sparse general BSR matrix A
.[in] col_block_dim_A column size of the blocks in the sparse general BSR matrix A
.[in] descr_C the descriptor of the general BSR sparse matrix C
, the supported matrix type is rocsparse_matrix_type_general and also any valid value of therocsparse_index_base
.[in] bsr_row_ptr_C array of mb_C+1
elements that point to the start of every block row of the sparse general BSR matrixC
wheremb_C=
(m+row_block_dim_C-1)/row_block_dim_C.[in] row_block_dim_C row size of the blocks in the sparse general BSR matrix C
.[in] col_block_dim_C column size of the blocks in the sparse general BSR matrix C
.[out] nnz_total_dev_host_ptr total number of nonzero blocks in general BSR sparse matrix C
stored using device or host memory.[out] temp_buffer buffer allocated by the user whose size is determined by calling rocsparse_xgebsr2gebsr_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 mb
ornb
ornnzb
orrow_block_dim_A
orcol_block_dim_A
orrow_block_dim_C
orcol_block_dim_C
is invalid.rocsparse_status_invalid_pointer bsr_row_ptr_A
orbsr_col_ind_A
orbsr_row_ptr_C
ordescr_A
ordescr_C
ortemp_buffer
pointer is invalid.
Member Function/Subroutine Documentation
◆ rocsparse_gebsr2gebsr_nnz_()
integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_gebsr2gebsr_nnz::rocsparse_gebsr2gebsr_nnz_ | ( | type(c_ptr), value | handle, |
integer(kind(rocsparse_direction_row)), value | dir, | ||
integer(c_int), value | mb, | ||
integer(c_int), value | nb, | ||
integer(c_int), value | nnzb, | ||
type(c_ptr), value | descr_A, | ||
type(c_ptr), value | bsr_row_ptr_A, | ||
type(c_ptr), value | bsr_col_ind_A, | ||
integer(c_int), value | row_block_dim_A, | ||
integer(c_int), value | col_block_dim_A, | ||
type(c_ptr), value | descr_C, | ||
type(c_ptr), value | bsr_row_ptr_C, | ||
integer(c_int), value | row_block_dim_C, | ||
integer(c_int), value | col_block_dim_C, | ||
integer(c_int) | nnz_total_dev_host_ptr, | ||
type(c_ptr), value | temp_buffer | ||
) |
The documentation for this interface was generated from the following file: