112 SUBROUTINE chpt01( UPLO, N, A, AFAC, IPIV, C, LDC, RWORK, RESID )
126 COMPLEX A( * ), AFAC( * ), C( LDC, * )
133 parameter( zero = 0.0e+0, one = 1.0e+0 )
135 parameter( czero = ( 0.0e+0, 0.0e+0 ),
136 $ cone = ( 1.0e+0, 0.0e+0 ) )
139 INTEGER I, INFO, J, JC
144 REAL CLANHE, CLANHP, SLAMCH
145 EXTERNAL lsame, clanhe, clanhp, slamch
151 INTRINSIC aimag, real
164 eps = slamch(
'Epsilon' )
165 anorm = clanhp(
'1', uplo, n, a, rwork )
171 IF( lsame( uplo,
'U' ) )
THEN
173 IF( aimag( afac( jc ) ).NE.zero )
THEN
181 IF( aimag( afac( jc ) ).NE.zero )
THEN
191 CALL claset(
'Full', n, n, czero, cone, c, ldc )
195 CALL clavhp( uplo,
'Conjugate',
'Non-unit', n, n, afac, ipiv, c,
200 CALL clavhp( uplo,
'No transpose',
'Unit', n, n, afac, ipiv, c,
205 IF( lsame( uplo,
'U' ) )
THEN
209 c( i, j ) = c( i, j ) - a( jc+i )
211 c( j, j ) = c( j, j ) - real( a( jc+j ) )
217 c( j, j ) = c( j, j ) - real( a( jc ) )
219 c( i, j ) = c( i, j ) - a( jc+i-j )
227 resid = clanhe(
'1', uplo, n, c, ldc, rwork )
229 IF( anorm.LE.zero )
THEN
233 resid = ( ( resid / real( n ) ) / anorm ) / eps
subroutine chpt01(uplo, n, a, afac, ipiv, c, ldc, rwork, resid)
CHPT01
subroutine clavhp(uplo, trans, diag, n, nrhs, a, ipiv, b, ldb, info)
CLAVHP
subroutine claset(uplo, m, n, alpha, beta, a, lda)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.