rocsolver_scsrrf_solve Interface Reference

rocsolver_scsrrf_solve Interface Reference#

HIPFORT API Reference: hipfort_rocsolver::rocsolver_scsrrf_solve Interface Reference
hipfort_rocsolver::rocsolver_scsrrf_solve Interface Reference

The CSRRF_SOLVE functions solve a linear system with sparse coefficient matrix \(A\) in its factorized form. More...

Public Member Functions

integer(kind(rocblas_status_success)) function rocsolver_scsrrf_solve_ (handle, n, nrhs, nnzt, ptrt, indt, valt, pivp, pivq, b, ldb, rfinfo)
 

Detailed Description

The CSRRF_SOLVE functions solve a linear system with sparse coefficient matrix \(A\) in its factorized form.

The linear system is of the form

\[ AX = B \]

where the sparse matrix \(A\) is factorized as

\[ Q^TAQ = L_AL_A^T \]

(Cholesky factorization for the symmetric positive definite case), or

\[ PAQ = L_AU_A \]

(LU factorization for the general case),

and \(B\) is a dense matrix of right hand sides.

This function supposes that rfinfo has been updated by function CSRRF_ANALYSIS after the analysis phase. Both functions, CSRRF_ANALYSIS and CSRRF_SOLVE, must be run with the same rfinfo mode (LU or Cholesky factorization), otherwise, the workflow will result in an error.

For the LU factorization mode, the LU factors \(L_A\) and \(U_A\) must be passed in a bundle matrix \(T=(L_A-I)+U_A\), as returned by CSRRF_REFACTLU or CSRRF_SUMLU. For the Cholesky mode, the lower triangular part of \(T\) must contain the Cholesky factor \(L_A\), and the strictly upper triangular part of \(T\) will be ignored.

Parameters
[in]handle- rocblas_handle.
[in]n- rocblas_int. n >= 0. The number of rows (and columns) of matrix A.
[in]nrhs- rocblas_int. nrhs >= 0. The number of right hand sides, that is, the number of columns of matrix B.
[in]nnzT- rocblas_int. nnzT >= 0. The number of non-zero elements in T.
[in]ptrT- pointer to rocblas_int. Array on the GPU of dimension n+1. It contains the positions of the beginning of each row in indT and valT. The last element of ptrT is equal to nnzT.
[in]indT- pointer to rocblas_int. Array on the GPU of dimension nnzT. It contains the column indices of the non-zero elements of T. Indices are sorted by row and by column within each row.
[in]valT- pointer to type. Array on the GPU of dimension nnzT. The values of the non-zero elements of T. The strictly upper triangular entries are not referenced when working in Cholesky mode.
[in]pivP- pointer to rocblas_int. Array on the GPU of dimension n. Contains the pivot indices representing the permutation matrix P, that is, the order in which the rows of matrix A were rearranged. When working in Cholesky mode, this array is not referenced and can be null.
[in]pivQ- pointer to rocblas_int. Array on the GPU of dimension n. Contains the pivot indices representing the permutation matrix Q, that is, the order in which the columns of matrix A were rearranged.
[in,out]B- pointer to type. Array on the GPU of dimension ldb*nrhs. On entry the right hand side matrix B. On exit, the solution matrix X.
[in]ldb- rocblas_int. ldb >= n. The leading dimension of B.
[in]rfinfo- rocsolver_rfinfo. Structure that holds the metadata generated in the analysis phase.

Member Function/Subroutine Documentation

◆ rocsolver_scsrrf_solve_()

integer(kind(rocblas_status_success)) function hipfort_rocsolver::rocsolver_scsrrf_solve::rocsolver_scsrrf_solve_ ( type(c_ptr), value  handle,
integer(c_int), value  n,
integer(c_int), value  nrhs,
integer(c_int), value  nnzt,
type(c_ptr), value  ptrt,
type(c_ptr), value  indt,
type(c_ptr), value  valt,
type(c_ptr), value  pivp,
type(c_ptr), value  pivq,
type(c_ptr), value  b,
integer(c_int), value  ldb,
type(c_ptr), value  rfinfo 
)

The documentation for this interface was generated from the following file: