136 SUBROUTINE cgbtrs( TRANS, N, KL, KU, NRHS, AB, LDAB, IPIV, B, LDB,
145 INTEGER INFO, KL, KU, LDAB, LDB, N, NRHS
149 COMPLEX AB( LDAB, * ), B( LDB, * )
156 parameter( one = ( 1.0e+0, 0.0e+0 ) )
159 LOGICAL LNOTI, NOTRAN
160 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(
'CGBTRS', -info )
201 IF( n.EQ.0 .OR. nrhs.EQ.0 )
223 $
CALL cswap( nrhs, b( l, 1 ), ldb, b( j, 1 ), ldb )
224 CALL cgeru( lm, nrhs, -one, ab( kd+1, j ), 1, b( j, 1 ),
225 $ ldb, b( j+1, 1 ), ldb )
233 CALL ctbsv(
'Upper',
'No transpose',
'Non-unit', n, kl+ku,
234 $ ab, ldab, b( 1, i ), 1 )
237 ELSE IF( lsame( trans,
'T' ) )
THEN
245 CALL ctbsv(
'Upper',
'Transpose',
'Non-unit', n, kl+ku, ab,
246 $ ldab, b( 1, i ), 1 )
252 DO 40 j = n - 1, 1, -1
254 CALL cgemv(
'Transpose', lm, nrhs, -one, b( j+1, 1 ),
255 $ ldb, ab( kd+1, j ), 1, one, b( j, 1 ), ldb )
258 $
CALL cswap( nrhs, b( l, 1 ), ldb, b( j, 1 ), ldb )
270 CALL ctbsv(
'Upper',
'Conjugate transpose',
'Non-unit', n,
271 $ kl+ku, ab, ldab, b( 1, i ), 1 )
277 DO 60 j = n - 1, 1, -1
279 CALL clacgv( nrhs, b( j, 1 ), ldb )
280 CALL cgemv(
'Conjugate transpose', lm, nrhs, -one,
281 $ b( j+1, 1 ), ldb, ab( kd+1, j ), 1, one,
283 CALL clacgv( nrhs, b( j, 1 ), ldb )
286 $
CALL cswap( nrhs, b( l, 1 ), ldb, b( j, 1 ), ldb )
subroutine xerbla(srname, info)
subroutine cgbtrs(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
CGBTRS
subroutine cgemv(trans, m, n, alpha, a, lda, x, incx, beta, y, incy)
CGEMV
subroutine cgeru(m, n, alpha, x, incx, y, incy, a, lda)
CGERU
subroutine clacgv(n, x, incx)
CLACGV conjugates a complex vector.
subroutine cswap(n, cx, incx, cy, incy)
CSWAP
subroutine ctbsv(uplo, trans, diag, n, k, a, lda, x, incx)
CTBSV