191 SUBROUTINE zhetrd( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
199 INTEGER INFO, LDA, LWORK, N
202 DOUBLE PRECISION D( * ), E( * )
203 COMPLEX*16 A( LDA, * ), TAU( * ), WORK( * )
210 parameter( one = 1.0d+0 )
212 parameter( cone = ( 1.0d+0, 0.0d+0 ) )
215 LOGICAL LQUERY, UPPER
216 INTEGER I, IINFO, IWS, J, KK, LDWORK, LWKOPT, NB,
228 EXTERNAL lsame, ilaenv
235 upper = lsame( uplo,
'U' )
236 lquery = ( lwork.EQ.-1 )
237 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
239 ELSE IF( n.LT.0 )
THEN
241 ELSE IF( lda.LT.max( 1, n ) )
THEN
243 ELSE IF( lwork.LT.1 .AND. .NOT.lquery )
THEN
251 nb = ilaenv( 1,
'ZHETRD', uplo, n, -1, -1, -1 )
257 CALL xerbla(
'ZHETRD', -info )
259 ELSE IF( lquery )
THEN
272 IF( nb.GT.1 .AND. nb.LT.n )
THEN
277 nx = max( nb, ilaenv( 3,
'ZHETRD', uplo, n, -1, -1, -1 ) )
284 IF( lwork.LT.iws )
THEN
290 nb = max( lwork / ldwork, 1 )
291 nbmin = ilaenv( 2,
'ZHETRD', uplo, n, -1, -1, -1 )
307 kk = n - ( ( n-nx+nb-1 ) / nb )*nb
308 DO 20 i = n - nb + 1, kk + 1, -nb
314 CALL zlatrd( uplo, i+nb-1, nb, a, lda, e, tau, work,
320 CALL zher2k( uplo,
'No transpose', i-1, nb, -cone,
321 $ a( 1, i ), lda, work, ldwork, one, a, lda )
326 DO 10 j = i, i + nb - 1
327 a( j-1, j ) = e( j-1 )
328 d( j ) = dble( a( j, j ) )
334 CALL zhetd2( uplo, kk, a, lda, d, e, tau, iinfo )
339 DO 40 i = 1, n - nx, nb
345 CALL zlatrd( uplo, n-i+1, nb, a( i, i ), lda, e( i ),
346 $ tau( i ), work, ldwork )
351 CALL zher2k( uplo,
'No transpose', n-i-nb+1, nb, -cone,
352 $ a( i+nb, i ), lda, work( nb+1 ), ldwork, one,
353 $ a( i+nb, i+nb ), lda )
358 DO 30 j = i, i + nb - 1
360 d( j ) = dble( a( j, j ) )
366 CALL zhetd2( uplo, n-i+1, a( i, i ), lda, d( i ), e( i ),
subroutine xerbla(srname, info)
subroutine zher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZHER2K
subroutine zhetd2(uplo, n, a, lda, d, e, tau, info)
ZHETD2 reduces a Hermitian matrix to real symmetric tridiagonal form by an unitary similarity transfo...
subroutine zhetrd(uplo, n, a, lda, d, e, tau, work, lwork, info)
ZHETRD
subroutine zlatrd(uplo, n, nb, a, lda, e, tau, w, ldw)
ZLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal fo...