125 SUBROUTINE zhet01_rook( UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C,
126 $ ldc, rwork, resid )
135 INTEGER LDA, LDAFAC, LDC, N
136 DOUBLE PRECISION RESID
140 DOUBLE PRECISION RWORK( * )
141 COMPLEX*16 A( lda, * ), AFAC( ldafac, * ), C( ldc, * )
147 DOUBLE PRECISION ZERO, ONE
148 parameter ( zero = 0.0d+0, one = 1.0d+0 )
149 COMPLEX*16 CZERO, CONE
150 parameter ( czero = ( 0.0d+0, 0.0d+0 ),
151 $ cone = ( 1.0d+0, 0.0d+0 ) )
155 DOUBLE PRECISION ANORM, EPS
159 DOUBLE PRECISION ZLANHE, DLAMCH
160 EXTERNAL lsame, zlanhe, dlamch
166 INTRINSIC dimag, dble
179 eps = dlamch(
'Epsilon' )
180 anorm = zlanhe(
'1', uplo, n, a, lda, rwork )
186 IF( dimag( afac( j, j ) ).NE.zero )
THEN
194 CALL zlaset(
'Full', n, n, czero, cone, c, ldc )
198 CALL zlavhe_rook( uplo,
'Conjugate',
'Non-unit', n, n, afac,
199 $ ldafac, ipiv, c, ldc, info )
203 CALL zlavhe_rook( uplo,
'No transpose',
'Unit', n, n, afac,
204 $ ldafac, ipiv, c, ldc, info )
208 IF( lsame( uplo,
'U' ) )
THEN
211 c( i, j ) = c( i, j ) - a( i, j )
213 c( j, j ) = c( j, j ) - dble( a( j, j ) )
217 c( j, j ) = c( j, j ) - dble( a( j, j ) )
219 c( i, j ) = c( i, j ) - a( i, j )
226 resid = zlanhe(
'1', uplo, n, c, ldc, rwork )
228 IF( anorm.LE.zero )
THEN
232 resid = ( ( resid/dble( n ) )/anorm ) / eps
subroutine zhet01_rook(UPLO, N, A, LDA, AFAC, LDAFAC, IPIV, C, LDC, RWORK, RESID)
ZHET01_ROOK
subroutine zlavhe_rook(UPLO, TRANS, DIAG, N, NRHS, A, LDA, IPIV, B, LDB, INFO)
ZLAVHE_ROOK
subroutine zlaset(UPLO, M, N, ALPHA, BETA, A, LDA)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...