560 SUBROUTINE cgbsvxx( 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, rwork, info )
572 CHARACTER EQUED, FACT, TRANS
573 INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, NRHS, NPARAMS,
579 COMPLEX 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, * ), rwork( * )
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, CLA_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(
'CGBSVXX', -info )
713 CALL cgbequb( n, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd,
715 IF( infequ.EQ.0 )
THEN
719 CALL claqgb( 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 clascl2( n, nrhs, r, b, ldb )
744 IF( colequ )
CALL clascl2( 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 cgbtrf( n, n, kl, ku, afb, ldafb, ipiv, info )
766 rpvgrw = cla_gbrpvgrw( n, kl, ku, info, ab, ldab, afb,
774 rpvgrw = cla_gbrpvgrw( n, kl, ku, n, ab, ldab, afb, ldafb )
778 CALL clacpy(
'Full', n, nrhs, b, ldb, x, ldx )
779 CALL cgbtrs( trans, n, kl, ku, nrhs, afb, ldafb, ipiv, x, ldx,
785 CALL cgbrfsx( 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, rwork, info )
793 IF ( colequ .AND. notran )
THEN
794 CALL clascl2( n, nrhs, c, x, ldx )
795 ELSE IF ( rowequ .AND. .NOT.notran )
THEN
796 CALL clascl2( n, nrhs, r, x, ldx )
subroutine cgbtrf(M, N, KL, KU, AB, LDAB, IPIV, INFO)
CGBTRF
subroutine cgbequb(M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND, AMAX, INFO)
CGBEQUB
subroutine cgbrfsx(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, RWORK, INFO)
CGBRFSX
subroutine claqgb(M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND, AMAX, EQUED)
CLAQGB scales a general band matrix, using row and column scaling factors computed by sgbequ...
subroutine xerbla(SRNAME, INFO)
XERBLA
logical function lsame(CA, CB)
LSAME
real function slamch(CMACH)
SLAMCH
subroutine cgbsvxx(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, RWORK, INFO)
CGBSVXX computes the solution to system of linear equations A * X = B for GB matrices ...
subroutine clacpy(UPLO, M, N, A, LDA, B, LDB)
CLACPY copies all or part of one two-dimensional array to another.
subroutine clascl2(M, N, D, X, LDX)
CLASCL2 performs diagonal scaling on a vector.
real function cla_gbrpvgrw(N, KL, KU, NCOLS, AB, LDAB, AFB, LDAFB)
CLA_GBRPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a general banded matrix...
subroutine cgbtrs(TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO)
CGBTRS