107 SUBROUTINE cpot01( UPLO, N, A, LDA, AFAC, LDAFAC, RWORK, RESID )
116 INTEGER lda, ldafac, n
121 COMPLEX a( lda, * ), afac( ldafac, * )
128 parameter( zero = 0.0e+0, one = 1.0e+0 )
145 INTRINSIC aimag, real
159 anorm =
clanhe(
'1', uplo, n, a, lda, rwork )
160 IF( anorm.LE.zero )
THEN
169 IF( aimag( afac( j, j ) ).NE.zero )
THEN
177 IF(
lsame( uplo,
'U' ) )
THEN
182 tr =
cdotc( k, afac( 1, k ), 1, afac( 1, k ), 1 )
187 CALL
ctrmv(
'Upper',
'Conjugate',
'Non-unit', k-1, afac,
188 $ ldafac, afac( 1, k ), 1 )
201 $ CALL
cher(
'Lower', n-k, one, afac( k+1, k ), 1,
202 $ afac( k+1, k+1 ), ldafac )
207 CALL
cscal( n-k+1, tc, afac( k, k ), 1 )
214 IF(
lsame( uplo,
'U' ) )
THEN
217 afac( i, j ) = afac( i, j ) - a( i, j )
219 afac( j, j ) = afac( j, j ) -
REAL( A( J, J ) )
223 afac( j, j ) = afac( j, j ) -
REAL( A( J, J ) )
225 afac( i, j ) = afac( i, j ) - a( i, j )
232 resid =
clanhe(
'1', uplo, n, afac, ldafac, rwork )
234 resid = ( ( resid /
REAL( N ) ) / anorm ) / eps