124 SUBROUTINE chet01( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC,
133 INTEGER LDA, LDAFAC, LDC, N
139 COMPLEX A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
146 parameter( zero = 0.0e+0, one = 1.0e+0 )
148 parameter( czero = ( 0.0e+0, 0.0e+0 ),
149 $ cone = ( 1.0e+0, 0.0e+0 ) )
158 EXTERNAL lsame, clanhe, slamch
164 INTRINSIC aimag, real
177 eps = slamch(
'Epsilon' )
178 anorm = clanhe(
'1', uplo, n, a, lda, rwork )
184 IF( aimag( afac( j, j ) ).NE.zero )
THEN
192 CALL claset(
'Full', n, n, czero, cone, c, ldc )
196 CALL clavhe( uplo,
'Conjugate',
'Non-unit', n, n, afac, ldafac,
197 $ ipiv, c, ldc, info )
201 CALL clavhe( uplo,
'No transpose',
'Unit', n, n, afac, ldafac,
202 $ ipiv, c, ldc, info )
206 IF( lsame( uplo,
'U' ) )
THEN
209 c( i, j ) = c( i, j ) - a( i, j )
211 c( j, j ) = c( j, j ) - real( a( j, j ) )
215 c( j, j ) = c( j, j ) - real( a( j, j ) )
217 c( i, j ) = c( i, j ) - a( i, j )
224 resid = clanhe(
'1', uplo, n, c, ldc, rwork )
226 IF( anorm.LE.zero )
THEN
230 resid = ( ( resid / real( n ) ) / anorm ) / eps
subroutine chet01(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
CHET01
subroutine clavhe(uplo, trans, diag, n, nrhs, a, lda, ipiv, b, ldb, info)
CLAVHE
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.