rocsparse_spildlt0 Interface Reference#
Incomplete \(LDL^H\) factorization with 0 fill-ins and no pivoting. More...
Public Member Functions | |
| integer(kind(rocsparse_status_success)) function | rocsparse_spildlt0_ (handle, spildlt0_descr, a, p, spildlt0_stage, buffer_size_in_bytes, buffer, p_error) |
Detailed Description
Incomplete \(LDL^H\) factorization with 0 fill-ins and no pivoting.
rocsparse_spildlt0 computes the incomplete \(LDL^H\) factorization with 0 fill-ins and no pivoting of a sparse \(m \times m\) Hermitian (or symmetric for real types) matrix \(A\), such that
\[ A \approx L D L^H \]
where \(L\) is unit lower triangular and \(D\) is a real diagonal matrix.
The diagonal entries of \(D\) are computed as:
\[ D_i = \mathrm{real}(A_{ii}) - \sum_{k<i} |L_{ik}|^2 D_k \]
and the off-diagonal entries of \(L\) as:
\[ L_{ij} = \frac{1}{D_j} \left( A_{ij} - \sum_{k<j} L_{ik} D_k \overline{L_{jk}} \right) \]
for each entry found in the lower triangular part of the matrix \(A\).
Performing the above operation requires two stages, the stage rocsparse_spildlt0_stage_analysis and the stage rocsparse_spildlt0_stage_compute. The stage rocsparse_spildlt0_stage_analysis is required to perform the stage rocsparse_spildlt0_stage_compute and only needs to be called once for a given sparse matrix \(A\), while the stage rocsparse_spildlt0_stage_compute can be repeatedly used with different matrices \(A\) that have the same sparsity pattern.
The factorization overwrites the values array of P with \(L + D - I\): the strict lower-triangular entries hold \(L\) (its unit diagonal is implicit), and the diagonal entries hold the real diagonal \(D\).
rocsparse_spildlt0 supports the following data types for A : rocsparse_datatype_f32_r, rocsparse_datatype_f64_r, rocsparse_datatype_f32_c, and rocsparse_datatype_f64_c.
- Note
- The descriptor
spildlt0_descrneeds to be configured with rocsparse_spildlt0_set_input. -
The sparse matrix format currently supported is
rocsparse_format_csr. -
the
rocsparse_spildlt0_stage_computestage is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished. Therocsparse_spildlt0_stage_analysisstage is blocking with respect to the host. -
Only the
rocsparse_spildlt0_stage_computestage supports execution in a hipGraph context. Therocsparse_spildlt0_stage_analysisstage does not support hipGraph. - This routine only supports uniform strided batched computation, that is, the same sparsity pattern but strided batched values of the matrices.
- Parameters
-
[in] handle - handle to the rocSPARSE library context queue. [in] spildlt0_descr - SpILDLT0 descriptor. [in] A - descriptor of the matrix to factorize. [out] P - descriptor of the factorization. In-place P=Ais allowed.[in] spildlt0_stage - stage for the SpILDLT0 computation. [in] buffer_size_in_bytes - number of bytes of the buffer. [in] buffer - buffer allocated by the user. [out] p_error - error descriptor created if the returned status is not rocsparse_status_success. A null pointer can be passed if an error descriptor is not required.
- Return values
-
rocsparse_status_success the operation completed successfully. rocsparse_status_invalid_handle the library context was not initialized. rocsparse_status_not_implemented the sparse format is invalid or the preconditioner Pis not identical to the matrix to factorizeA.rocsparse_status_invalid_value the spildlt0_stagevalue is invalid.rocsparse_status_invalid_pointer spildlt0_descr,A,P, orbuffer_size_in_bytespointer is invalid.
- Example
Member Function/Subroutine Documentation
◆ rocsparse_spildlt0_()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_spildlt0::rocsparse_spildlt0_ | ( | type(c_ptr), value | handle, |
| type(c_ptr), value | spildlt0_descr, | ||
| type(c_ptr), value | a, | ||
| type(c_ptr), value | p, | ||
| integer(kind(rocsparse_spildlt0_stage_analysis)), value | spildlt0_stage, | ||
| integer(c_size_t), value | buffer_size_in_bytes, | ||
| type(c_ptr), value | buffer, | ||
| type(c_ptr) | p_error | ||
| ) |
The documentation for this interface was generated from the following file: