390 $ AF, LDAF, IPIV, COLEQU, C, B, LDB,
391 $ Y, LDY, BERR_OUT, N_NORMS,
392 $ ERR_BNDS_NORM, ERR_BNDS_COMP, RES,
393 $ AYB, DY, Y_TAIL, RCOND, ITHRESH,
394 $ RTHRESH, DZ_UB, IGNORE_CWISE,
402 INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
405 LOGICAL COLEQU, IGNORE_CWISE
406 DOUBLE PRECISION RTHRESH, DZ_UB
410 DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
411 $ y( ldy, * ), res( * ), dy( * ), y_tail( * )
412 DOUBLE PRECISION C( * ), AYB( * ), RCOND, BERR_OUT( * ),
413 $ ERR_BNDS_NORM( NRHS, * ),
414 $ ERR_BNDS_COMP( NRHS, * )
420 INTEGER UPLO2, CNT, I, J, X_STATE, Z_STATE
421 DOUBLE PRECISION YK, DYK, YMIN, NORMY, NORMX, NORMDX, DXRAT,
422 $ DZRAT, PREVNORMDX, PREV_DZ_Z, DXRATMAX,
423 $ DZRATMAX, DX_X, DZ_Z, FINAL_DX_X, FINAL_DZ_Z,
424 $ EPS, HUGEVAL, INCR_THRESH
425 LOGICAL INCR_PREC, UPPER
428 INTEGER UNSTABLE_STATE, WORKING_STATE, CONV_STATE,
429 $ NOPROG_STATE, Y_PREC_STATE, BASE_RESIDUAL,
430 $ EXTRA_RESIDUAL, EXTRA_Y
431 parameter( unstable_state = 0, working_state = 1,
432 $ conv_state = 2, noprog_state = 3 )
433 parameter( base_residual = 0, extra_residual = 1,
435 INTEGER FINAL_NRM_ERR_I, FINAL_CMP_ERR_I, BERR_I
436 INTEGER RCOND_I, NRM_RCOND_I, NRM_ERR_I, CMP_RCOND_I
437 INTEGER CMP_ERR_I, PIV_GROWTH_I
438 PARAMETER ( FINAL_NRM_ERR_I = 1, final_cmp_err_i = 2,
440 parameter( rcond_i = 4, nrm_rcond_i = 5, nrm_err_i = 6 )
441 parameter( cmp_rcond_i = 7, cmp_err_i = 8,
443 INTEGER LA_LINRX_ITREF_I, LA_LINRX_ITHRESH_I,
445 parameter( la_linrx_itref_i = 1,
446 $ la_linrx_ithresh_i = 2 )
447 parameter( la_linrx_cwise_i = 3 )
448 INTEGER LA_LINRX_TRUST_I, LA_LINRX_ERR_I,
450 parameter( la_linrx_trust_i = 1, la_linrx_err_i = 2 )
451 parameter( la_linrx_rcond_i = 3 )
462 DOUBLE PRECISION DLAMCH
465 INTRINSIC abs, max, min
470 upper = lsame( uplo,
'U' )
471 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
473 ELSE IF( n.LT.0 )
THEN
475 ELSE IF( nrhs.LT.0 )
THEN
477 ELSE IF( lda.LT.max( 1, n ) )
THEN
479 ELSE IF( ldaf.LT.max( 1, n ) )
THEN
481 ELSE IF( ldb.LT.max( 1, n ) )
THEN
483 ELSE IF( ldy.LT.max( 1, n ) )
THEN
487 CALL xerbla(
'DLA_SYRFSX_EXTENDED', -info )
490 eps = dlamch(
'Epsilon' )
491 hugeval = dlamch(
'Overflow' )
493 hugeval = hugeval * hugeval
495 incr_thresh = dble( n )*eps
497 IF ( lsame( uplo,
'L' ) )
THEN
498 uplo2 = ilauplo(
'L' )
500 uplo2 = ilauplo(
'U' )
504 y_prec_state = extra_residual
505 IF ( y_prec_state .EQ. extra_y )
THEN
522 x_state = working_state
523 z_state = unstable_state
531 CALL dcopy( n, b( 1, j ), 1, res, 1 )
532 IF (y_prec_state .EQ. base_residual)
THEN
533 CALL dsymv( uplo, n, -1.0d+0, a, lda, y(1,j), 1,
535 ELSE IF (y_prec_state .EQ. extra_residual)
THEN
536 CALL blas_dsymv_x( uplo2, n, -1.0d+0, a, lda,
537 $ y( 1, j ), 1, 1.0d+0, res, 1, prec_type )
539 CALL blas_dsymv2_x(uplo2, n, -1.0d+0, a, lda,
540 $ y(1, j), y_tail, 1, 1.0d+0, res, 1, prec_type)
544 CALL dcopy( n, res, 1, dy, 1 )
545 CALL dsytrs( uplo, n, 1, af, ldaf, ipiv, dy, n, info )
556 yk = abs( y( i, j ) )
559 IF ( yk .NE. 0.0d+0 )
THEN
560 dz_z = max( dz_z, dyk / yk )
561 ELSE IF ( dyk .NE. 0.0d+0 )
THEN
565 ymin = min( ymin, yk )
567 normy = max( normy, yk )
570 normx = max( normx, yk * c( i ) )
571 normdx = max( normdx, dyk * c( i ) )
574 normdx = max(normdx, dyk)
578 IF ( normx .NE. 0.0d+0 )
THEN
579 dx_x = normdx / normx
580 ELSE IF ( normdx .EQ. 0.0d+0 )
THEN
586 dxrat = normdx / prevnormdx
587 dzrat = dz_z / prev_dz_z
591 IF ( ymin*rcond .LT. incr_thresh*normy
592 $ .AND. y_prec_state .LT. extra_y )
595 IF ( x_state .EQ. noprog_state .AND. dxrat .LE. rthresh )
596 $ x_state = working_state
597 IF ( x_state .EQ. working_state )
THEN
598 IF ( dx_x .LE. eps )
THEN
600 ELSE IF ( dxrat .GT. rthresh )
THEN
601 IF ( y_prec_state .NE. extra_y )
THEN
604 x_state = noprog_state
607 IF ( dxrat .GT. dxratmax ) dxratmax = dxrat
609 IF ( x_state .GT. working_state ) final_dx_x = dx_x
612 IF ( z_state .EQ. unstable_state .AND. dz_z .LE. dz_ub )
613 $ z_state = working_state
614 IF ( z_state .EQ. noprog_state .AND. dzrat .LE. rthresh )
615 $ z_state = working_state
616 IF ( z_state .EQ. working_state )
THEN
617 IF ( dz_z .LE. eps )
THEN
619 ELSE IF ( dz_z .GT. dz_ub )
THEN
620 z_state = unstable_state
623 ELSE IF ( dzrat .GT. rthresh )
THEN
624 IF ( y_prec_state .NE. extra_y )
THEN
627 z_state = noprog_state
630 IF ( dzrat .GT. dzratmax ) dzratmax = dzrat
632 IF ( z_state .GT. working_state ) final_dz_z = dz_z
635 IF ( x_state.NE.working_state.AND.
636 $ ( ignore_cwise.OR.z_state.NE.working_state ) )
639 IF ( incr_prec )
THEN
641 y_prec_state = y_prec_state + 1
652 IF (y_prec_state .LT. extra_y)
THEN
653 CALL daxpy( n, 1.0d+0, dy, 1, y(1,j), 1 )
664 IF ( x_state .EQ. working_state ) final_dx_x = dx_x
665 IF ( z_state .EQ. working_state ) final_dz_z = dz_z
669 IF ( n_norms .GE. 1 )
THEN
670 err_bnds_norm( j, la_linrx_err_i ) =
671 $ final_dx_x / (1 - dxratmax)
673 IF ( n_norms .GE. 2 )
THEN
674 err_bnds_comp( j, la_linrx_err_i ) =
675 $ final_dz_z / (1 - dzratmax)
685 CALL dcopy( n, b( 1, j ), 1, res, 1 )
686 CALL dsymv( uplo, n, -1.0d+0, a, lda, y(1,j), 1, 1.0d+0, res,
690 ayb( i ) = abs( b( i, j ) )
696 $ a, lda, y(1, j), 1, 1.0d+0, ayb, 1 )
subroutine xerbla(srname, info)
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
DSYMV
subroutine dsytrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
DSYTRS
subroutine dla_syamv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
DLA_SYAMV computes a matrix-vector product using a symmetric indefinite matrix to calculate error bou...
subroutine dla_syrfsx_extended(prec_type, uplo, n, nrhs, a, lda, af, ldaf, ipiv, colequ, c, b, ldb, y, ldy, berr_out, n_norms, err_bnds_norm, err_bnds_comp, res, ayb, dy, y_tail, rcond, ithresh, rthresh, dz_ub, ignore_cwise, info)
DLA_SYRFSX_EXTENDED improves the computed solution to a system of linear equations for symmetric inde...
subroutine dla_lin_berr(n, nz, nrhs, res, ayb, berr)
DLA_LIN_BERR computes a component-wise relative backward error.
subroutine dla_wwaddw(n, x, y, w)
DLA_WWADDW adds a vector into a doubled-single vector.