560 SUBROUTINE sgbsvxx( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
561 $ ldafb, ipiv, equed, r, c, b, ldb, x, ldx,
562 $ rcond, rpvgrw, berr, n_err_bnds,
563 $ err_bnds_norm, err_bnds_comp, nparams, params,
564 $ work, iwork, info )
572 CHARACTER EQUED, FACT, TRANS
573 INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, NRHS, NPARAMS,
578 INTEGER IPIV( * ), IWORK( * )
579 REAL AB( ldab, * ), AFB( ldafb, * ), B( ldb, * ),
580 $ x( ldx , * ),work( * )
581 REAL R( * ), C( * ), PARAMS( * ), BERR( * ),
582 $ err_bnds_norm( nrhs, * ),
583 $ err_bnds_comp( nrhs, * )
590 parameter ( zero = 0.0e+0, one = 1.0e+0 )
591 INTEGER FINAL_NRM_ERR_I, FINAL_CMP_ERR_I, BERR_I
592 INTEGER RCOND_I, NRM_RCOND_I, NRM_ERR_I, CMP_RCOND_I
593 INTEGER CMP_ERR_I, PIV_GROWTH_I
594 parameter ( final_nrm_err_i = 1, final_cmp_err_i = 2,
596 parameter ( rcond_i = 4, nrm_rcond_i = 5, nrm_err_i = 6 )
597 parameter ( cmp_rcond_i = 7, cmp_err_i = 8,
601 LOGICAL COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU
602 INTEGER INFEQU, I, J, KL, KU
603 REAL AMAX, BIGNUM, COLCND, RCMAX, RCMIN,
609 REAL SLAMCH, SLA_GBRPVGRW
621 nofact = lsame( fact,
'N' )
622 equil = lsame( fact,
'E' )
623 notran = lsame( trans,
'N' )
624 smlnum = slamch(
'Safe minimum' )
625 bignum = one / smlnum
626 IF( nofact .OR. equil )
THEN
631 rowequ = lsame( equed,
'R' ) .OR. lsame( equed,
'B' )
632 colequ = lsame( equed,
'C' ) .OR. lsame( equed,
'B' )
643 IF( .NOT.nofact .AND. .NOT.equil .AND. .NOT.
644 $ lsame( fact,
'F' ) )
THEN
646 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) .AND. .NOT.
647 $ lsame( trans,
'C' ) )
THEN
649 ELSE IF( n.LT.0 )
THEN
651 ELSE IF( kl.LT.0 )
THEN
653 ELSE IF( ku.LT.0 )
THEN
655 ELSE IF( nrhs.LT.0 )
THEN
657 ELSE IF( ldab.LT.kl+ku+1 )
THEN
659 ELSE IF( ldafb.LT.2*kl+ku+1 )
THEN
661 ELSE IF( lsame( fact,
'F' ) .AND. .NOT.
662 $ ( rowequ .OR. colequ .OR. lsame( equed,
'N' ) ) )
THEN
669 rcmin = min( rcmin, r( j ) )
670 rcmax = max( rcmax, r( j ) )
672 IF( rcmin.LE.zero )
THEN
674 ELSE IF( n.GT.0 )
THEN
675 rowcnd = max( rcmin, smlnum ) / min( rcmax, bignum )
680 IF( colequ .AND. info.EQ.0 )
THEN
684 rcmin = min( rcmin, c( j ) )
685 rcmax = max( rcmax, c( j ) )
687 IF( rcmin.LE.zero )
THEN
689 ELSE IF( n.GT.0 )
THEN
690 colcnd = max( rcmin, smlnum ) / min( rcmax, bignum )
696 IF( ldb.LT.max( 1, n ) )
THEN
698 ELSE IF( ldx.LT.max( 1, n ) )
THEN
705 CALL xerbla(
'SGBSVXX', -info )
713 CALL sgbequb( n, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd,
715 IF( infequ.EQ.0 )
THEN
719 CALL slaqgb( n, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd,
721 rowequ = lsame( equed,
'R' ) .OR. lsame( equed,
'B' )
722 colequ = lsame( equed,
'C' ) .OR. lsame( equed,
'B' )
727 IF ( .NOT.rowequ )
THEN
732 IF ( .NOT.colequ )
THEN
742 IF( rowequ )
CALL slascl2(n, nrhs, r, b, ldb)
744 IF( colequ )
CALL slascl2(n, nrhs, c, b, ldb)
747 IF( nofact .OR. equil )
THEN
752 DO 30, i = kl+1, 2*kl+ku+1
753 afb( i, j ) = ab( i-kl, j )
756 CALL sgbtrf( n, n, kl, ku, afb, ldafb, ipiv, info )
766 rpvgrw = sla_gbrpvgrw( n, kl, ku, info, ab, ldab, afb,
774 rpvgrw = sla_gbrpvgrw( n, kl, ku, n, ab, ldab, afb, ldafb )
778 CALL slacpy(
'Full', n, nrhs, b, ldb, x, ldx )
779 CALL sgbtrs( trans, n, kl, ku, nrhs, afb, ldafb, ipiv, x, ldx,
785 CALL sgbrfsx( trans, equed, n, kl, ku, nrhs, ab, ldab, afb, ldafb,
786 $ ipiv, r, c, b, ldb, x, ldx, rcond, berr,
787 $ n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params,
788 $ work, iwork, info )
792 IF ( colequ .AND. notran )
THEN
793 CALL slascl2 ( n, nrhs, c, x, ldx )
794 ELSE IF ( rowequ .AND. .NOT.notran )
THEN
795 CALL slascl2 ( n, nrhs, r, x, ldx )
real function sla_gbrpvgrw(N, KL, KU, NCOLS, AB, LDAB, AFB, LDAFB)
SLA_GBRPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a general banded matrix...
subroutine sgbsvxx(FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX, RCOND, RPVGRW, BERR, N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, IWORK, INFO)
SGBSVXX computes the solution to system of linear equations A * X = B for GB matrices ...
subroutine slascl2(M, N, D, X, LDX)
SLASCL2 performs diagonal scaling on a vector.
subroutine slaqgb(M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND, AMAX, EQUED)
SLAQGB scales a general band matrix, using row and column scaling factors computed by sgbequ...
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine slacpy(UPLO, M, N, A, LDA, B, LDB)
SLACPY copies all or part of one two-dimensional array to another.
subroutine sgbrfsx(TRANS, EQUED, N, KL, KU, NRHS, AB, LDAB, AFB, LDAFB, IPIV, R, C, B, LDB, X, LDX, RCOND, BERR, N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS, WORK, IWORK, INFO)
SGBRFSX
subroutine sgbtrs(TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO)
SGBTRS
real function slamch(CMACH)
SLAMCH
logical function lsame(CA, CB)
LSAME
subroutine sgbequb(M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND, AMAX, INFO)
SGBEQUB
subroutine sgbtrf(M, N, KL, KU, AB, LDAB, IPIV, INFO)
SGBTRF