Skip to main content

cusparseZcsrilu02

Function cusparseZcsrilu02 

Source
pub unsafe extern "C" fn cusparseZcsrilu02(
    handle: cusparseHandle_t,
    m: c_int,
    nnz: c_int,
    descrA: cusparseMatDescr_t,
    csrSortedValA_valM: *mut cuDoubleComplex,
    csrSortedRowPtrA: *const c_int,
    csrSortedColIndA: *const c_int,
    info: csrilu02Info_t,
    policy: cusparseSolvePolicy_t,
    pBuffer: *mut c_void,
) -> cusparseStatus_t
Expand description

This function performs the solve phase of the incomplete-LU factorization with $0$ fill-in and no pivoting:

A is an $m \times m$ sparse matrix that is defined in CSR storage format by the three arrays csrValA_valM, csrRowPtrA, and csrColIndA.

This function requires a buffer size returned by csrilu02_bufferSize(). The address of pBuffer must be a multiple of 128 bytes. If not, cusparseStatus_t::CUSPARSE_STATUS_INVALID_VALUE is returned.

The matrix type must be cusparseMatrixType_t::CUSPARSE_MATRIX_TYPE_GENERAL. The fill mode and diagonal type are ignored.

Although csrilu02() can be done without level information, the user still needs to be aware of consistency. If csrilu02_analysis() is called with policy cusparseSolvePolicy_t::CUSPARSE_SOLVE_POLICY_USE_LEVEL, csrilu02() can be run with or without levels. On the other hand, if csrilu02_analysis() is called with cusparseSolvePolicy_t::CUSPARSE_SOLVE_POLICY_NO_LEVEL, csrilu02() can only accept cusparseSolvePolicy_t::CUSPARSE_SOLVE_POLICY_NO_LEVEL; otherwise, cusparseStatus_t::CUSPARSE_STATUS_INVALID_VALUE is returned.

Function csrilu02() reports the first numerical zero, including a structural zero. The user must call cusparseXcsrilu02_zeroPivot to know where the numerical zero is.

For example, suppose A is a real $m \times m$ matrix, 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.