hesvx#

Functions

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

CHESVX uses the diagonal pivoting factorization to compute the solution to a complex system of linear equations A * X = B, where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS matrices.

Error bounds on the solution and a condition estimate are also provided.

The following steps are performed:

  1. If FACT = ‘N’, the diagonal pivoting method is used to factor A. The form of the factorization is A = U * D * U**H, if UPLO = ‘U’, or A = L * D * L**H, if UPLO = ‘L’, where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.

  2. If some D(i,i)=0, so that D is exactly singular, then the routine returns with INFO = i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A. If the reciprocal of the condition number is less than machine precision, INFO = N+1 is returned as a warning, but the routine still goes on to solve for X and compute error bounds as described below.

  3. The system of equations is solved for X using the factored form of A.

  4. Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.

Parameters

in
fact

Specifies whether the factored form of A has been supplied on entry. = ‘F’: On entry, AF and IPIV contain the factored form. = ‘N’: The matrix A will be copied to AF and factored.

in
uplo

= ‘U’: Upper triangle of A is stored = ‘L’: Lower triangle of A is stored

in
n

The number of linear equations. n >= 0.

in
nrhs

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

in
A

The Hermitian matrix A. Single complex array, dimension (lda, n).

in
lda

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

inout
AF

If fact = ‘F’, contains the factored form from CHETRF. If fact = ‘N’, on exit contains the factored form. Single complex array, dimension (ldaf, n).

in
ldaf

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

inout
ipiv

If fact = ‘F’, contains the pivot indices from CHETRF. If fact = ‘N’, on exit contains the pivot indices. Integer array, dimension (n).

in
B

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

in
ldb

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

out
X

The solution matrix X. Single complex array, dimension (ldx, nrhs).

in
ldx

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

out
rcond

The reciprocal condition number estimate of A.

out
ferr

Forward error bound for each solution vector. Single precision array, dimension (nrhs).

out
berr

Backward error for each solution vector. Single precision array, dimension (nrhs).

out
work

Single complex array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The length of work. lwork >= max(1, 2*n), and for best performance lwork >= max(1, 2*n, n*nb). If lwork = -1, a workspace query is assumed.

out
rwork

Single precision array, dimension (n).

out
info

  • = 0: successful exit

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

  • > 0: if info = i, and i is

  • <= N: D(i,i) is exactly zero. The factorization has been completed but D is exactly singular, so the solution and error bounds could not be computed. RCOND = 0 is returned.

  • = N+1: D is nonsingular, but RCOND is less than machine precision, meaning that the matrix is singular to working precision.

Functions

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

ZHESVX uses the diagonal pivoting factorization to compute the solution to a complex system of linear equations A * X = B, where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS matrices.

Error bounds on the solution and a condition estimate are also provided.

The following steps are performed:

  1. If FACT = ‘N’, the diagonal pivoting method is used to factor A. The form of the factorization is A = U * D * U**H, if UPLO = ‘U’, or A = L * D * L**H, if UPLO = ‘L’, where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.

  2. If some D(i,i)=0, so that D is exactly singular, then the routine returns with INFO = i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A. If the reciprocal of the condition number is less than machine precision, INFO = N+1 is returned as a warning, but the routine still goes on to solve for X and compute error bounds as described below.

  3. The system of equations is solved for X using the factored form of A.

  4. Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.

Parameters

in
fact

Specifies whether the factored form of A has been supplied on entry. = ‘F’: On entry, AF and IPIV contain the factored form. = ‘N’: The matrix A will be copied to AF and factored.

in
uplo

= ‘U’: Upper triangle of A is stored = ‘L’: Lower triangle of A is stored

in
n

The number of linear equations. n >= 0.

in
nrhs

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

in
A

The Hermitian matrix A. Double complex array, dimension (lda, n).

in
lda

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

inout
AF

If fact = ‘F’, contains the factored form from ZHETRF. If fact = ‘N’, on exit contains the factored form. Double complex array, dimension (ldaf, n).

in
ldaf

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

inout
ipiv

If fact = ‘F’, contains the pivot indices from ZHETRF. If fact = ‘N’, on exit contains the pivot indices. Integer array, dimension (n).

in
B

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

in
ldb

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

out
X

The solution matrix X. Double complex array, dimension (ldx, nrhs).

in
ldx

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

out
rcond

The reciprocal condition number estimate of A.

out
ferr

Forward error bound for each solution vector. Double precision array, dimension (nrhs).

out
berr

Backward error for each solution vector. Double precision array, dimension (nrhs).

out
work

Double complex array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns the optimal lwork.

in
lwork

The length of work. lwork >= max(1, 2*n), and for best performance lwork >= max(1, 2*n, n*nb). If lwork = -1, a workspace query is assumed.

out
rwork

Double precision array, dimension (n).

out
info

  • = 0: successful exit

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

  • > 0: if info = i, and i is

  • <= N: D(i,i) is exactly zero. The factorization has been completed but D is exactly singular, so the solution and error bounds could not be computed. RCOND = 0 is returned.

  • = N+1: D is nonsingular, but RCOND is less than machine precision, meaning that the matrix is singular to working precision.