CPPRFS(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

🌸 CPPRFS(3) β€” like, the whole entire cpprfs.f situation πŸ’…

okay bestie, so this page lives at /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/cpprfs.f and it's part of the LAPACK library functions manual. it's a Fortran thing. it's giving ✨linear algebra✨. stay with me, i promise it slaps.


✨ SYNOPSIS ✨

🫢 Functions/Subroutines

the main character herself:

subroutine CPPRFS (uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr,
    work, rwork, info)

and yes, that's CPPRFS β€” say it with your chest.


πŸŽ€ Function/Subroutine Documentation πŸŽ€

here's the full signature, every last character of it, no cap:

subroutine CPPRFS (character uplo, integer n, integer nrhs, complex,
    dimension( * ) ap, complex, dimension( * ) afp, complex, dimension( ldb,
    * ) b, integer ldb, complex, dimension( ldx, * ) x, integer ldx, real,
    dimension( * ) ferr, real, dimension( * ) berr, complex, dimension( * )
    work, real, dimension( * ) rwork, integer info)

CPPRFS πŸ’«

🌈 Purpose:

so what does she do? literally this:

!>
!> CPPRFS improves the computed solution to a system of linear
!> equations when the coefficient matrix is Hermitian positive definite
!> and packed, and provides error bounds and backward error estimates
!> for the solution.
!>

translation: you already have a solution, she makes it better, and then she tells you how wrong you possibly still are. icon behaviour. πŸ‘‘


πŸ’– Parameters πŸ’–

every single one, in order, no skips:

  • UPLO β€” is CHARACTER*1. which triangle of A are we even talking about?
!>          UPLO is CHARACTER*1
!>          = 'U':  Upper triangle of A is stored;
!>          = 'L':  Lower triangle of A is stored.
!>
  • N β€” is INTEGER. the order of the matrix A. and it's gotta be N >= 0.
!>          N is INTEGER
!>          The order of the matrix A.  N >= 0.
!>
  • NRHS β€” is INTEGER. the number of right hand sides, aka the number of columns of the matrices B and X. NRHS >= 0. yes bestie, plural right hand sides, she's versatile πŸ’…
!>          NRHS is INTEGER
!>          The number of right hand sides, i.e., the number of columns
!>          of the matrices B and X.  NRHS >= 0.
!>
  • AP β€” is COMPLEX array, dimension (N*(N+1)/2). the upper or lower triangle of the Hermitian matrix A, packed columnwise in a linear array. the j-th column of A goes into AP like this:
!>          AP is COMPLEX array, dimension (N*(N+1)/2)
!>          The upper or lower triangle of the Hermitian matrix A, packed
!>          columnwise in a linear array.  The j-th column of A is stored
!>          in the array AP as follows:
!>          if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
!>          if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
!>

lowkey those index formulas are a whole vibe. memorize them or don't, but they're there. πŸ™ˆ

  • AFP β€” is COMPLEX array, dimension (N*(N+1)/2). it's the triangular factor U or L from the Cholesky factorization A = U**H*U or A = L*L**H, as computed by SPPTRF/CPPTRF, packed columnwise in a linear array in the same format as A (see AP).
!>          AFP is COMPLEX array, dimension (N*(N+1)/2)
!>          The triangular factor U or L from the Cholesky factorization
!>          A = U**H*U or A = L*L**H, as computed by SPPTRF/CPPTRF,
!>          packed columnwise in a linear array in the same format as A
!>          (see AP).
!>
  • B β€” is COMPLEX array, dimension (LDB,NRHS). it's the right hand side matrix B. that's it, that's her.
!>          B is COMPLEX array, dimension (LDB,NRHS)
!>          The right hand side matrix B.
!>
  • LDB β€” is INTEGER. the leading dimension of the array B. LDB >= max(1,N). respect the bounds fr fr.
!>          LDB is INTEGER
!>          The leading dimension of the array B.  LDB >= max(1,N).
!>
  • X β€” is COMPLEX array, dimension (LDX,NRHS). on entry, it's the solution matrix X, as computed by CPPTRS. on exit, it's the improved solution matrix X. she went in mid and came out iconic, we love a glow-up πŸ¦‹
!>          X is COMPLEX array, dimension (LDX,NRHS)
!>          On entry, the solution matrix X, as computed by CPPTRS.
!>          On exit, the improved solution matrix X.
!>
  • LDX β€” is INTEGER. the leading dimension of the array X. LDX >= max(1,N).
!>          LDX is INTEGER
!>          The leading dimension of the array X.  LDX >= max(1,N).
!>
  • FERR β€” is REAL array, dimension (NRHS). the estimated forward error bound for each solution vector X(j) (the j-th column of the solution matrix X). if XTRUE is the true solution corresponding to X(j), then FERR(j) is an estimated upper bound for the magnitude of the largest element in (X(j) - XTRUE) divided by the magnitude of the largest element in X(j). the estimate is as reliable as the estimate for RCOND, and is almost always a slight overestimate of the true error. so she's honest, but she's a little dramatic about it 😭
!>          FERR is REAL array, dimension (NRHS)
!>          The estimated forward error bound for each solution vector
!>          X(j) (the j-th column of the solution matrix X).
!>          If XTRUE is the true solution corresponding to X(j), FERR(j)
!>          is an estimated upper bound for the magnitude of the largest
!>          element in (X(j) - XTRUE) divided by the magnitude of the
!>          largest element in X(j).  The estimate is as reliable as
!>          the estimate for RCOND, and is almost always a slight
!>          overestimate of the true error.
!>
  • BERR β€” is REAL array, dimension (NRHS). the componentwise relative backward error of each solution vector X(j) (i.e., the smallest relative change in any element of A or B that makes X(j) an exact solution). tiny changes, big consequences, we stan 🫢
!>          BERR is REAL array, dimension (NRHS)
!>          The componentwise relative backward error of each solution
!>          vector X(j) (i.e., the smallest relative change in
!>          any element of A or B that makes X(j) an exact solution).
!>
  • WORK β€” is COMPLEX array, dimension (2*N). scratch space. the little backstage area. ✨
!>          WORK is COMPLEX array, dimension (2*N)
!>
  • RWORK β€” is REAL array, dimension (N). more scratch space, but make it real.
!>          RWORK is REAL array, dimension (N)
!>
  • INFO β€” is INTEGER. the vibe check of the whole call:
!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!>

so 0 means you ate πŸ’… and anything negative means some argument misbehaved and she's telling you exactly which one.


⭐ Internal Parameters ⭐

just one, and it's doing the most:

!>  ITMAX is the maximum number of steps of iterative refinement.
!>

that's her budget, bestie. iterative refinement only gets so many tries. πŸŽ€


πŸ‘‘ Author πŸ‘‘

shoutout to the whole squad:

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Definition at line 169 of file cpprfs.f. (yes, line one-six-nine. iconic number, no notes. πŸ’€)


🌸 Author 🌸

this page was generated automatically by Doxygen for LAPACK from the source code. so nobody wrote this for you, a robot did, and honestly? she understood the assignment. 🧚


ngl if you skipped the packed-storage index formulas in AP, go back. they will find you. πŸ”₯

okay that's the whole page, mwah, ily, go fix some linear systems πŸ’–

LAPACK β€” Version 3.12.0 β€” this whole fairy godmother moment was brought to you by /home/abui...RC/cpprfs.f(3), see you in the group chat πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from