herfs#

Functions

void cherfs(
    const char*          uplo,
    const INT            n,
    const INT            nrhs,
    const c64*  restrict A,
    const INT            lda,
    const c64*  restrict AF,
    const INT            ldaf,
    const INT*  restrict ipiv,
    const c64*  restrict B,
    const INT            ldb,
          c64*  restrict X,
    const INT            ldx,
          f32*  restrict ferr,
          f32*  restrict berr,
          c64*  restrict work,
          f32*  restrict rwork,
          INT*           info
);
void cherfs(const char *uplo, const INT n, const INT nrhs, const c64 *restrict A, const INT lda, const c64 *restrict AF, const INT ldaf, const INT *restrict ipiv, const c64 *restrict B, const INT ldb, c64 *restrict X, const INT ldx, f32 *restrict ferr, f32 *restrict berr, c64 *restrict work, f32 *restrict rwork, INT *info)#

CHERFS improves the computed solution to a system of linear equations when the coefficient matrix is Hermitian indefinite, and provides error bounds and backward error estimates for the solution.

Parameters

in
uplo

  • 'U': Upper triangle of A is stored

  • 'L': Lower triangle of A is stored

in
n

The order of the matrix A. n>=0.

in
nrhs

The number of right hand sides. nrhs>=0.

in
A

Single complex array of dimension (lda,n). The Hermitian matrix A. If uplo='U', the leading N-by-N upper triangular part contains the upper triangular part of A and the strictly lower triangular part is not referenced. If uplo='L', the leading N-by-N lower triangular part contains the lower triangular part of A and the strictly upper triangular part is not referenced.

in
lda

The leading dimension of A. lda>=max(1,n).

in
AF

Single complex array of dimension (ldaf,n). The factored form of A. AF contains the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**H or A = L*D*L**H as computed by chetrf.

in
ldaf

The leading dimension of AF. ldaf>=max(1,n).

in
ipiv

Integer array of dimension n. Details of the interchanges and block structure of D from chetrf.

in
B

Single complex array of dimension (ldb,nrhs). The right hand side matrix B.

in
ldb

The leading dimension of B. ldb>=max(1,n).

inout
X

Single complex array of dimension (ldx,nrhs). On entry, the solution matrix X, as computed by chetrs. On exit, the improved solution matrix X.

in
ldx

The leading dimension of X. ldx>=max(1,n).

out
ferr

Real array of dimension nrhs. The estimated forward error bound for each solution vector X(j). If XTRUE is the true solution corresponding to X(j), ferr[j] estimates the largest element of X(j)-XTRUE divided by the largest element of X(j).

out
berr

Real array of dimension nrhs. The componentwise relative backward error of each solution vector X(j), i.e., the smallest relative change in an element of A or B that makes X(j) an exact solution.

out
work

Single complex workspace array of dimension 2*n.

out
rwork

Real workspace array of dimension n.

out
info

  • info=0: successful exit

  • info<0: if info=-i, the i-th argument had an illegal value

Functions

void zherfs(
    const char*          uplo,
    const INT            n,
    const INT            nrhs,
    const c128* restrict A,
    const INT            lda,
    const c128* restrict AF,
    const INT            ldaf,
    const INT*  restrict ipiv,
    const c128* restrict B,
    const INT            ldb,
          c128* restrict X,
    const INT            ldx,
          f64*  restrict ferr,
          f64*  restrict berr,
          c128* restrict work,
          f64*  restrict rwork,
          INT*           info
);
void zherfs(const char *uplo, const INT n, const INT nrhs, const c128 *restrict A, const INT lda, const c128 *restrict AF, const INT ldaf, const INT *restrict ipiv, const c128 *restrict B, const INT ldb, c128 *restrict X, const INT ldx, f64 *restrict ferr, f64 *restrict berr, c128 *restrict work, f64 *restrict rwork, INT *info)#

ZHERFS improves the computed solution to a system of linear equations when the coefficient matrix is Hermitian indefinite, and provides error bounds and backward error estimates for the solution.

Parameters

in
uplo

  • 'U': Upper triangle of A is stored

  • 'L': Lower triangle of A is stored

in
n

The order of the matrix A. n>=0.

in
nrhs

The number of right hand sides. nrhs>=0.

in
A

Double complex array of dimension (lda,n). The Hermitian matrix A. If uplo='U', the leading N-by-N upper triangular part contains the upper triangular part of A and the strictly lower triangular part is not referenced. If uplo='L', the leading N-by-N lower triangular part contains the lower triangular part of A and the strictly upper triangular part is not referenced.

in
lda

The leading dimension of A. lda>=max(1,n).

in
AF

Double complex array of dimension (ldaf,n). The factored form of A. AF contains the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**H or A = L*D*L**H as computed by zhetrf.

in
ldaf

The leading dimension of AF. ldaf>=max(1,n).

in
ipiv

Integer array of dimension n. Details of the interchanges and block structure of D from zhetrf.

in
B

Double complex array of dimension (ldb,nrhs). The right hand side matrix B.

in
ldb

The leading dimension of B. ldb>=max(1,n).

inout
X

Double complex array of dimension (ldx,nrhs). On entry, the solution matrix X, as computed by zhetrs. On exit, the improved solution matrix X.

in
ldx

The leading dimension of X. ldx>=max(1,n).

out
ferr

Real array of dimension nrhs. The estimated forward error bound for each solution vector X(j). If XTRUE is the true solution corresponding to X(j), ferr[j] estimates the largest element of X(j)-XTRUE divided by the largest element of X(j).

out
berr

Real array of dimension nrhs. The componentwise relative backward error of each solution vector X(j), i.e., the smallest relative change in an element of A or B that makes X(j) an exact solution.

out
work

Double complex workspace array of dimension 2*n.

out
rwork

Real workspace array of dimension n.

out
info

  • info=0: successful exit

  • info<0: if info=-i, the i-th argument had an illegal value