?syrfsx
?syrfsx
Uses extra precise iterative refinement to improve the solution to the system of linear equations with a symmetric indefinite coefficient matrix A and provides error bounds and backward error estimates.
Syntax
lapack_int LAPACKE_ssyrfsx
(
int
matrix_layout
,
char
uplo
,
char
equed
,
lapack_int
n
,
lapack_int
nrhs
,
const float*
a
,
lapack_int
lda
,
const float*
af
,
lapack_int
ldaf
,
const lapack_int*
ipiv
,
const float*
s
,
const float*
b
,
lapack_int
ldb
,
float*
x
,
lapack_int
ldx
,
float*
rcond
,
float*
berr
,
lapack_int
n_err_bnds
,
float*
err_bnds_norm
,
float*
err_bnds_comp
,
lapack_int
nparams
,
float*
params
);
lapack_int LAPACKE_dsyrfsx
(
int
matrix_layout
,
char
uplo
,
char
equed
,
lapack_int
n
,
lapack_int
nrhs
,
const double*
a
,
lapack_int
lda
,
const double*
af
,
lapack_int
ldaf
,
const lapack_int*
ipiv
,
const double*
s
,
const double*
b
,
lapack_int
ldb
,
double*
x
,
lapack_int
ldx
,
double*
rcond
,
double*
berr
,
lapack_int
n_err_bnds
,
double*
err_bnds_norm
,
double*
err_bnds_comp
,
lapack_int
nparams
,
double*
params
);
lapack_int LAPACKE_csyrfsx
(
int
matrix_layout
,
char
uplo
,
char
equed
,
lapack_int
n
,
lapack_int
nrhs
,
const lapack_complex_float*
a
,
lapack_int
lda
,
const lapack_complex_float*
af
,
lapack_int
ldaf
,
const lapack_int*
ipiv
,
const float*
s
,
const lapack_complex_float*
b
,
lapack_int
ldb
,
lapack_complex_float*
x
,
lapack_int
ldx
,
float*
rcond
,
float*
berr
,
lapack_int
n_err_bnds
,
float*
err_bnds_norm
,
float*
err_bnds_comp
,
lapack_int
nparams
,
float*
params
);
lapack_int LAPACKE_zsyrfsx
(
int
matrix_layout
,
char
uplo
,
char
equed
,
lapack_int
n
,
lapack_int
nrhs
,
const lapack_complex_double*
a
,
lapack_int
lda
,
const lapack_complex_double*
af
,
lapack_int
ldaf
,
const lapack_int*
ipiv
,
const double*
s
,
const lapack_complex_double*
b
,
lapack_int
ldb
,
lapack_complex_double*
x
,
lapack_int
ldx
,
double*
rcond
,
double*
berr
,
lapack_int
n_err_bnds
,
double*
err_bnds_norm
,
double*
err_bnds_comp
,
lapack_int
nparams
,
double*
params
);
Include Files
- mkl.h
Description
The routine improves the computed solution to a system of linear equations when the coefficient matrix is symmetric indefinite,
and provides error bounds and backward error estimates for the
solution. In addition to a normwise error bound, the code provides
a maximum componentwise error bound, if possible. See comments for
err_bnds_norm
and err_bnds_comp
for details of the error bounds.The original system of linear equations may have been equilibrated
before calling this routine, as described by the parameters
equed
and s
below. In this case, the solution and error bounds returned are for the original unequilibrated system.Input Parameters
- matrix_layout
- Specifies whether two-dimensional array storage is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- uplo
- Must be'U'or'L'.Indicates whether the upper or lower triangular part ofAis stored:If, the upper triangle ofuplo='U'Ais stored.If, the lower triangle ofuplo='L'Ais stored.
- equed
- Must be'N'or'Y'.Specifies the form of equilibration that was done toAbefore calling this routine.If, no equilibration was done.equed='N'If, both row and column equilibration was done, that is,equed='Y'Ahas been replaced by. The right-hand sidediag(s)*A*diag(s)Bhas been changed accordingly.
- n
- The number of linear equations; the order of the matrixA;n≥0.
- nrhs
- The number of right-hand sides; the number of columns of the matricesBandX;nrhs≥0.
- a,af,b
- The arraya(size max(1,contains the symmetric/Hermitian matrixlda*n))Aas specified byuplo. Ifuplo='U', the leadingn-by-nupper triangular part ofacontains the upper triangular part of the matrixAand the strictly lower triangular part ofais not referenced. Ifuplo='L', the leadingn-by-nlower triangular part ofacontains the lower triangular part of the matrixAand the strictly upper triangular part ofais not referenced.The arrayb(size max(1,contains the matrixldb*nrhs) for column major layout and max(1,ldb*n) for row major layout)Bwhose columns are the right-hand sides for the systems of equations.
- lda
- The leading dimension ofa;.lda≥max(1,n)
- ldaf
- The leading dimension ofaf;.ldaf≥max(1,n)
- ipiv
- s
- Array, size (n). The arrayscontains the scale factors forA.If,equed='N'sis not accessed.Ifequed='Y', each element ofsmust be positive.Each element ofsshould be a power of the radix to ensure a reliable solution and error estimates. Scaling by powers of the radix does not cause rounding errors unless the result underflows or overflows. Rounding errors during scaling lead to refining with a matrix that is not equivalent to the input matrix, producing error estimates that may not be reliable.
- ldb
- The leading dimension of the arrayb;.ldb≥max(1,n) for column major layout andldb≥nrhsfor row major layout
- x
- Array,of size max(1,.ldx*nrhs) for column major layout and max(1,ldx*n) for row major layoutThe solution matrixXas computed by?sytrs
- ldx
- The leading dimension of the output arrayx;.ldx≥max(1,n) for column major layout andldx≥nrhsfor row major layout
- n_err_bnds
- Number of error bounds to return for each right hand side and each type (normwise or componentwise). Seeerr_bnds_normanderr_bnds_compdescriptions inOutput Argumentssection below.
- nparams
- Specifies the number of parameters set inparams. If≤0, theparamsarray is never referenced and default values are used.
- params
- Array, sizenparams. Specifies algorithm parameters. If an entry is less than 0.0, that entry will be filled with the default value used for that parameter. Only positions up tonparamsare accessed; defaults are used for higher-numbered parameters. If defaults are acceptable, you can passnparams= 0, which prevents the source code from accessing theparamsargument.: Whether to perform iterative refinement or not. Default: 1.0 (for single precision flavors), 1.0D+0 (for double precision flavors).params[0]
- =0.0
- No refinement is performed and no error bounds are computed.
- =1.0
- Use the double-precision refinement algorithm, possibly with doubled-single computations if the compilation environment does not support double precision.
(Other values are reserved for future use.): Maximum number of residual computations allowed for refinement.params[1]- Default
- 10.0
- Aggressive
- Set to 100.0 to permit convergence using approximate factorizations or factorizations other thanLU. If the factorization uses a technique other than Gaussian elimination, the guarantees inerr_bnds_normanderr_bnds_compmay no longer be trustworthy.
: Flag determining if the code will attempt to find a solution with a small componentwise relative error in the double-precision algorithm. Positive is true, 0.0 is false. Default: 1.0 (attempt componentwise convergence).params[2]
Output Parameters
- x
- The improved solution matrixX.
- rcond
- Reciprocal scaled condition number. An estimate of the reciprocal Skeel condition number of the matrixAafter equilibration (if done). Ifrcondis less than the machine precision, in particular, ifrcond= 0, the matrix is singular to working precision. Note that the error may still be small even if this number is very small and the matrix appears ill-conditioned.
- berr
- Array, size at leastmax(1,. Contains the componentwise relative backward error for each solution vectornrhs), that is, the smallest relative change in any element ofxjAorBthat makesan exact solution.xj
- err_bnds_norm
- Array of size. For each right-hand side, contains information about various error bounds and condition numbers corresponding to the normwise relative errornrhs*n_err_bnds, which is defined as follows:Normwise relative error in thei-th solution vectorThe array is indexed by the type of error information as described below. There are currently up to three pieces of information returned.
- err=1
- "Trust/don't trust" boolean. Trust the answer if the reciprocal condition number is less than the thresholdfor single precision flavors andsqrt(n)*slamch(ε)for double precision flavors.sqrt(n)*dlamch(ε)
- err=2
- "Guaranteed" error bound. The estimated forward error, almost certainly within a factor of 10 of the true error so long as the next entry is greater than the thresholdfor single precision flavors andsqrt(n)*slamch(ε)for double precision flavors. This error bound should only be trusted if the previous boolean is true.sqrt(n)*dlamch(ε)
- err=3
- Reciprocal condition number. Estimated normwise reciprocal condition number. Compared with the thresholdfor single precision flavors andsqrt(n)*slamch(ε)for double precision flavors to determine if the error estimate is "guaranteed". These reciprocal condition numbers for some appropriately scaled matrixsqrt(n)*dlamch(ε)Zare:
The information for right-hand sidei, where 1≤i≤nrhs, and type of errorerris stored in:- Column major layout:.err_bnds_norm[(err- 1)*nrhs+i- 1]
- Row major layout:err_bnds_norm[err- 1 + (i- 1)*n_err_bnds]
- err_bnds_comp
- Array of size. For each right-hand side, contains information about various error bounds and condition numbers corresponding to the componentwise relative errornrhs*n_err_bnds, which is defined as follows:Componentwise relative error in thei-th solution vector:The array is indexed by the type of error information as described below. There are currently up to three pieces of information returned for each right-hand side. If componentwise accuracy is not requested (params[2]= 0.0), thenerr_bnds_compis not accessed.
- err=1
- "Trust/don't trust" boolean. Trust the answer if the reciprocal condition number is less than the thresholdfor single precision flavors andsqrt(n)*slamch(ε)for double precision flavors.sqrt(n)*dlamch(ε)
- err=2
- "Guaranteed" error bpound. The estimated forward error, almost certainly within a factor of 10 of the true error so long as the next entry is greater than the thresholdfor single precision flavors andsqrt(n)*slamch(ε)for double precision flavors. This error bound should only be trusted if the previous boolean is true.sqrt(n)*dlamch(ε)
- err=3
- Reciprocal condition number. Estimated componentwise reciprocal condition number. Compared with the thresholdfor single precision flavors andsqrt(n)*slamch(ε)for double precision flavors to determine if the error estimate is "guaranteed". These reciprocal condition numbers for some appropriately scaled matrixsqrt(n)*dlamch(ε)Zare:Let, wherez=s*(a*diag(x))xis the solution for the current right-hand side andsscales each row ofby a power of the radix so all absolute row sums ofa*diag(x)zare approximately 1.
The information for right-hand sidei, where 1≤i≤nrhs, and type of errorerris stored in:- Column major layout:.err_bnds_comp[(err- 1)*nrhs+i- 1]
- Row major layout:err_bnds_comp[err- 1 + (i- 1)*n_err_bnds]
- params
- Output parameter only if the input contains erroneous values, namely, in