version 1.5, 2011/11/21 20:42:54
|
version 1.17, 2020/05/21 21:45:58
|
Line 1
|
Line 1
|
*> \brief \b DLA_SYRFSX_EXTENDED |
*> \brief \b DLA_SYRFSX_EXTENDED improves the computed solution to a system of linear equations for symmetric indefinite matrices by performing extra-precise iterative refinement and provides error bounds and backward error estimates for the solution. |
* |
* |
* =========== DOCUMENTATION =========== |
* =========== DOCUMENTATION =========== |
* |
* |
* Online html documentation available at |
* Online html documentation available at |
* http://www.netlib.org/lapack/explore-html/ |
* http://www.netlib.org/lapack/explore-html/ |
* |
* |
*> \htmlonly |
*> \htmlonly |
*> Download DLA_SYRFSX_EXTENDED + dependencies |
*> Download DLA_SYRFSX_EXTENDED + dependencies |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dla_syrfsx_extended.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dla_syrfsx_extended.f"> |
*> [TGZ]</a> |
*> [TGZ]</a> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dla_syrfsx_extended.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dla_syrfsx_extended.f"> |
*> [ZIP]</a> |
*> [ZIP]</a> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dla_syrfsx_extended.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dla_syrfsx_extended.f"> |
*> [TXT]</a> |
*> [TXT]</a> |
*> \endhtmlonly |
*> \endhtmlonly |
* |
* |
* Definition: |
* Definition: |
* =========== |
* =========== |
Line 25
|
Line 25
|
* AYB, DY, Y_TAIL, RCOND, ITHRESH, |
* AYB, DY, Y_TAIL, RCOND, ITHRESH, |
* RTHRESH, DZ_UB, IGNORE_CWISE, |
* RTHRESH, DZ_UB, IGNORE_CWISE, |
* INFO ) |
* INFO ) |
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, |
* INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, |
* $ N_NORMS, ITHRESH |
* $ N_NORMS, ITHRESH |
Line 41
|
Line 41
|
* $ ERR_BNDS_NORM( NRHS, * ), |
* $ ERR_BNDS_NORM( NRHS, * ), |
* $ ERR_BNDS_COMP( NRHS, * ) |
* $ ERR_BNDS_COMP( NRHS, * ) |
* .. |
* .. |
* |
* |
* |
* |
*> \par Purpose: |
*> \par Purpose: |
* ============= |
* ============= |
*> |
*> |
*> \verbatim |
*> \verbatim |
*> |
*> |
*> |
*> |
*> DLA_SYRFSX_EXTENDED improves the computed solution to a system of |
*> DLA_SYRFSX_EXTENDED improves the computed solution to a system of |
*> linear equations by performing extra-precise iterative refinement |
*> linear equations by performing extra-precise iterative refinement |
*> and provides error bounds and backward error estimates for the solution. |
*> and provides error bounds and backward error estimates for the solution. |
Line 67
|
Line 67
|
*> \verbatim |
*> \verbatim |
*> PREC_TYPE is INTEGER |
*> PREC_TYPE is INTEGER |
*> Specifies the intermediate precision to be used in refinement. |
*> Specifies the intermediate precision to be used in refinement. |
*> The value is defined by ILAPREC(P) where P is a CHARACTER and |
*> The value is defined by ILAPREC(P) where P is a CHARACTER and P |
*> P = 'S': Single |
*> = 'S': Single |
*> = 'D': Double |
*> = 'D': Double |
*> = 'I': Indigenous |
*> = 'I': Indigenous |
*> = 'X', 'E': Extra |
*> = 'X' or 'E': Extra |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[in] UPLO |
*> \param[in] UPLO |
Line 162
|
Line 162
|
*> |
*> |
*> \param[in,out] Y |
*> \param[in,out] Y |
*> \verbatim |
*> \verbatim |
*> Y is DOUBLE PRECISION array, dimension |
*> Y is DOUBLE PRECISION array, dimension (LDY,NRHS) |
*> (LDY,NRHS) |
|
*> On entry, the solution matrix X, as computed by DSYTRS. |
*> On entry, the solution matrix X, as computed by DSYTRS. |
*> On exit, the improved solution matrix Y. |
*> On exit, the improved solution matrix Y. |
*> \endverbatim |
*> \endverbatim |
Line 195
|
Line 194
|
*> |
*> |
*> \param[in,out] ERR_BNDS_NORM |
*> \param[in,out] ERR_BNDS_NORM |
*> \verbatim |
*> \verbatim |
*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension |
*> ERR_BNDS_NORM is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) |
*> (NRHS, N_ERR_BNDS) |
|
*> For each right-hand side, this array contains information about |
*> For each right-hand side, this array contains information about |
*> various error bounds and condition numbers corresponding to the |
*> various error bounds and condition numbers corresponding to the |
*> normwise relative error, which is defined as follows: |
*> normwise relative error, which is defined as follows: |
Line 242
|
Line 240
|
*> |
*> |
*> \param[in,out] ERR_BNDS_COMP |
*> \param[in,out] ERR_BNDS_COMP |
*> \verbatim |
*> \verbatim |
*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension |
*> ERR_BNDS_COMP is DOUBLE PRECISION array, dimension (NRHS, N_ERR_BNDS) |
*> (NRHS, N_ERR_BNDS) |
|
*> For each right-hand side, this array contains information about |
*> For each right-hand side, this array contains information about |
*> various error bounds and condition numbers corresponding to the |
*> various error bounds and condition numbers corresponding to the |
*> componentwise relative error, which is defined as follows: |
*> componentwise relative error, which is defined as follows: |
Line 258
|
Line 255
|
*> information as described below. There currently are up to three |
*> information as described below. There currently are up to three |
*> pieces of information returned for each right-hand side. If |
*> pieces of information returned for each right-hand side. If |
*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then |
*> componentwise accuracy is not requested (PARAMS(3) = 0.0), then |
*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS .LT. 3, then at most |
*> ERR_BNDS_COMP is not accessed. If N_ERR_BNDS < 3, then at most |
*> the first (:,N_ERR_BNDS) entries are returned. |
*> the first (:,N_ERR_BNDS) entries are returned. |
*> |
*> |
*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith |
*> The first index in ERR_BNDS_COMP(i,:) corresponds to the ith |
Line 374
|
Line 371
|
*> \verbatim |
*> \verbatim |
*> INFO is INTEGER |
*> INFO is INTEGER |
*> = 0: Successful exit. |
*> = 0: Successful exit. |
*> < 0: if INFO = -i, the ith argument to DSYTRS had an illegal |
*> < 0: if INFO = -i, the ith argument to DLA_SYRFSX_EXTENDED had an illegal |
*> value |
*> value |
*> \endverbatim |
*> \endverbatim |
* |
* |
* Authors: |
* Authors: |
* ======== |
* ======== |
* |
* |
*> \author Univ. of Tennessee |
*> \author Univ. of Tennessee |
*> \author Univ. of California Berkeley |
*> \author Univ. of California Berkeley |
*> \author Univ. of Colorado Denver |
*> \author Univ. of Colorado Denver |
*> \author NAG Ltd. |
*> \author NAG Ltd. |
* |
* |
*> \date November 2011 |
*> \date June 2017 |
* |
* |
*> \ingroup doubleSYcomputational |
*> \ingroup doubleSYcomputational |
* |
* |
Line 399
|
Line 396
|
$ RTHRESH, DZ_UB, IGNORE_CWISE, |
$ RTHRESH, DZ_UB, IGNORE_CWISE, |
$ INFO ) |
$ INFO ) |
* |
* |
* -- LAPACK computational routine (version 3.4.0) -- |
* -- LAPACK computational routine (version 3.7.1) -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* November 2011 |
* June 2017 |
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, |
INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE, |
Line 428
|
Line 425
|
$ DZRAT, PREVNORMDX, PREV_DZ_Z, DXRATMAX, |
$ DZRAT, PREVNORMDX, PREV_DZ_Z, DXRATMAX, |
$ DZRATMAX, DX_X, DZ_Z, FINAL_DX_X, FINAL_DZ_Z, |
$ DZRATMAX, DX_X, DZ_Z, FINAL_DX_X, FINAL_DZ_Z, |
$ EPS, HUGEVAL, INCR_THRESH |
$ EPS, HUGEVAL, INCR_THRESH |
LOGICAL INCR_PREC |
LOGICAL INCR_PREC, UPPER |
* .. |
* .. |
* .. Parameters .. |
* .. Parameters .. |
INTEGER UNSTABLE_STATE, WORKING_STATE, CONV_STATE, |
INTEGER UNSTABLE_STATE, WORKING_STATE, CONV_STATE, |
Line 472
|
Line 469
|
* .. |
* .. |
* .. Executable Statements .. |
* .. Executable Statements .. |
* |
* |
IF ( INFO.NE.0 ) RETURN |
INFO = 0 |
|
UPPER = LSAME( UPLO, 'U' ) |
|
IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN |
|
INFO = -2 |
|
ELSE IF( N.LT.0 ) THEN |
|
INFO = -3 |
|
ELSE IF( NRHS.LT.0 ) THEN |
|
INFO = -4 |
|
ELSE IF( LDA.LT.MAX( 1, N ) ) THEN |
|
INFO = -6 |
|
ELSE IF( LDAF.LT.MAX( 1, N ) ) THEN |
|
INFO = -8 |
|
ELSE IF( LDB.LT.MAX( 1, N ) ) THEN |
|
INFO = -13 |
|
ELSE IF( LDY.LT.MAX( 1, N ) ) THEN |
|
INFO = -15 |
|
END IF |
|
IF( INFO.NE.0 ) THEN |
|
CALL XERBLA( 'DLA_SYRFSX_EXTENDED', -INFO ) |
|
RETURN |
|
END IF |
EPS = DLAMCH( 'Epsilon' ) |
EPS = DLAMCH( 'Epsilon' ) |
HUGEVAL = DLAMCH( 'Overflow' ) |
HUGEVAL = DLAMCH( 'Overflow' ) |
* Force HUGEVAL to Inf |
* Force HUGEVAL to Inf |
Line 525
|
Line 542
|
CALL BLAS_DSYMV2_X(UPLO2, N, -1.0D+0, A, LDA, |
CALL BLAS_DSYMV2_X(UPLO2, N, -1.0D+0, A, LDA, |
$ Y(1, J), Y_TAIL, 1, 1.0D+0, RES, 1, PREC_TYPE) |
$ Y(1, J), Y_TAIL, 1, 1.0D+0, RES, 1, PREC_TYPE) |
END IF |
END IF |
|
|
! XXX: RES is no longer needed. |
! XXX: RES is no longer needed. |
CALL DCOPY( N, RES, 1, DY, 1 ) |
CALL DCOPY( N, RES, 1, DY, 1 ) |
CALL DSYTRS( UPLO, N, 1, AF, LDAF, IPIV, DY, N, INFO ) |
CALL DSYTRS( UPLO, N, 1, AF, LDAF, IPIV, DY, N, INFO ) |
Line 537
|
Line 554
|
NORMDX = 0.0D+0 |
NORMDX = 0.0D+0 |
DZ_Z = 0.0D+0 |
DZ_Z = 0.0D+0 |
YMIN = HUGEVAL |
YMIN = HUGEVAL |
|
|
DO I = 1, N |
DO I = 1, N |
YK = ABS( Y( I, J ) ) |
YK = ABS( Y( I, J ) ) |
DYK = ABS( DY( I ) ) |
DYK = ABS( DY( I ) ) |
|
|
IF ( YK .NE. 0.0D+0 ) THEN |
IF ( YK .NE. 0.0D+0 ) THEN |
DZ_Z = MAX( DZ_Z, DYK / YK ) |
DZ_Z = MAX( DZ_Z, DYK / YK ) |
ELSE IF ( DYK .NE. 0.0D+0 ) THEN |
ELSE IF ( DYK .NE. 0.0D+0 ) THEN |
Line 640
|
Line 657
|
ELSE |
ELSE |
CALL DLA_WWADDW( N, Y(1,J), Y_TAIL, DY ) |
CALL DLA_WWADDW( N, Y(1,J), Y_TAIL, DY ) |
END IF |
END IF |
|
|
END DO |
END DO |
* Target of "IF (Z_STOP .AND. X_STOP)". Sun's f77 won't EXIT. |
* Target of "IF (Z_STOP .AND. X_STOP)". Sun's f77 won't EXIT. |
666 CONTINUE |
666 CONTINUE |
Line 669
|
Line 686
|
* Compute residual RES = B_s - op(A_s) * Y, |
* Compute residual RES = B_s - op(A_s) * Y, |
* op(A) = A, A**T, or A**H depending on TRANS (and type). |
* op(A) = A, A**T, or A**H depending on TRANS (and type). |
CALL DCOPY( N, B( 1, J ), 1, RES, 1 ) |
CALL DCOPY( N, B( 1, J ), 1, RES, 1 ) |
CALL DSYMV( UPLO, N, -1.0D+0, A, LDA, Y(1,J), 1, 1.0D+0, RES, |
CALL DSYMV( UPLO, N, -1.0D+0, A, LDA, Y(1,J), 1, 1.0D+0, RES, |
$ 1 ) |
$ 1 ) |
|
|
DO I = 1, N |
DO I = 1, N |
AYB( I ) = ABS( B( I, J ) ) |
AYB( I ) = ABS( B( I, J ) ) |
END DO |
END DO |
Line 680
|
Line 697
|
* |
* |
CALL DLA_SYAMV( UPLO2, N, 1.0D+0, |
CALL DLA_SYAMV( UPLO2, N, 1.0D+0, |
$ A, LDA, Y(1, J), 1, 1.0D+0, AYB, 1 ) |
$ A, LDA, Y(1, J), 1, 1.0D+0, AYB, 1 ) |
|
|
CALL DLA_LIN_BERR( N, N, 1, RES, AYB, BERR_OUT( J ) ) |
CALL DLA_LIN_BERR( N, N, 1, RES, AYB, BERR_OUT( J ) ) |
* |
* |
* End of loop for each RHS. |
* End of loop for each RHS. |