134 SUBROUTINE zgbtrs( TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B,
144 INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
148 COMPLEX*16 AB( LDAB, * ), B( LDB, * )
155 PARAMETER ( ONE = ( 1.0d+0, 0.0d+0 ) )
158 LOGICAL LNOTI, NOTRAN
159 INTEGER I, J, KD, L, LM
177 notran = lsame( trans,
'N' )
178 IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) .AND. .NOT.
179 $ lsame( trans,
'C' ) )
THEN
181 ELSE IF( n.LT.0 )
THEN
183 ELSE IF( kl.LT.0 )
THEN
185 ELSE IF( ku.LT.0 )
THEN
187 ELSE IF( nrhs.LT.0 )
THEN
189 ELSE IF( ldab.LT.( 2*kl+ku+1 ) )
THEN
191 ELSE IF( ldb.LT.max( 1, n ) )
THEN
195 CALL xerbla(
'ZGBTRS', -info )
201 IF( n.EQ.0 .OR. nrhs.EQ.0 )
223 $
CALL zswap( nrhs, b( l, 1 ), ldb, b( j, 1 ), ldb )
224 CALL zgeru( lm, nrhs, -one, ab( kd+1, j ), 1, b( j,
226 $ ldb, b( j+1, 1 ), ldb )
234 CALL ztbsv(
'Upper',
'No transpose',
'Non-unit', n,
236 $ ab, ldab, b( 1, i ), 1 )
239 ELSE IF( lsame( trans,
'T' ) )
THEN
247 CALL ztbsv(
'Upper',
'Transpose',
'Non-unit', n, kl+ku,
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',
275 $ kl+ku, ab, ldab, b( 1, i ), 1 )
281 DO 60 j = n - 1, 1, -1
283 CALL zlacgv( nrhs, b( j, 1 ), ldb )
284 CALL zgemv(
'Conjugate transpose', lm, nrhs, -one,
285 $ b( j+1, 1 ), ldb, ab( kd+1, j ), 1, one,
287 CALL zlacgv( nrhs, b( j, 1 ), ldb )
290 $
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 zgeru(m, n, alpha, x, incx, y, incy, a, lda)
ZGERU
subroutine ztbsv(uplo, trans, diag, n, k, a, lda, x, incx)
ZTBSV