191 SUBROUTINE chetrd( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
199 INTEGER INFO, LDA, LWORK, N
203 COMPLEX A( LDA, * ), TAU( * ), WORK( * )
210 parameter( one = 1.0e+0 )
212 parameter( cone = ( 1.0e+0, 0.0e+0 ) )
215 LOGICAL LQUERY, UPPER
216 INTEGER I, IINFO, IWS, J, KK, LDWORK, LWKOPT, NB,
229 EXTERNAL lsame, ilaenv, sroundup_lwork
236 upper = lsame( uplo,
'U' )
237 lquery = ( lwork.EQ.-1 )
238 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
240 ELSE IF( n.LT.0 )
THEN
242 ELSE IF( lda.LT.max( 1, n ) )
THEN
244 ELSE IF( lwork.LT.1 .AND. .NOT.lquery )
THEN
252 nb = ilaenv( 1,
'CHETRD', uplo, n, -1, -1, -1 )
254 work( 1 ) = sroundup_lwork(lwkopt)
258 CALL xerbla(
'CHETRD', -info )
260 ELSE IF( lquery )
THEN
273 IF( nb.GT.1 .AND. nb.LT.n )
THEN
278 nx = max( nb, ilaenv( 3,
'CHETRD', uplo, n, -1, -1, -1 ) )
285 IF( lwork.LT.iws )
THEN
291 nb = max( lwork / ldwork, 1 )
292 nbmin = ilaenv( 2,
'CHETRD', uplo, n, -1, -1, -1 )
308 kk = n - ( ( n-nx+nb-1 ) / nb )*nb
309 DO 20 i = n - nb + 1, kk + 1, -nb
315 CALL clatrd( uplo, i+nb-1, nb, a, lda, e, tau, work,
321 CALL cher2k( uplo,
'No transpose', i-1, nb, -cone,
322 $ a( 1, i ), lda, work, ldwork, one, a, lda )
327 DO 10 j = i, i + nb - 1
328 a( j-1, j ) = e( j-1 )
329 d( j ) = real( a( j, j ) )
335 CALL chetd2( uplo, kk, a, lda, d, e, tau, iinfo )
340 DO 40 i = 1, n - nx, nb
346 CALL clatrd( uplo, n-i+1, nb, a( i, i ), lda, e( i ),
347 $ tau( i ), work, ldwork )
352 CALL cher2k( uplo,
'No transpose', n-i-nb+1, nb, -cone,
353 $ a( i+nb, i ), lda, work( nb+1 ), ldwork, one,
354 $ a( i+nb, i+nb ), lda )
359 DO 30 j = i, i + nb - 1
361 d( j ) = real( a( j, j ) )
367 CALL chetd2( uplo, n-i+1, a( i, i ), lda, d( i ), e( i ),
371 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
subroutine cher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
CHER2K
subroutine chetd2(uplo, n, a, lda, d, e, tau, info)
CHETD2 reduces a Hermitian matrix to real symmetric tridiagonal form by an unitary similarity transfo...
subroutine chetrd(uplo, n, a, lda, d, e, tau, work, lwork, info)
CHETRD
subroutine clatrd(uplo, n, nb, a, lda, e, tau, w, ldw)
CLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal fo...