118 SUBROUTINE cpbt01( UPLO, N, KD, A, LDA, AFAC, LDAFAC, RWORK,
127 INTEGER KD, LDA, LDAFAC, N
132 COMPLEX A( LDA, * ), AFAC( LDAFAC, * )
140 parameter( zero = 0.0e+0, one = 1.0e+0 )
143 INTEGER I, J, K, KC, KLEN, ML, MU
150 EXTERNAL lsame, clanhb, slamch, cdotc
156 INTRINSIC aimag, max, min, real
169 eps = slamch(
'Epsilon' )
170 anorm = clanhb(
'1', uplo, n, kd, a, lda, rwork )
171 IF( anorm.LE.zero )
THEN
179 IF( lsame( uplo,
'U' ) )
THEN
181 IF( aimag( afac( kd+1, j ) ).NE.zero )
THEN
188 IF( aimag( afac( 1, j ) ).NE.zero )
THEN
197 IF( lsame( uplo,
'U' ) )
THEN
199 kc = max( 1, kd+2-k )
205 $ cdotc( klen+1, afac( kc, k ), 1, afac( kc, k ), 1 ) )
206 afac( kd+1, k ) = akk
211 $
CALL ctrmv(
'Upper',
'Conjugate',
'Non-unit', klen,
212 $ afac( kd+1, k-klen ), ldafac-1,
221 klen = min( kd, n-k )
227 $
CALL cher(
'Lower', klen, one, afac( 2, k ), 1,
228 $ afac( 1, k+1 ), ldafac-1 )
232 akk = real( afac( 1, k ) )
233 CALL csscal( klen+1, akk, afac( 1, k ), 1 )
240 IF( lsame( uplo,
'U' ) )
THEN
242 mu = max( 1, kd+2-j )
244 afac( i, j ) = afac( i, j ) - a( i, j )
249 ml = min( kd+1, n-j+1 )
251 afac( i, j ) = afac( i, j ) - a( i, j )
258 resid = clanhb(
'1', uplo, n, kd, afac, ldafac, rwork )
260 resid = ( ( resid / real( n ) ) / anorm ) / eps
subroutine cpbt01(uplo, n, kd, a, lda, afac, ldafac, rwork, resid)
CPBT01
subroutine ctrmv(uplo, trans, diag, n, a, lda, x, incx)
CTRMV