400 SUBROUTINE zsyrfsx( UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV,
401 $ s,
b, ldb, x, ldx, rcond, berr, n_err_bnds,
402 $ err_bnds_norm, err_bnds_comp, nparams, params,
403 $ work, rwork, info )
411 CHARACTER uplo, equed
412 INTEGER info, lda, ldaf, ldb, ldx, n, nrhs, nparams,
414 DOUBLE PRECISION rcond
418 COMPLEX*16 a( lda, * ), af( ldaf, * ),
b( ldb, * ),
419 $ x( ldx, * ), work( * )
420 DOUBLE PRECISION s( * ), params( * ), berr( * ), rwork( * ),
421 $ err_bnds_norm( nrhs, * ),
422 $ err_bnds_comp( nrhs, * )
428 DOUBLE PRECISION zero, one
429 parameter( zero = 0.0d+0, one = 1.0d+0 )
430 DOUBLE PRECISION itref_default, ithresh_default
431 DOUBLE PRECISION componentwise_default, rthresh_default
432 DOUBLE PRECISION dzthresh_default
433 parameter( itref_default = 1.0d+0 )
434 parameter( ithresh_default = 10.0d+0 )
435 parameter( componentwise_default = 1.0d+0 )
436 parameter( rthresh_default = 0.5d+0 )
437 parameter( dzthresh_default = 0.25d+0 )
438 INTEGER la_linrx_itref_i, la_linrx_ithresh_i,
440 parameter( la_linrx_itref_i = 1,
441 $ la_linrx_ithresh_i = 2 )
442 parameter( la_linrx_cwise_i = 3 )
443 INTEGER la_linrx_trust_i, la_linrx_err_i,
445 parameter( la_linrx_trust_i = 1, la_linrx_err_i = 2 )
446 parameter( la_linrx_rcond_i = 3 )
451 INTEGER j, prec_type, ref_type
453 DOUBLE PRECISION anorm, rcond_tmp
454 DOUBLE PRECISION illrcond_thresh, err_lbnd, cwise_wrong
457 DOUBLE PRECISION rthresh, unstable_thresh
463 INTRINSIC max, sqrt, transfer
470 INTEGER blas_fpinfo_x
478 ref_type = int( itref_default )
479 IF ( nparams .GE. la_linrx_itref_i )
THEN
480 IF ( params( la_linrx_itref_i ) .LT. 0.0d+0 )
THEN
481 params( la_linrx_itref_i ) = itref_default
483 ref_type = params( la_linrx_itref_i )
489 illrcond_thresh = dble( n ) *
dlamch(
'Epsilon' )
490 ithresh = int( ithresh_default )
491 rthresh = rthresh_default
492 unstable_thresh = dzthresh_default
493 ignore_cwise = componentwise_default .EQ. 0.0d+0
495 IF ( nparams.GE.la_linrx_ithresh_i )
THEN
496 IF ( params( la_linrx_ithresh_i ).LT.0.0d+0 )
THEN
497 params( la_linrx_ithresh_i ) = ithresh
499 ithresh = int( params( la_linrx_ithresh_i ) )
502 IF ( nparams.GE.la_linrx_cwise_i )
THEN
503 IF ( params( la_linrx_cwise_i ).LT.0.0d+0 )
THEN
504 IF ( ignore_cwise )
THEN
505 params( la_linrx_cwise_i ) = 0.0d+0
507 params( la_linrx_cwise_i ) = 1.0d+0
510 ignore_cwise = params( la_linrx_cwise_i ) .EQ. 0.0d+0
513 IF ( ref_type .EQ. 0 .OR. n_err_bnds .EQ. 0 )
THEN
515 ELSE IF ( ignore_cwise )
THEN
521 rcequ =
lsame( equed,
'Y' )
525 IF ( .NOT.
lsame( uplo,
'U' ) .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
527 ELSE IF( .NOT.rcequ .AND. .NOT.
lsame( equed,
'N' ) )
THEN
529 ELSE IF( n.LT.0 )
THEN
531 ELSE IF( nrhs.LT.0 )
THEN
533 ELSE IF( lda.LT.max( 1, n ) )
THEN
535 ELSE IF( ldaf.LT.max( 1, n ) )
THEN
537 ELSE IF( ldb.LT.max( 1, n ) )
THEN
539 ELSE IF( ldx.LT.max( 1, n ) )
THEN
543 CALL
xerbla(
'ZSYRFSX', -info )
549 IF( n.EQ.0 .OR. nrhs.EQ.0 )
THEN
553 IF ( n_err_bnds .GE. 1 )
THEN
554 err_bnds_norm(
j, la_linrx_trust_i ) = 1.0d+0
555 err_bnds_comp(
j, la_linrx_trust_i ) = 1.0d+0
557 IF ( n_err_bnds .GE. 2 )
THEN
558 err_bnds_norm(
j, la_linrx_err_i ) = 0.0d+0
559 err_bnds_comp(
j, la_linrx_err_i ) = 0.0d+0
561 IF ( n_err_bnds .GE. 3 )
THEN
562 err_bnds_norm(
j, la_linrx_rcond_i ) = 1.0d+0
563 err_bnds_comp(
j, la_linrx_rcond_i ) = 1.0d+0
574 IF ( n_err_bnds .GE. 1 )
THEN
575 err_bnds_norm(
j, la_linrx_trust_i ) = 1.0d+0
576 err_bnds_comp(
j, la_linrx_trust_i ) = 1.0d+0
578 IF ( n_err_bnds .GE. 2 )
THEN
579 err_bnds_norm(
j, la_linrx_err_i ) = 1.0d+0
580 err_bnds_comp(
j, la_linrx_err_i ) = 1.0d+0
582 IF ( n_err_bnds .GE. 3 )
THEN
583 err_bnds_norm(
j, la_linrx_rcond_i ) = 0.0d+0
584 err_bnds_comp(
j, la_linrx_rcond_i ) = 0.0d+0
592 anorm =
zlansy( norm, uplo, n, a, lda, rwork )
593 CALL
zsycon( uplo, n, af, ldaf, ipiv, anorm, rcond, work,
598 IF ( ref_type .NE. 0 )
THEN
603 $ nrhs, a, lda, af, ldaf, ipiv, rcequ, s,
b,
604 $ ldb, x, ldx, berr, n_norms, err_bnds_norm, err_bnds_comp,
605 $ work, rwork, work(n+1),
606 $ transfer(rwork(1:2*n), (/ (zero, zero) /), n), rcond,
607 $ ithresh, rthresh, unstable_thresh, ignore_cwise,
611 err_lbnd = max( 10.0d+0, sqrt( dble( n ) ) ) *
dlamch(
'Epsilon' )
612 IF (n_err_bnds .GE. 1 .AND. n_norms .GE. 1)
THEN
618 $ s, .true., info, work, rwork )
621 $ s, .false., info, work, rwork )
627 IF ( n_err_bnds .GE. la_linrx_err_i
628 $ .AND. err_bnds_norm(
j, la_linrx_err_i ) .GT. 1.0d+0 )
629 $ err_bnds_norm(
j, la_linrx_err_i ) = 1.0d+0
633 IF ( rcond_tmp .LT. illrcond_thresh )
THEN
634 err_bnds_norm(
j, la_linrx_err_i ) = 1.0d+0
635 err_bnds_norm(
j, la_linrx_trust_i ) = 0.0d+0
636 IF ( info .LE. n ) info = n +
j
637 ELSE IF ( err_bnds_norm(
j, la_linrx_err_i ) .LT. err_lbnd )
639 err_bnds_norm(
j, la_linrx_err_i ) = err_lbnd
640 err_bnds_norm(
j, la_linrx_trust_i ) = 1.0d+0
645 IF ( n_err_bnds .GE. la_linrx_rcond_i )
THEN
646 err_bnds_norm(
j, la_linrx_rcond_i ) = rcond_tmp
651 IF ( n_err_bnds .GE. 1 .AND. n_norms .GE. 2 )
THEN
661 cwise_wrong = sqrt(
dlamch(
'Epsilon' ) )
663 IF ( err_bnds_comp(
j, la_linrx_err_i ) .LT. cwise_wrong )
666 $ ipiv, x(1,
j), info, work, rwork )
673 IF ( n_err_bnds .GE. la_linrx_err_i
674 $ .AND. err_bnds_comp(
j, la_linrx_err_i ) .GT. 1.0d+0 )
675 $ err_bnds_comp(
j, la_linrx_err_i ) = 1.0d+0
680 IF ( rcond_tmp .LT. illrcond_thresh )
THEN
681 err_bnds_comp(
j, la_linrx_err_i ) = 1.0d+0
682 err_bnds_comp(
j, la_linrx_trust_i ) = 0.0d+0
683 IF (.NOT. ignore_cwise
684 $ .AND. info.LT.n +
j ) info = n +
j
685 ELSE IF ( err_bnds_comp(
j, la_linrx_err_i )
686 $ .LT. err_lbnd )
THEN
687 err_bnds_comp(
j, la_linrx_err_i ) = err_lbnd
688 err_bnds_comp(
j, la_linrx_trust_i ) = 1.0d+0
693 IF ( n_err_bnds .GE. la_linrx_rcond_i )
THEN
694 err_bnds_comp(
j, la_linrx_rcond_i ) = rcond_tmp
integer function ilatrans(TRANS)
ILATRANS
double precision function zlansy(NORM, UPLO, N, A, LDA, WORK)
ZLANSY returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a complex symmetric matrix.
double precision function zla_syrcond_c(UPLO, N, A, LDA, AF, LDAF, IPIV, C, CAPPLY, INFO, WORK, RWORK)
ZLA_SYRCOND_C computes the infinity norm condition number of op(A)*inv(diag(c)) for symmetric indefin...
subroutine zsyrfsx(UPLO, EQUED, N, NRHS, A, LDA, AF, LDAF, IPIV, S, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, RWORK, INFO)
ZSYRFSX
subroutine xerbla(SRNAME, INFO)
XERBLA
double precision function zla_syrcond_x(UPLO, N, A, LDA, AF, LDAF, IPIV, X, INFO, WORK, RWORK)
ZLA_SYRCOND_X computes the infinity norm condition number of op(A)*diag(x) for symmetric indefinite m...
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real b(3) integer i
logical function lsame(CA, CB)
LSAME
subroutine zsycon(UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK, INFO)
ZSYCON
integer function ilaprec(PREC)
ILAPREC
subroutine zla_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)
ZLA_SYRFSX_EXTENDED improves the computed solution to a system of linear equations for symmetric inde...
double precision function dlamch(CMACH)
DLAMCH
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real j