rocsparse_spic0 Interface Reference#
Incomplete Cholesky factorization with 0 fill-ins and no pivoting. More...
Public Member Functions | |
| integer(kind(rocsparse_status_success)) function | rocsparse_spic0_ (handle, spic0_descr, a, p, spic0_stage, buffer_size_in_bytes, buffer, p_error) |
Detailed Description
Incomplete Cholesky factorization with 0 fill-ins and no pivoting.
rocsparse_spic0 computes the incomplete Cholesky factorization with 0 fill-ins and no pivoting of a sparse \(m \times m\) matrix \(A\), such that
\[ A \approx LL^T \]
where the lower triangular matrix \(L\) is computed using:
\[ L_{ij} = \left\{ \begin{array}{ll} \sqrt{A_{jj} - \sum_{k=0}^{j-1}(L_{jk})^{2}}, & \text{if i == j} \\% \frac{1}{L_{jj}}(A_{ij} - \sum_{k=0}^{j-1}L_{ik} \times L_{jk}), & \text{if i > j} \end{array} \right. \]
for each entry found in the matrix \(A\).
Performing the above operation requires two stages, the stage rocsparse_spic0_stage_analysis and the stage rocsparse_spic0_stage_compute. The stage rocsparse_spic0_stage_analysis is required to perform the stage rocsparse_spic0_stage_compute and only needs to be called once for a given sparse matrix \(A\), while the stage rocsparse_spic0_stage_compute can be repeatedly used with different matrices \(A\) that have the same sparsity pattern.
rocsparse_spic0 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
spic0_descrneeds to be configured with rocsparse_spic0_set_input. -
The sparse matrix formats currently supported are
rocsparse_format_csrandrocsparse_format_bsr. -
the
rocsparse_spic0_stage_computestage is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished. Therocsparse_spic0_stage_analysisstage is blocking with respect to the host. -
Only the
rocsparse_spic0_stage_computestage supports execution in a hipGraph context. Therocsparse_spic0_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] spic0_descr - Spic0 descriptor [in] A - descriptor of the matrix to factorize. [out] P - descriptor of the factorization. In-place P=Ais allowed.[in] spic0_stage - stage for the Spic0 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 spic0_stagevalue is invalid.rocsparse_status_invalid_pointer spic0_descr,A,P, orbuffer_size_in_bytespointer is invalid.
- Example
Member Function/Subroutine Documentation
◆ rocsparse_spic0_()
| integer(kind(rocsparse_status_success)) function hipfort_rocsparse::rocsparse_spic0::rocsparse_spic0_ | ( | type(c_ptr), value | handle, |
| type(c_ptr), value | spic0_descr, | ||
| type(c_ptr), value | a, | ||
| type(c_ptr), value | p, | ||
| integer(kind(rocsparse_spic0_stage_analysis)), value | spic0_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: