rocsparse_gebsr2gebsr_nnz Interface Reference

rocsparse_gebsr2gebsr_nnz Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::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]handlehandle to the rocsparse library context queue.
[in]dirthe storage format of the blocks, rocsparse_direction_row or rocsparse_direction_column
[in]mbnumber of block rows of the general BSR sparse matrix A.
[in]nbnumber of block columns of the general BSR sparse matrix A.
[in]nnzbnumber of blocks in the general BSR sparse matrix A.
[in]descr_Athe descriptor of the general BSR sparse matrix A, the supported matrix type is rocsparse_matrix_type_general and also any valid value of the rocsparse_index_base.
[in]bsr_row_ptr_Aarray of mb+1 elements that point to the start of every block row of the sparse general BSR matrix A.
[in]bsr_col_ind_Aarray of nnzb elements containing the block column indices of the sparse general BSR matrix A.
[in]row_block_dim_Arow size of the blocks in the sparse general BSR matrix A.
[in]col_block_dim_Acolumn size of the blocks in the sparse general BSR matrix A.
[in]descr_Cthe descriptor of the general BSR sparse matrix C, the supported matrix type is rocsparse_matrix_type_general and also any valid value of the rocsparse_index_base.
[in]bsr_row_ptr_Carray of mb_C+1 elements that point to the start of every block row of the sparse general BSR matrix C where mb_C=(m+row_block_dim_C-1)/row_block_dim_C.
[in]row_block_dim_Crow size of the blocks in the sparse general BSR matrix C.
[in]col_block_dim_Ccolumn size of the blocks in the sparse general BSR matrix C.
[out]nnz_total_dev_host_ptrtotal number of nonzero blocks in general BSR sparse matrix C stored using device or host memory.
[out]temp_bufferbuffer allocated by the user whose size is determined by calling rocsparse_xgebsr2gebsr_buffer_size().
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizemb or nb or nnzb or row_block_dim_A or col_block_dim_A or row_block_dim_C or col_block_dim_C is invalid.
rocsparse_status_invalid_pointerbsr_row_ptr_A or bsr_col_ind_A or bsr_row_ptr_C or descr_A or descr_C or temp_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: