rocsparse_spic0 Interface Reference

rocsparse_spic0 Interface Reference#

HIPFORT API Reference: hipfort_rocsparse::rocsparse_spic0 Interface Reference
hipfort_rocsparse::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_descr needs to be configured with rocsparse_spic0_set_input.
The sparse matrix formats currently supported are rocsparse_format_csr and rocsparse_format_bsr.
the rocsparse_spic0_stage_compute stage is non-blocking and executed asynchronously with respect to the host. It can return before the actual computation has finished. The rocsparse_spic0_stage_analysis stage is blocking with respect to the host.
Only the rocsparse_spic0_stage_compute stage supports execution in a hipGraph context. The rocsparse_spic0_stage_analysis stage 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 = A is 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_successthe operation completed successfully.
rocsparse_status_invalid_handlethe library context was not initialized.
rocsparse_status_not_implementedthe sparse format is invalid or the preconditioner P is not identical to the matrix to factorize A.
rocsparse_status_invalid_valuethe spic0_stage value is invalid.
rocsparse_status_invalid_pointerspic0_descr, A, P, or buffer_size_in_bytes pointer 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: