146 SUBROUTINE cgbt02( TRANS, M, N, KL, KU, NRHS, A, LDA, X, LDX, B,
147 $ LDB, RWORK, RESID )
155 INTEGER KL, KU, LDA, LDB, LDX, M, N, NRHS
160 COMPLEX A( LDA, * ), B( LDB, * ), X( LDX, * )
167 parameter( zero = 0.0e+0, one = 1.0e+0 )
169 parameter( cone = ( 1.0e+0, 0.0e+0 ) )
172 INTEGER I1, I2, J, KD, N1
173 REAL ANORM, BNORM, EPS, TEMP, XNORM
177 LOGICAL LSAME, SISNAN
179 EXTERNAL lsame, scasum, sisnan, slamch
188 INTRINSIC abs, aimag, max, min, real
191 cabs1( cdum ) = abs( real( cdum ) ) + abs( aimag( cdum ) )
197 IF( m.LE.0 .OR. n.LE.0 .OR. nrhs.LE.0 )
THEN
204 eps = slamch(
'Epsilon' )
206 IF( lsame( trans,
'N' ) )
THEN
212 i1 = max( kd+1-j, 1 )
213 i2 = min( kd+m-j, kl+kd )
215 temp = scasum( i2-i1+1, a( i1, j ), 1 )
216 IF( anorm.LT.temp .OR. sisnan( temp ) ) anorm = temp
228 DO 14 i1 = max( 1, j-ku ), min( m, j+kl )
229 rwork( i1 ) = rwork( i1 ) + cabs1( a( kd+i1, j ) )
234 IF( anorm.LT.temp .OR. sisnan( temp ) ) anorm = temp
237 IF( anorm.LE.zero )
THEN
242 IF( lsame( trans,
'T' ) .OR. lsame( trans,
'C' ) )
THEN
251 CALL cgbmv( trans, m, n, kl, ku, -cone, a, lda, x( 1, j ), 1,
252 $ cone, b( 1, j ), 1 )
260 bnorm = scasum( n1, b( 1, j ), 1 )
261 xnorm = scasum( n1, x( 1, j ), 1 )
262 IF( xnorm.LE.zero )
THEN
265 resid = max( resid, ( ( bnorm/anorm )/xnorm )/eps )
subroutine cgbt02(trans, m, n, kl, ku, nrhs, a, lda, x, ldx, b, ldb, rwork, resid)
CGBT02
subroutine cgbmv(trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy)
CGBMV