383 $ af, ldaf, colequ, c, b, ldb, y,
384 $ ldy, berr_out, n_norms,
385 $ err_bnds_norm, err_bnds_comp, res,
386 $ ayb, dy, y_tail, rcond, ithresh,
387 $ rthresh, dz_ub, ignore_cwise,
396 INTEGER INFO, LDA, LDAF, LDB, LDY, N, NRHS, PREC_TYPE,
399 LOGICAL COLEQU, IGNORE_CWISE
403 REAL A( lda, * ), AF( ldaf, * ), B( ldb, * ),
404 $ y( ldy, * ), res( * ), dy( * ), y_tail( * )
405 REAL C( * ), AYB(*), RCOND, BERR_OUT( * ),
406 $ err_bnds_norm( nrhs, * ),
407 $ err_bnds_comp( nrhs, * )
413 INTEGER UPLO2, CNT, I, J, X_STATE, Z_STATE
414 REAL YK, DYK, YMIN, NORMY, NORMX, NORMDX, DXRAT,
415 $ dzrat, prevnormdx, prev_dz_z, dxratmax,
416 $ dzratmax, dx_x, dz_z, final_dx_x, final_dz_z,
417 $ eps, hugeval, incr_thresh
421 INTEGER UNSTABLE_STATE, WORKING_STATE, CONV_STATE,
422 $ noprog_state, y_prec_state, base_residual,
423 $ extra_residual, extra_y
424 parameter ( unstable_state = 0, working_state = 1,
425 $ conv_state = 2, noprog_state = 3 )
426 parameter ( base_residual = 0, extra_residual = 1,
428 INTEGER FINAL_NRM_ERR_I, FINAL_CMP_ERR_I, BERR_I
429 INTEGER RCOND_I, NRM_RCOND_I, NRM_ERR_I, CMP_RCOND_I
430 INTEGER CMP_ERR_I, PIV_GROWTH_I
431 parameter ( final_nrm_err_i = 1, final_cmp_err_i = 2,
433 parameter ( rcond_i = 4, nrm_rcond_i = 5, nrm_err_i = 6 )
434 parameter ( cmp_rcond_i = 7, cmp_err_i = 8,
436 INTEGER LA_LINRX_ITREF_I, LA_LINRX_ITHRESH_I,
438 parameter ( la_linrx_itref_i = 1,
439 $ la_linrx_ithresh_i = 2 )
440 parameter ( la_linrx_cwise_i = 3 )
441 INTEGER LA_LINRX_TRUST_I, LA_LINRX_ERR_I,
443 parameter ( la_linrx_trust_i = 1, la_linrx_err_i = 2 )
444 parameter ( la_linrx_rcond_i = 3 )
458 INTRINSIC abs, max, min
462 IF (info.NE.0)
RETURN
463 eps = slamch(
'Epsilon' )
464 hugeval = slamch(
'Overflow' )
466 hugeval = hugeval * hugeval
468 incr_thresh =
REAL( N ) * EPS
470 IF ( lsame( uplo,
'L' ) )
THEN
471 uplo2 = ilauplo(
'L' )
473 uplo2 = ilauplo(
'U' )
477 y_prec_state = extra_residual
478 IF ( y_prec_state .EQ. extra_y )
THEN
495 x_state = working_state
496 z_state = unstable_state
504 CALL scopy( n, b( 1, j ), 1, res, 1 )
505 IF ( y_prec_state .EQ. base_residual )
THEN
506 CALL ssymv( uplo, n, -1.0, a, lda, y(1,j), 1,
508 ELSE IF ( y_prec_state .EQ. extra_residual )
THEN
509 CALL blas_ssymv_x( uplo2, n, -1.0, a, lda,
510 $ y( 1, j ), 1, 1.0, res, 1, prec_type )
512 CALL blas_ssymv2_x(uplo2, n, -1.0, a, lda,
513 $ y(1, j), y_tail, 1, 1.0, res, 1, prec_type)
517 CALL scopy( n, res, 1, dy, 1 )
518 CALL spotrs( uplo, n, 1, af, ldaf, dy, n, info )
529 yk = abs( y( i, j ) )
532 IF ( yk .NE. 0.0 )
THEN
533 dz_z = max( dz_z, dyk / yk )
534 ELSE IF ( dyk .NE. 0.0 )
THEN
538 ymin = min( ymin, yk )
540 normy = max( normy, yk )
543 normx = max( normx, yk * c( i ) )
544 normdx = max( normdx, dyk * c( i ) )
547 normdx = max( normdx, dyk )
551 IF ( normx .NE. 0.0 )
THEN
552 dx_x = normdx / normx
553 ELSE IF ( normdx .EQ. 0.0 )
THEN
559 dxrat = normdx / prevnormdx
560 dzrat = dz_z / prev_dz_z
564 IF ( ymin*rcond .LT. incr_thresh*normy
565 $ .AND. y_prec_state .LT. extra_y )
568 IF ( x_state .EQ. noprog_state .AND. dxrat .LE. rthresh )
569 $ x_state = working_state
570 IF ( x_state .EQ. working_state )
THEN
571 IF ( dx_x .LE. eps )
THEN
573 ELSE IF ( dxrat .GT. rthresh )
THEN
574 IF ( y_prec_state .NE. extra_y )
THEN
577 x_state = noprog_state
580 IF ( dxrat .GT. dxratmax ) dxratmax = dxrat
582 IF ( x_state .GT. working_state ) final_dx_x = dx_x
585 IF ( z_state .EQ. unstable_state .AND. dz_z .LE. dz_ub )
586 $ z_state = working_state
587 IF ( z_state .EQ. noprog_state .AND. dzrat .LE. rthresh )
588 $ z_state = working_state
589 IF ( z_state .EQ. working_state )
THEN
590 IF ( dz_z .LE. eps )
THEN
592 ELSE IF ( dz_z .GT. dz_ub )
THEN
593 z_state = unstable_state
596 ELSE IF ( dzrat .GT. rthresh )
THEN
597 IF ( y_prec_state .NE. extra_y )
THEN
600 z_state = noprog_state
603 IF ( dzrat .GT. dzratmax ) dzratmax = dzrat
605 IF ( z_state .GT. working_state ) final_dz_z = dz_z
608 IF ( x_state.NE.working_state.AND.
609 $ ( ignore_cwise.OR.z_state.NE.working_state ) )
612 IF ( incr_prec )
THEN
614 y_prec_state = y_prec_state + 1
625 IF (y_prec_state .LT. extra_y)
THEN
626 CALL saxpy( n, 1.0, dy, 1, y(1,j), 1 )
637 IF ( x_state .EQ. working_state ) final_dx_x = dx_x
638 IF ( z_state .EQ. working_state ) final_dz_z = dz_z
642 IF ( n_norms .GE. 1 )
THEN
643 err_bnds_norm( j, la_linrx_err_i ) =
644 $ final_dx_x / (1 - dxratmax)
646 IF ( n_norms .GE. 2 )
THEN
647 err_bnds_comp( j, la_linrx_err_i ) =
648 $ final_dz_z / (1 - dzratmax)
659 CALL scopy( n, b( 1, j ), 1, res, 1 )
660 CALL ssymv( uplo, n, -1.0, a, lda, y(1,j), 1, 1.0, res, 1 )
663 ayb( i ) = abs( b( i, j ) )
669 $ a, lda, y(1, j), 1, 1.0, ayb, 1 )
subroutine sla_syamv(UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
SLA_SYAMV computes a matrix-vector product using a symmetric indefinite matrix to calculate error bou...
integer function ilauplo(UPLO)
ILAUPLO
subroutine spotrs(UPLO, N, NRHS, A, LDA, B, LDB, INFO)
SPOTRS
subroutine saxpy(N, SA, SX, INCX, SY, INCY)
SAXPY
subroutine sla_porfsx_extended(PREC_TYPE, UPLO, N, NRHS, A, LDA, AF, LDAF, 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)
SLA_PORFSX_EXTENDED improves the computed solution to a system of linear equations for symmetric or H...
subroutine sla_lin_berr(N, NZ, NRHS, RES, AYB, BERR)
SLA_LIN_BERR computes a component-wise relative backward error.
subroutine sla_wwaddw(N, X, Y, W)
SLA_WWADDW adds a vector into a doubled-single vector.
subroutine ssymv(UPLO, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
SSYMV
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY