138 SUBROUTINE zgbtrs( TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB,
148 INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
152 COMPLEX*16 AB( ldab, * ), B( ldb, * )
159 parameter ( one = ( 1.0d+0, 0.0d+0 ) )
162 LOGICAL LNOTI, NOTRAN
163 INTEGER I, J, KD, L, LM
180 notran = lsame( trans,
'N' )
181 IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) .AND. .NOT.
182 $ lsame( trans,
'C' ) )
THEN
184 ELSE IF( n.LT.0 )
THEN
186 ELSE IF( kl.LT.0 )
THEN
188 ELSE IF( ku.LT.0 )
THEN
190 ELSE IF( nrhs.LT.0 )
THEN
192 ELSE IF( ldab.LT.( 2*kl+ku+1 ) )
THEN
194 ELSE IF( ldb.LT.max( 1, n ) )
THEN
198 CALL xerbla(
'ZGBTRS', -info )
204 IF( n.EQ.0 .OR. nrhs.EQ.0 )
226 $
CALL zswap( nrhs, b( l, 1 ), ldb, b( j, 1 ), ldb )
227 CALL zgeru( lm, nrhs, -one, ab( kd+1, j ), 1, b( j, 1 ),
228 $ ldb, b( j+1, 1 ), ldb )
236 CALL ztbsv(
'Upper',
'No transpose',
'Non-unit', n, kl+ku,
237 $ ab, ldab, b( 1, i ), 1 )
240 ELSE IF( lsame( trans,
'T' ) )
THEN
248 CALL ztbsv(
'Upper',
'Transpose',
'Non-unit', n, kl+ku, ab,
249 $ ldab, b( 1, i ), 1 )
255 DO 40 j = n - 1, 1, -1
257 CALL zgemv(
'Transpose', lm, nrhs, -one, b( j+1, 1 ),
258 $ ldb, ab( kd+1, j ), 1, one, b( j, 1 ), ldb )
261 $
CALL zswap( nrhs, b( l, 1 ), ldb, b( j, 1 ), ldb )
273 CALL ztbsv(
'Upper',
'Conjugate transpose',
'Non-unit', n,
274 $ kl+ku, ab, ldab, b( 1, i ), 1 )
280 DO 60 j = n - 1, 1, -1
282 CALL zlacgv( nrhs, b( j, 1 ), ldb )
283 CALL zgemv(
'Conjugate transpose', lm, nrhs, -one,
284 $ b( j+1, 1 ), ldb, ab( kd+1, j ), 1, one,
286 CALL zlacgv( nrhs, b( j, 1 ), ldb )
289 $
CALL zswap( nrhs, b( l, 1 ), ldb, b( j, 1 ), ldb )
subroutine zgbtrs(TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB, INFO)
ZGBTRS
subroutine zgemv(TRANS, M, N, ALPHA, A, LDA, X, INCX, BETA, Y, INCY)
ZGEMV
subroutine zswap(N, ZX, INCX, ZY, INCY)
ZSWAP
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ztbsv(UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX)
ZTBSV
subroutine zgeru(M, N, ALPHA, X, INCX, Y, INCY, A, LDA)
ZGERU
subroutine zlacgv(N, X, INCX)
ZLACGV conjugates a complex vector.