124 $ LDC, RWORK, RESID )
132 INTEGER LDA, LDAFAC, LDC, N
138 COMPLEX A( LDA, * ), AFAC( LDAFAC, * ), C( LDC, * )
145 parameter( zero = 0.0e+0, one = 1.0e+0 )
147 parameter( czero = ( 0.0e+0, 0.0e+0 ),
148 $ cone = ( 1.0e+0, 0.0e+0 ) )
157 EXTERNAL lsame, clanhe, slamch
163 INTRINSIC aimag, real
176 eps = slamch(
'Epsilon' )
177 anorm = clanhe(
'1', uplo, n, a, lda, rwork )
183 IF( aimag( afac( j, j ) ).NE.zero )
THEN
191 CALL claset(
'Full', n, n, czero, cone, c, ldc )
195 CALL clavhe_rook( uplo,
'Conjugate',
'Non-unit', n, n, afac,
196 $ ldafac, ipiv, c, ldc, info )
200 CALL clavhe_rook( uplo,
'No transpose',
'Unit', n, n, afac,
201 $ ldafac, ipiv, c, ldc, info )
205 IF( lsame( uplo,
'U' ) )
THEN
208 c( i, j ) = c( i, j ) - a( i, j )
210 c( j, j ) = c( j, j ) - real( a( j, j ) )
214 c( j, j ) = c( j, j ) - real( a( j, j ) )
216 c( i, j ) = c( i, j ) - a( i, j )
223 resid = clanhe(
'1', uplo, n, c, ldc, rwork )
225 IF( anorm.LE.zero )
THEN
229 resid = ( ( resid/real( n ) )/anorm ) / eps
subroutine chet01_rook(uplo, n, a, lda, afac, ldafac, ipiv, c, ldc, rwork, resid)
CHET01_ROOK
subroutine clavhe_rook(uplo, trans, diag, n, nrhs, a, lda, ipiv, b, ldb, info)
CLAVHE_ROOK
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.