rocsparse_sbsrpad_value Interface Reference#
hipfort_rocsparse::rocsparse_sbsrpad_value Interface Reference
Pads a value to the diagonal of the last block (if the last block is a diagonal block) in the sparse BSR matrix when the matrix expands outside m x m.
More...
Public Member Functions | |
| integer(kind(rocsparse_status_success)) function | rocsparse_sbsrpad_value_ (handle, m, mb, nnzb, block_dim, myvalue, bsr_descr, bsr_val, bsr_row_ptr, bsr_col_ind) |
Detailed Description
Pads a value to the diagonal of the last block (if the last block is a diagonal block) in the sparse BSR matrix when the matrix expands outside m x m.
When converting from a CSR matrix to a BSR matrix, the resulting BSR matrix will be larger when m < mb * block_dim. In these situations, the CSR to BSR conversion will expand the BSR matrix to have zeros when outside m x m. This routine converts the resulting BSR matrix to one that has a value on the last diagonal blocks diagonal if this last block is a diagonal block in the BSR matrix.
- Note
- This function is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished.
- This routine supports execution in a hipGraph context.
- Parameters
-
[in] handle - handle to the rocSPARSE library context queue. [in] m - number of rows of the sparse BSR matrix. [in] mb - number of block rows of the sparse BSR matrix. [in] nnzb - number of non-zero blocks of the sparse BSR matrix. [in] block_dim - block dimension of the sparse BSR matrix. [in] myValue - scalar value that is set on the diagonal of the last block when the matrix expands outside of mxm.[in] bsr_descr - descriptor of the sparse BSR matrix. Currently, only rocsparse_matrix_type_generalis supported.[in,out] bsr_val - array of nnzbblocks of the sparse BSR matrix.[in] bsr_row_ptr - array of mb+1elements that point to the start of every block row of the sparse BSR matrix.[in] bsr_col_ind - array of nnzbelements containing the block column indices of the sparse BSR matrix.
- Return values
-
rocsparse_status_success the operation completed successfully. rocsparse_status_invalid_handle the library context was not initialized. rocsparse_status_invalid_size m,mb,nnzb, orblock_dimis invalid.rocsparse_status_invalid_pointer bsr_descr,bsr_val,bsr_row_ind, orbsr_col_indpointer is invalid.
Member Function/Subroutine Documentation
◆ rocsparse_sbsrpad_value_()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sbsrpad_value::rocsparse_sbsrpad_value_ | ( | type(c_ptr), value | handle, |
| integer(c_int), value | m, | ||
| integer(c_int), value | mb, | ||
| integer(c_int), value | nnzb, | ||
| integer(c_int), value | block_dim, | ||
| real(c_float), value | myvalue, | ||
| type(c_ptr), value | bsr_descr, | ||
| type(c_ptr), value | bsr_val, | ||
| type(c_ptr), value | bsr_row_ptr, | ||
| type(c_ptr), value | bsr_col_ind | ||
| ) |
The documentation for this interface was generated from the following file: