pub unsafe extern "C" fn cusparseZbsrilu02(
handle: cusparseHandle_t,
dirA: cusparseDirection_t,
mb: c_int,
nnzb: c_int,
descrA: cusparseMatDescr_t,
bsrSortedVal: *mut cuDoubleComplex,
bsrSortedRowPtr: *const c_int,
bsrSortedColInd: *const c_int,
blockDim: c_int,
info: bsrilu02Info_t,
policy: cusparseSolvePolicy_t,
pBuffer: *mut c_void,
) -> cusparseStatus_tExpand description
This function performs the solve phase of the incomplete-LU factorization with 0 fill-in and no pivoting.
A is an (mb*blockDim)×(mb*blockDim) sparse matrix that is defined in BSR storage format by the three arrays bsrValA, bsrRowPtrA, and bsrColIndA. The block in BSR format is of size blockDim*blockDim, stored as column-major or row-major determined by parameter dirA, which is either cusparseDirection_t::CUSPARSE_DIRECTION_COLUMN or cusparseDirection_t::CUSPARSE_DIRECTION_ROW. The matrix type must be cusparseMatrixType_t::CUSPARSE_MATRIX_TYPE_GENERAL, and the fill mode and diagonal type are ignored. Function bsrilu02() supports an arbitrary blockDim.
This function requires a buffer size returned by bsrilu02_bufferSize(). The address of pBuffer must be a multiple of 128 bytes. If it is not, cusparseStatus_t::CUSPARSE_STATUS_INVALID_VALUE is returned.
Although bsrilu02() can be used without level information, the user must be aware of consistency. If bsrilu02_analysis() is called with policy cusparseSolvePolicy_t::CUSPARSE_SOLVE_POLICY_USE_LEVEL, bsrilu02() can be run with or without levels. On the other hand, if bsrilu02_analysis() is called with cusparseSolvePolicy_t::CUSPARSE_SOLVE_POLICY_NO_LEVEL, bsrilu02() can only accept cusparseSolvePolicy_t::CUSPARSE_SOLVE_POLICY_NO_LEVEL; otherwise, cusparseStatus_t::CUSPARSE_STATUS_INVALID_VALUE is returned.
Function bsrilu02() has the same behavior as csrilu02(). That is, bsr2csr(bsrilu02(A)) = csrilu02(bsr2csr(A)). The numerical zero of csrilu02() means there exists some zero U(j,j). The numerical zero of bsrilu02() means there exists some block U(j,j) that is not invertible.
Function bsrilu02 reports the first numerical zero, including a structural zero. The user must call cusparseXbsrilu02_zeroPivot to know where the numerical zero is.
For example, suppose A is a real m-by-m matrix where m=mb*blockDim. The following code solves precondition system M*y = x, where M is the product of LU factors L and U.
The function supports the following properties if pBuffer != NULL:
- The routine requires no extra storage.
- The routine supports asynchronous execution.
- The routine supports CUDA graph capture.