rocsparse_bsrgemm_nnzb Interface Reference

rocsparse_bsrgemm_nnzb Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_bsrgemm_nnzb Interface Reference
hipfort_rocsparse::rocsparse_bsrgemm_nnzb Interface Reference

Public Member Functions

integer(kind(rocsparse_status_success)) function rocsparse_bsrgemm_nnzb_ (handle, dir, trans_a, trans_b, mb, nb, kb, block_dim, descr_a, nnzb_a, bsr_row_ptr_a, bsr_col_ind_a, descr_b, nnzb_b, bsr_row_ptr_b, bsr_col_ind_b, descr_d, nnzb_d, bsr_row_ptr_d, bsr_col_ind_d, descr_c, bsr_row_ptr_c, nnzb_c, info_c, temp_buffer)
 

Detailed Description

rocsparse_bsrgemm_nnzb computes the total BSR non-zero block elements and the BSR block row offsets that point to the start of every block row of the sparse BSR matrix of the resulting multiplied matrix C. It is assumed that bsr_row_ptr_C has been allocated with size mb+1. The required buffer size can be obtained by rocsparse_Xbsrgemm_buffer_size().

Note
This function is blocking with respect to the host.
Currently, only trans_A == trans_B == rocsparse_operation_none is supported.
Currently, only rocsparse_matrix_type_general is supported.
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_row or by rocsparse_direction_column in the BSR matrices \(A\), \(B\), \(C\), and \(D\).
[in]trans_A- matrix \(A\) operation type.
[in]trans_B- matrix \(B\) operation type.
[in]mb- number of block rows in the sparse BSR matrix \(op(A)\) and \(C\).
[in]nb- number of block columns of the sparse BSR matrix \(op(B)\) and \(C\).
[in]kb- number of block columns of the sparse BSR matrix \(op(A)\) and number of rows of the sparse BSR matrix \(op(B)\).
[in]block_dim- the block dimension of the BSR matrix \(A\), \(B\), \(C\), and \(D\).
[in]descr_A- descriptor of the sparse BSR matrix \(A\). Currently, only rocsparse_matrix_type_general is supported.
[in]nnzb_A- number of non-zero block entries of the sparse BSR matrix \(A\).
[in]bsr_row_ptr_A- array of mb+1 block elements ( \(op(A) == A\), kb+1 otherwise) that point to the start of every row of the sparse BSR matrix \(op(A)\).
[in]bsr_col_ind_A- array of nnzb_A block elements containing the block column indices of the sparse BSR matrix \(A\).
[in]descr_B- descriptor of the sparse BSR matrix \(B\). Currently, only rocsparse_matrix_type_general is supported.
[in]nnzb_B- number of non-zero block entries of the sparse BSR matrix \(B\).
[in]bsr_row_ptr_B- array of kb+1 block elements ( \(op(B) == B\), mb+1 otherwise) that point to the start of every block row of the sparse BSR matrix \(op(B)\).
[in]bsr_col_ind_B- array of nnzb_B block elements containing the block column indices of the sparse BSR matrix \(B\).
[in]descr_D- descriptor of the sparse BSR matrix \(D\). Currently, only rocsparse_matrix_type_general is supported.
[in]nnzb_D- number of non-zero block entries of the sparse BSR matrix \(D\).
[in]bsr_row_ptr_D- array of mb+1 block elements that point to the start of every block row of the sparse BSR matrix \(D\).
[in]bsr_col_ind_D- array of nnzb_D block elements containing the block column indices of the sparse BSR matrix \(D\).
[in]descr_C- descriptor of the sparse BSR matrix \(C\). Currently, only rocsparse_matrix_type_general is supported.
[out]bsr_row_ptr_C- array of mb+1 block elements that point to the start of every block row of the sparse BSR matrix \(C\).
[out]nnzb_C- pointer to the number of non-zero block entries of the sparse BSR matrix \(C\).
[in]info_C- structure that holds metadata for the sparse BSR matrix \(C\).
[in]temp_buffer- temporary storage buffer allocated by the user. The size is returned by rocsparse_sbsrgemm_buffer_size(), rocsparse_dbsrgemm_buffer_size(), rocsparse_cbsrgemm_buffer_size(), or rocsparse_zbsrgemm_buffer_size().
Return values
rocsparse_status_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_invalid_sizemb, nb, kb, block_dim, nnzb_A, nnzb_B, or nnzb_D is invalid.
rocsparse_status_invalid_pointerdescr_A, bsr_row_ptr_A, bsr_col_ind_A, descr_B, bsr_row_ptr_B, bsr_col_ind_B, descr_D, bsr_row_ptr_D, bsr_col_ind_D, descr_C, bsr_row_ptr_C, nnzb_C, info_C, or temp_buffer is invalid.
rocsparse_status_memory_erroradditional buffer for long rows could not be allocated.
rocsparse_status_not_implementedtrans_A != rocsparse_operation_none, trans_B != rocsparse_operation_none, or rocsparse_matrix_type != rocsparse_matrix_type_general.

Member Function/Subroutine Documentation

◆ rocsparse_bsrgemm_nnzb_()

integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_bsrgemm_nnzb::rocsparse_bsrgemm_nnzb_ ( type(c_ptr), value  handle,
integer(kind(rocsparse_direction_row)), value  dir,
integer(kind(rocsparse_operation_none)), value  trans_a,
integer(kind(rocsparse_operation_none)), value  trans_b,
integer(c_int), value  mb,
integer(c_int), value  nb,
integer(c_int), value  kb,
integer(c_int), value  block_dim,
type(c_ptr), value  descr_a,
integer(c_int), value  nnzb_a,
type(c_ptr), value  bsr_row_ptr_a,
type(c_ptr), value  bsr_col_ind_a,
type(c_ptr), value  descr_b,
integer(c_int), value  nnzb_b,
type(c_ptr), value  bsr_row_ptr_b,
type(c_ptr), value  bsr_col_ind_b,
type(c_ptr), value  descr_d,
integer(c_int), value  nnzb_d,
type(c_ptr), value  bsr_row_ptr_d,
type(c_ptr), value  bsr_col_ind_d,
type(c_ptr), value  descr_c,
type(c_ptr), value  bsr_row_ptr_c,
type(c_ptr), value  nnzb_c,
type(c_ptr), value  info_c,
type(c_ptr), value  temp_buffer 
)

The documentation for this interface was generated from the following file: