555 SUBROUTINE zgbsvxx( FACT, TRANS, N, KL, KU, NRHS, AB, LDAB, AFB,
556 $ LDAFB, IPIV, EQUED, R, C, B, LDB, X, LDX,
557 $ RCOND, RPVGRW, BERR, N_ERR_BNDS,
558 $ ERR_BNDS_NORM, ERR_BNDS_COMP, NPARAMS, PARAMS,
559 $ WORK, RWORK, INFO )
566 CHARACTER EQUED, FACT, TRANS
567 INTEGER INFO, LDAB, LDAFB, LDB, LDX, N, NRHS, NPARAMS,
569 DOUBLE PRECISION RCOND, RPVGRW
573 COMPLEX*16 AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
574 $ X( LDX , * ),WORK( * )
575 DOUBLE PRECISION R( * ), C( * ), PARAMS( * ), BERR( * ),
576 $ err_bnds_norm( nrhs, * ),
577 $ err_bnds_comp( nrhs, * ), rwork( * )
583 DOUBLE PRECISION ZERO, ONE
584 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
585 INTEGER FINAL_NRM_ERR_I, FINAL_CMP_ERR_I, BERR_I
586 INTEGER RCOND_I, NRM_RCOND_I, NRM_ERR_I, CMP_RCOND_I
587 INTEGER CMP_ERR_I, PIV_GROWTH_I
588 parameter( final_nrm_err_i = 1, final_cmp_err_i = 2,
590 parameter( rcond_i = 4, nrm_rcond_i = 5, nrm_err_i = 6 )
591 parameter( cmp_rcond_i = 7, cmp_err_i = 8,
595 LOGICAL COLEQU, EQUIL, NOFACT, NOTRAN, ROWEQU
596 INTEGER INFEQU, I, J, KL, KU
597 DOUBLE PRECISION AMAX, BIGNUM, COLCND, RCMAX, RCMIN,
603 DOUBLE PRECISION DLAMCH, ZLA_GBRPVGRW
615 nofact = lsame( fact,
'N' )
616 equil = lsame( fact,
'E' )
617 notran = lsame( trans,
'N' )
618 smlnum = dlamch(
'Safe minimum' )
619 bignum = one / smlnum
620 IF( nofact .OR. equil )
THEN
625 rowequ = lsame( equed,
'R' ) .OR. lsame( equed,
'B' )
626 colequ = lsame( equed,
'C' ) .OR. lsame( equed,
'B' )
637 IF( .NOT.nofact .AND. .NOT.equil .AND. .NOT.
638 $ lsame( fact,
'F' ) )
THEN
640 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) .AND. .NOT.
641 $ lsame( trans,
'C' ) )
THEN
643 ELSE IF( n.LT.0 )
THEN
645 ELSE IF( kl.LT.0 )
THEN
647 ELSE IF( ku.LT.0 )
THEN
649 ELSE IF( nrhs.LT.0 )
THEN
651 ELSE IF( ldab.LT.kl+ku+1 )
THEN
653 ELSE IF( ldafb.LT.2*kl+ku+1 )
THEN
655 ELSE IF( lsame( fact,
'F' ) .AND. .NOT.
656 $ ( rowequ .OR. colequ .OR. lsame( equed,
'N' ) ) )
THEN
663 rcmin = min( rcmin, r( j ) )
664 rcmax = max( rcmax, r( j ) )
666 IF( rcmin.LE.zero )
THEN
668 ELSE IF( n.GT.0 )
THEN
669 rowcnd = max( rcmin, smlnum ) / min( rcmax, bignum )
674 IF( colequ .AND. info.EQ.0 )
THEN
678 rcmin = min( rcmin, c( j ) )
679 rcmax = max( rcmax, c( j ) )
681 IF( rcmin.LE.zero )
THEN
683 ELSE IF( n.GT.0 )
THEN
684 colcnd = max( rcmin, smlnum ) / min( rcmax, bignum )
690 IF( ldb.LT.max( 1, n ) )
THEN
692 ELSE IF( ldx.LT.max( 1, n ) )
THEN
699 CALL xerbla(
'ZGBSVXX', -info )
707 CALL zgbequb( n, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd,
709 IF( infequ.EQ.0 )
THEN
713 CALL zlaqgb( n, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd,
715 rowequ = lsame( equed,
'R' ) .OR. lsame( equed,
'B' )
716 colequ = lsame( equed,
'C' ) .OR. lsame( equed,
'B' )
721 IF ( .NOT.rowequ )
THEN
726 IF ( .NOT.colequ )
THEN
736 IF( rowequ )
CALL zlascl2( n, nrhs, r, b, ldb )
738 IF( colequ )
CALL zlascl2( n, nrhs, c, b, ldb )
741 IF( nofact .OR. equil )
THEN
746 DO 30, i = kl+1, 2*kl+ku+1
747 afb( i, j ) = ab( i-kl, j )
750 CALL zgbtrf( n, n, kl, ku, afb, ldafb, ipiv, info )
760 rpvgrw = zla_gbrpvgrw( n, kl, ku, info, ab, ldab, afb,
768 rpvgrw = zla_gbrpvgrw( n, kl, ku, n, ab, ldab, afb, ldafb )
772 CALL zlacpy(
'Full', n, nrhs, b, ldb, x, ldx )
773 CALL zgbtrs( trans, n, kl, ku, nrhs, afb, ldafb, ipiv, x, ldx,
779 CALL zgbrfsx( trans, equed, n, kl, ku, nrhs, ab, ldab, afb, ldafb,
780 $ ipiv, r, c, b, ldb, x, ldx, rcond, berr,
781 $ n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params,
782 $ work, rwork, info )
787 IF ( colequ .AND. notran )
THEN
788 CALL zlascl2( n, nrhs, c, x, ldx )
789 ELSE IF ( rowequ .AND. .NOT.notran )
THEN
790 CALL zlascl2( n, nrhs, r, x, ldx )
subroutine xerbla(srname, info)
subroutine zgbequb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, info)
ZGBEQUB
subroutine zgbrfsx(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)
ZGBRFSX
subroutine zgbsvxx(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)
ZGBSVXX computes the solution to system of linear equations A * X = B for GB matrices
subroutine zgbtrf(m, n, kl, ku, ab, ldab, ipiv, info)
ZGBTRF
subroutine zgbtrs(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
ZGBTRS
double precision function zla_gbrpvgrw(n, kl, ku, ncols, ab, ldab, afb, ldafb)
ZLA_GBRPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a general banded matrix.
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
double precision function dlamch(cmach)
DLAMCH
subroutine zlaqgb(m, n, kl, ku, ab, ldab, r, c, rowcnd, colcnd, amax, equed)
ZLAQGB scales a general band matrix, using row and column scaling factors computed by sgbequ.
subroutine zlascl2(m, n, d, x, ldx)
ZLASCL2 performs diagonal scaling on a matrix.
logical function lsame(ca, cb)
LSAME