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)#
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:
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.
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.
The system of equations is solved for X using the factored form of A.
Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.
Parameters
infactSpecifies 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.
inuplo= ‘U’: Upper triangle of A is stored = ‘L’: Lower triangle of A is stored
innThe number of linear equations. n >= 0.
innrhsThe number of right hand sides. nrhs >= 0.
inAThe Hermitian matrix A. Single complex array, dimension (lda, n).
inldaThe leading dimension of the array A. lda >= max(1, n).
inoutAFIf fact = ‘F’, contains the factored form from CHETRF. If fact = ‘N’, on exit contains the factored form. Single complex array, dimension (ldaf, n).
inldafThe leading dimension of the array AF. ldaf >= max(1, n).
inoutipivIf fact = ‘F’, contains the pivot indices from CHETRF. If fact = ‘N’, on exit contains the pivot indices. Integer array, dimension (n).
inBThe right hand side matrix B. Single complex array, dimension (ldb, nrhs).
inldbThe leading dimension of the array B. ldb >= max(1, n).
outXThe solution matrix X. Single complex array, dimension (ldx, nrhs).
inldxThe leading dimension of the array X. ldx >= max(1, n).
outrcondThe reciprocal condition number estimate of A.
outferrForward error bound for each solution vector. Single precision array, dimension (nrhs).
outberrBackward error for each solution vector. Single precision array, dimension (nrhs).
outworkSingle complex array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns the optimal lwork.
inlworkThe 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.
outrworkSingle precision array, dimension (n).
outinfo= 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.
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
);
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)#
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:
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.
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.
The system of equations is solved for X using the factored form of A.
Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.
Parameters
infactSpecifies 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.
inuplo= ‘U’: Upper triangle of A is stored = ‘L’: Lower triangle of A is stored
innThe number of linear equations. n >= 0.
innrhsThe number of right hand sides. nrhs >= 0.
inAThe Hermitian matrix A. Double complex array, dimension (lda, n).
inldaThe leading dimension of the array A. lda >= max(1, n).
inoutAFIf fact = ‘F’, contains the factored form from ZHETRF. If fact = ‘N’, on exit contains the factored form. Double complex array, dimension (ldaf, n).
inldafThe leading dimension of the array AF. ldaf >= max(1, n).
inoutipivIf fact = ‘F’, contains the pivot indices from ZHETRF. If fact = ‘N’, on exit contains the pivot indices. Integer array, dimension (n).
inBThe right hand side matrix B. Double complex array, dimension (ldb, nrhs).
inldbThe leading dimension of the array B. ldb >= max(1, n).
outXThe solution matrix X. Double complex array, dimension (ldx, nrhs).
inldxThe leading dimension of the array X. ldx >= max(1, n).
outrcondThe reciprocal condition number estimate of A.
outferrForward error bound for each solution vector. Double precision array, dimension (nrhs).
outberrBackward error for each solution vector. Double precision array, dimension (nrhs).
outworkDouble complex array, dimension (max(1, lwork)). On exit, if info = 0, work[0] returns the optimal lwork.
inlworkThe 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.
outrworkDouble precision array, dimension (n).
outinfo= 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.
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
);