sysvx#
Functions
-
void ssysvx(const char *fact, const char *uplo, const INT n, const INT nrhs, const f32 *restrict A, const INT lda, f32 *restrict AF, const INT ldaf, INT *restrict ipiv, const f32 *restrict B, const INT ldb, f32 *restrict X, const INT ldx, f32 *rcond, f32 *restrict ferr, f32 *restrict berr, f32 *restrict work, const INT lwork, INT *restrict iwork, INT *info)#
SSYSVX uses the diagonal pivoting factorization to compute the solution to a real system of linear equations A * X = B, where A is an N-by-N symmetric 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 isA = U * D * U**T, if uplo = 'U', or A = L * D * L**T, if uplo = 'L',
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric 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+1is 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
infact'F': On entry, AF and IPIV contain the factored form of A. AF and IPIV will not be modified.'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, i.e., the order of the matrix A.
n>=0.innrhsThe number of right hand sides.
nrhs>=0.inAArray of dimension
(lda,n). The symmetric matrix A.inldaThe leading dimension of the array A.
lda>=max(1,n).inoutAFArray of dimension
(ldaf,n). Iffact='F', then AF is an input argument and on entry contains the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**T or A = L*D*L**T as computed byssytrf. Iffact='N', then AF is an output argument and on exit returns the block diagonal matrix D and the multipliers used to obtain the factor U or L.inldafThe leading dimension of the array AF.
ldaf>=max(1,n).inoutipivArray of dimension
n. Pivot indices (0-based). Iffact='F', then ipiv is an input argument and on entry contains details of the interchanges and the block structure of D, as determined byssytrf. Ifipiv[k]>=0, then rows and columnskandipiv[k]were interchanged andD(k,k)is a 1-by-1 diagonal block. Ifuplo='U'andipiv[k]=ipiv[k-1]<0, then rows and columnsk-1and-ipiv[k]-1were interchanged andD(k-1:k,k-1:k)is a 2-by-2 diagonal block. Ifuplo='L'andipiv[k]=ipiv[k+1]<0, then rows and columnsk+1and-ipiv[k]-1were interchanged andD(k:k+1,k:k+1)is a 2-by-2 diagonal block. Iffact='N', then ipiv is an output argument and on exit contains details of the interchanges and the block structure of D, as determined byssytrf.inBArray of dimension
(ldb,nrhs). The n-by-nrhs right hand side matrix B.inldbThe leading dimension of the array B.
ldb>=max(1,n).outXArray of dimension
(ldx,nrhs). Ifinfo=0orinfo=n+1, the n-by-nrhs solution matrix X.inldxThe leading dimension of the array X.
ldx>=max(1,n).outrcondThe estimate of the reciprocal condition number of the matrix A. If
rcondis less than the machine precision (in particular, ifrcond=0), the matrix is singular to working precision. This condition is indicated by a return code ofinfo>0.outferrArray of dimension
nrhs. The estimated forward error bound for each solution vector X(j).outberrArray of dimension
nrhs. The componentwise relative backward error of each solution vector X(j).outworkArray of dimension
max(1,lwork). On exit, ifinfo=0,work[0]returns the optimallwork.inlworkThe length of
work.lwork>=max(1,3*n), and for best performance, whenfact='N',lwork>=max(1,3*n,n*nb), wherenbis the optimal block size forssytrf. Iflwork=-1, then a workspace query is assumed; the routine only calculates the optimal size of theworkarray, returns this value as the first entry of theworkarray, and no error message related tolworkis issued.outiworkArray of dimension
n.outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i, andi<=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=0is returned.info=n+1: D is nonsingular, butrcondis less than machine precision, meaning that the matrix is singular to working precision.
void ssysvx(
const char* fact,
const char* uplo,
const INT n,
const INT nrhs,
const f32* restrict A,
const INT lda,
f32* restrict AF,
const INT ldaf,
INT* restrict ipiv,
const f32* restrict B,
const INT ldb,
f32* restrict X,
const INT ldx,
f32* rcond,
f32* restrict ferr,
f32* restrict berr,
f32* restrict work,
const INT lwork,
INT* restrict iwork,
INT* info
);
Functions
-
void dsysvx(const char *fact, const char *uplo, const INT n, const INT nrhs, const f64 *restrict A, const INT lda, f64 *restrict AF, const INT ldaf, INT *restrict ipiv, const f64 *restrict B, const INT ldb, f64 *restrict X, const INT ldx, f64 *rcond, f64 *restrict ferr, f64 *restrict berr, f64 *restrict work, const INT lwork, INT *restrict iwork, INT *info)#
DSYSVX uses the diagonal pivoting factorization to compute the solution to a real system of linear equations A * X = B, where A is an N-by-N symmetric 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 isA = U * D * U**T, if uplo = 'U', or A = L * D * L**T, if uplo = 'L',
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric 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+1is 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
infact'F': On entry, AF and IPIV contain the factored form of A. AF and IPIV will not be modified.'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, i.e., the order of the matrix A.
n>=0.innrhsThe number of right hand sides.
nrhs>=0.inAArray of dimension
(lda,n). The symmetric matrix A.inldaThe leading dimension of the array A.
lda>=max(1,n).inoutAFArray of dimension
(ldaf,n). Iffact='F', then AF is an input argument and on entry contains the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**T or A = L*D*L**T as computed bydsytrf. Iffact='N', then AF is an output argument and on exit returns the block diagonal matrix D and the multipliers used to obtain the factor U or L.inldafThe leading dimension of the array AF.
ldaf>=max(1,n).inoutipivArray of dimension
n. Pivot indices (0-based). Iffact='F', then ipiv is an input argument and on entry contains details of the interchanges and the block structure of D, as determined bydsytrf. Ifipiv[k]>=0, then rows and columnskandipiv[k]were interchanged andD(k,k)is a 1-by-1 diagonal block. Ifuplo='U'andipiv[k]=ipiv[k-1]<0, then rows and columnsk-1and-ipiv[k]-1were interchanged andD(k-1:k,k-1:k)is a 2-by-2 diagonal block. Ifuplo='L'andipiv[k]=ipiv[k+1]<0, then rows and columnsk+1and-ipiv[k]-1were interchanged andD(k:k+1,k:k+1)is a 2-by-2 diagonal block. Iffact='N', then ipiv is an output argument and on exit contains details of the interchanges and the block structure of D, as determined bydsytrf.inBArray of dimension
(ldb,nrhs). The n-by-nrhs right hand side matrix B.inldbThe leading dimension of the array B.
ldb>=max(1,n).outXArray of dimension
(ldx,nrhs). Ifinfo=0orinfo=n+1, the n-by-nrhs solution matrix X.inldxThe leading dimension of the array X.
ldx>=max(1,n).outrcondThe estimate of the reciprocal condition number of the matrix A. If
rcondis less than the machine precision (in particular, ifrcond=0), the matrix is singular to working precision. This condition is indicated by a return code ofinfo>0.outferrArray of dimension
nrhs. The estimated forward error bound for each solution vector X(j).outberrArray of dimension
nrhs. The componentwise relative backward error of each solution vector X(j).outworkArray of dimension
max(1,lwork). On exit, ifinfo=0,work[0]returns the optimallwork.inlworkThe length of
work.lwork>=max(1,3*n), and for best performance, whenfact='N',lwork>=max(1,3*n,n*nb), wherenbis the optimal block size fordsytrf. Iflwork=-1, then a workspace query is assumed; the routine only calculates the optimal size of theworkarray, returns this value as the first entry of theworkarray, and no error message related tolworkis issued.outiworkArray of dimension
n.outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i, andi<=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=0is returned.info=n+1: D is nonsingular, butrcondis less than machine precision, meaning that the matrix is singular to working precision.
void dsysvx(
const char* fact,
const char* uplo,
const INT n,
const INT nrhs,
const f64* restrict A,
const INT lda,
f64* restrict AF,
const INT ldaf,
INT* restrict ipiv,
const f64* restrict B,
const INT ldb,
f64* restrict X,
const INT ldx,
f64* rcond,
f64* restrict ferr,
f64* restrict berr,
f64* restrict work,
const INT lwork,
INT* restrict iwork,
INT* info
);
Functions
-
void csysvx(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)#
CSYSVX 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 symmetric 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 isA = U * D * U**T, if uplo = 'U', or A = L * D * L**T, if uplo = 'L',
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric 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+1is 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
infact'F': On entry, AF and IPIV contain the factored form of A. AF and IPIV will not be modified.'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, i.e., the order of the matrix A.
n>=0.innrhsThe number of right hand sides.
nrhs>=0.inAComplex array of dimension
(lda,n). The symmetric matrix A.inldaThe leading dimension of the array A.
lda>=max(1,n).inoutAFComplex array of dimension
(ldaf,n). Iffact='F', then AF is an input argument and on entry contains the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**T or A = L*D*L**T as computed bycsytrf. Iffact='N', then AF is an output argument and on exit returns the block diagonal matrix D and the multipliers used to obtain the factor U or L.inldafThe leading dimension of the array AF.
ldaf>=max(1,n).inoutipivArray of dimension
n. Pivot indices (0-based). Iffact='F', then ipiv is an input argument and on entry contains details of the interchanges and the block structure of D, as determined bycsytrf. Ifipiv[k]>=0, then rows and columnskandipiv[k]were interchanged andD(k,k)is a 1-by-1 diagonal block. Ifuplo='U'andipiv[k]=ipiv[k-1]<0, then rows and columnsk-1and-ipiv[k]-1were interchanged andD(k-1:k,k-1:k)is a 2-by-2 diagonal block. Ifuplo='L'andipiv[k]=ipiv[k+1]<0, then rows and columnsk+1and-ipiv[k]-1were interchanged andD(k:k+1,k:k+1)is a 2-by-2 diagonal block. Iffact='N', then ipiv is an output argument and on exit contains details of the interchanges and the block structure of D, as determined bycsytrf.inBComplex array of dimension
(ldb,nrhs). The n-by-nrhs right hand side matrix B.inldbThe leading dimension of the array B.
ldb>=max(1,n).outXComplex array of dimension
(ldx,nrhs). Ifinfo=0orinfo=n+1, the n-by-nrhs solution matrix X.inldxThe leading dimension of the array X.
ldx>=max(1,n).outrcondThe estimate of the reciprocal condition number of the matrix A. If
rcondis less than the machine precision (in particular, ifrcond=0), the matrix is singular to working precision. This condition is indicated by a return code ofinfo>0.outferrArray of dimension
nrhs. The estimated forward error bound for each solution vector X(j).outberrArray of dimension
nrhs. The componentwise relative backward error of each solution vector X(j).outworkComplex array of dimension
max(1,lwork). On exit, ifinfo=0,work[0]returns the optimallwork.inlworkThe length of
work.lwork>=max(1,2*n), and for best performance, whenfact='N',lwork>=max(1,2*n,n*nb), wherenbis the optimal block size forcsytrf. Iflwork=-1, then a workspace query is assumed; the routine only calculates the optimal size of theworkarray, returns this value as the first entry of theworkarray, and no error message related tolworkis issued.outrworkArray of dimension
n.outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i, andi<=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=0is returned.info=n+1: D is nonsingular, butrcondis less than machine precision, meaning that the matrix is singular to working precision.
void csysvx(
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 zsysvx(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)#
ZSYSVX 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 symmetric 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 isA = U * D * U**T, if uplo = 'U', or A = L * D * L**T, if uplo = 'L',
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric 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+1is 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
infact'F': On entry, AF and IPIV contain the factored form of A. AF and IPIV will not be modified.'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, i.e., the order of the matrix A.
n>=0.innrhsThe number of right hand sides.
nrhs>=0.inAComplex array of dimension
(lda,n). The symmetric matrix A.inldaThe leading dimension of the array A.
lda>=max(1,n).inoutAFComplex array of dimension
(ldaf,n). Iffact='F', then AF is an input argument and on entry contains the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**T or A = L*D*L**T as computed byzsytrf. Iffact='N', then AF is an output argument and on exit returns the block diagonal matrix D and the multipliers used to obtain the factor U or L.inldafThe leading dimension of the array AF.
ldaf>=max(1,n).inoutipivArray of dimension
n. Pivot indices (0-based). Iffact='F', then ipiv is an input argument and on entry contains details of the interchanges and the block structure of D, as determined byzsytrf. Ifipiv[k]>=0, then rows and columnskandipiv[k]were interchanged andD(k,k)is a 1-by-1 diagonal block. Ifuplo='U'andipiv[k]=ipiv[k-1]<0, then rows and columnsk-1and-ipiv[k]-1were interchanged andD(k-1:k,k-1:k)is a 2-by-2 diagonal block. Ifuplo='L'andipiv[k]=ipiv[k+1]<0, then rows and columnsk+1and-ipiv[k]-1were interchanged andD(k:k+1,k:k+1)is a 2-by-2 diagonal block. Iffact='N', then ipiv is an output argument and on exit contains details of the interchanges and the block structure of D, as determined byzsytrf.inBComplex array of dimension
(ldb,nrhs). The n-by-nrhs right hand side matrix B.inldbThe leading dimension of the array B.
ldb>=max(1,n).outXComplex array of dimension
(ldx,nrhs). Ifinfo=0orinfo=n+1, the n-by-nrhs solution matrix X.inldxThe leading dimension of the array X.
ldx>=max(1,n).outrcondThe estimate of the reciprocal condition number of the matrix A. If
rcondis less than the machine precision (in particular, ifrcond=0), the matrix is singular to working precision. This condition is indicated by a return code ofinfo>0.outferrArray of dimension
nrhs. The estimated forward error bound for each solution vector X(j).outberrArray of dimension
nrhs. The componentwise relative backward error of each solution vector X(j).outworkComplex array of dimension
max(1,lwork). On exit, ifinfo=0,work[0]returns the optimallwork.inlworkThe length of
work.lwork>=max(1,2*n), and for best performance, whenfact='N',lwork>=max(1,2*n,n*nb), wherenbis the optimal block size forzsytrf. Iflwork=-1, then a workspace query is assumed; the routine only calculates the optimal size of theworkarray, returns this value as the first entry of theworkarray, and no error message related tolworkis issued.outrworkArray of dimension
n.outinfoinfo=0: successful exitinfo<0: ifinfo=-i, the i-th argument had an illegal valueinfo>0: ifinfo=i, andi<=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=0is returned.info=n+1: D is nonsingular, butrcondis less than machine precision, meaning that the matrix is singular to working precision.
void zsysvx(
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
);