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_noneis supported. -
Currently, only
rocsparse_matrix_type_generalis 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_rowor byrocsparse_direction_columnin 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_generalis supported.[in] nnzb_A - number of non-zero block entries of the sparse BSR matrix \(A\). [in] bsr_row_ptr_A - array of mb+1block elements ( \(op(A) == A\),kb+1otherwise) that point to the start of every row of the sparse BSR matrix \(op(A)\).[in] bsr_col_ind_A - array of nnzb_Ablock 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_generalis supported.[in] nnzb_B - number of non-zero block entries of the sparse BSR matrix \(B\). [in] bsr_row_ptr_B - array of kb+1block elements ( \(op(B) == B\),mb+1otherwise) that point to the start of every block row of the sparse BSR matrix \(op(B)\).[in] bsr_col_ind_B - array of nnzb_Bblock 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_generalis supported.[in] nnzb_D - number of non-zero block entries of the sparse BSR matrix \(D\). [in] bsr_row_ptr_D - array of mb+1block elements that point to the start of every block row of the sparse BSR matrix \(D\).[in] bsr_col_ind_D - array of nnzb_Dblock 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_generalis supported.[out] bsr_row_ptr_C - array of mb+1block 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_success the operation completed successfully. rocsparse_status_invalid_handle the library context was not initialized. rocsparse_status_invalid_size mb,nb,kb,block_dim,nnzb_A,nnzb_B, ornnzb_Dis invalid.rocsparse_status_invalid_pointer descr_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, ortemp_bufferis invalid.rocsparse_status_memory_error additional buffer for long rows could not be allocated. rocsparse_status_not_implemented trans_A!=rocsparse_operation_none,trans_B!=rocsparse_operation_none, orrocsparse_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: