rocsparse_sbsrilu0 Interface Reference#
Incomplete LU factorization with 0 fill-ins and no pivoting using the BSR storage format. More...
Public Member Functions | |
| integer(kind(rocsparse_status_success)) function | rocsparse_sbsrilu0_ (handle, dir, mb, nnzb, descr, bsr_val, bsr_row_ptr, bsr_col_ind, block_dim, myinfo, policy, temp_buffer) |
| integer(kind(rocsparse_status_success)) function | rocsparse_sbsrilu0_rank_0 (handle, dir, mb, nnzb, descr, bsr_val, bsr_row_ptr, bsr_col_ind, block_dim, myinfo, policy, temp_buffer) |
| integer(kind(rocsparse_status_success)) function | rocsparse_sbsrilu0_rank_1 (handle, dir, mb, nnzb, descr, bsr_val, bsr_row_ptr, bsr_col_ind, block_dim, myinfo, policy, temp_buffer) |
Detailed Description
Incomplete LU factorization with 0 fill-ins and no pivoting using the BSR storage format.
rocsparse_bsrilu0 computes the incomplete LU factorization with 0 fill-ins and no pivoting of a sparse \(mb \times mb\) BSR matrix \(A\), such that
\[ A \approx LU \]
Computing the above incomplete LU factorization requires three steps to complete. First, determine the size of the required temporary storage buffer by calling rocsparse_Xbsrilu0_buffer_size(). After this buffer size has been determined, allocate the buffer and pass it to rocsparse_Xbsrilu0_analysis(). This will perform analysis on the sparsity pattern of the matrix. Finally, call rocsparse_sbsrilu0, rocsparse_dbsrilu0, rocsparse_cbsrilu0, or rocsparse_zbsrilu0 to perform the actual factorization. The calculation of the buffer size and the analysis of the sparse matrix only need to be performed once for a given sparsity pattern, while the factorization can be repeatedly applied to multiple matrices having the same sparsity pattern. After all calls to rocsparse_Xbsrilu0() are complete, the temporary buffer can be deallocated.
rocsparse_bsrilu0 reports the first zero pivot (either numerical or structural zero). The zero pivot status can be obtained by calling rocsparse_bsrilu0_zero_pivot().
- 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] dir - direction that specified whether to count non-zero elements by rocsparse_direction_rowor byrocsparse_direction_column.[in] mb - number of block rows in the sparse BSR matrix. [in] nnzb - number of non-zero block entries of the sparse BSR matrix. [in] descr - descriptor of the sparse BSR matrix. [in,out] bsr_val - array of length nnzb*block_dim*block_dimcontaining the values 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.[in] block_dim - the block dimension of the BSR matrix. Between 1 and m, where m=mb*block_dim.[in] myInfo - structure that holds the information collected during the analysis step. [in] policy - rocsparse_solve_policy_auto.[in] temp_buffer - temporary storage buffer allocated by the user.
- Return values
-
rocsparse_status_success the operation completed successfully. rocsparse_status_invalid_handle the library context was not initialized. rocsparse_status_invalid_size mb,nnzb, orblock_dimis invalid.rocsparse_status_invalid_pointer descr,bsr_val,bsr_row_ptr, orbsr_col_indpointer is invalid.rocsparse_status_arch_mismatch the device is not supported. rocsparse_status_internal_error an internal error occurred. rocsparse_status_not_implemented rocsparse_matrix_type!=rocsparse_matrix_type_general.
- Example
- Consider the sparse \(m \times m\) matrix \(A\), stored in the BSR storage format. The following example computes the incomplete LU factorization \(M \approx LU\) and solves the preconditioned system \(My = x\).
Member Function/Subroutine Documentation
◆ rocsparse_sbsrilu0_()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sbsrilu0::rocsparse_sbsrilu0_ | ( | type(c_ptr), value | handle, |
| integer(kind(rocsparse_direction_row)), value | dir, | ||
| integer(c_int), value | mb, | ||
| integer(c_int), value | nnzb, | ||
| type(c_ptr), value | descr, | ||
| type(c_ptr), value | bsr_val, | ||
| type(c_ptr), value | bsr_row_ptr, | ||
| type(c_ptr), value | bsr_col_ind, | ||
| integer(c_int), value | block_dim, | ||
| type(c_ptr), value | myinfo, | ||
| integer(kind(rocsparse_solve_policy_auto)), value | policy, | ||
| type(c_ptr), value | temp_buffer | ||
| ) |
◆ rocsparse_sbsrilu0_rank_0()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sbsrilu0::rocsparse_sbsrilu0_rank_0 | ( | type(c_ptr) | handle, |
| integer(kind(rocsparse_direction_row)) | dir, | ||
| integer(c_int) | mb, | ||
| integer(c_int) | nnzb, | ||
| type(c_ptr) | descr, | ||
| real(c_float), target | bsr_val, | ||
| integer(c_int), target | bsr_row_ptr, | ||
| integer(c_int), target | bsr_col_ind, | ||
| integer(c_int) | block_dim, | ||
| type(c_ptr) | myinfo, | ||
| integer(kind(rocsparse_solve_policy_auto)) | policy, | ||
| type(c_ptr) | temp_buffer | ||
| ) |
◆ rocsparse_sbsrilu0_rank_1()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_sbsrilu0::rocsparse_sbsrilu0_rank_1 | ( | type(c_ptr) | handle, |
| integer(kind(rocsparse_direction_row)) | dir, | ||
| integer(c_int) | mb, | ||
| integer(c_int) | nnzb, | ||
| type(c_ptr) | descr, | ||
| real(c_float), dimension(:), target | bsr_val, | ||
| integer(c_int), dimension(:), target | bsr_row_ptr, | ||
| integer(c_int), dimension(:), target | bsr_col_ind, | ||
| integer(c_int) | block_dim, | ||
| type(c_ptr) | myinfo, | ||
| integer(kind(rocsparse_solve_policy_auto)) | policy, | ||
| type(c_ptr) | temp_buffer | ||
| ) |
The documentation for this interface was generated from the following file: