189 SUBROUTINE ssytrd( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK,
198 INTEGER INFO, LDA, LWORK, N
201 REAL A( LDA, * ), D( * ), E( * ), TAU( * ),
209 parameter( one = 1.0e+0 )
212 LOGICAL LQUERY, UPPER
213 INTEGER I, IINFO, IWS, J, KK, LDWORK, LWKOPT, NB,
226 EXTERNAL lsame, ilaenv, sroundup_lwork
233 upper = lsame( uplo,
'U' )
234 lquery = ( lwork.EQ.-1 )
235 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
237 ELSE IF( n.LT.0 )
THEN
239 ELSE IF( lda.LT.max( 1, n ) )
THEN
241 ELSE IF( lwork.LT.1 .AND. .NOT.lquery )
THEN
249 nb = ilaenv( 1,
'SSYTRD', uplo, n, -1, -1, -1 )
250 lwkopt = max( 1, n*nb )
251 work( 1 ) = sroundup_lwork(lwkopt)
255 CALL xerbla(
'SSYTRD', -info )
257 ELSE IF( lquery )
THEN
270 IF( nb.GT.1 .AND. nb.LT.n )
THEN
275 nx = max( nb, ilaenv( 3,
'SSYTRD', uplo, n, -1, -1, -1 ) )
282 IF( lwork.LT.iws )
THEN
288 nb = max( lwork / ldwork, 1 )
289 nbmin = ilaenv( 2,
'SSYTRD', uplo, n, -1, -1, -1 )
305 kk = n - ( ( n-nx+nb-1 ) / nb )*nb
306 DO 20 i = n - nb + 1, kk + 1, -nb
312 CALL slatrd( uplo, i+nb-1, nb, a, lda, e, tau, work,
318 CALL ssyr2k( uplo,
'No transpose', i-1, nb, -one, a( 1,
320 $ lda, work, ldwork, one, a, lda )
325 DO 10 j = i, i + nb - 1
326 a( j-1, j ) = e( j-1 )
333 CALL ssytd2( uplo, kk, a, lda, d, e, tau, iinfo )
338 DO 40 i = 1, n - nx, nb
344 CALL slatrd( uplo, n-i+1, nb, a( i, i ), lda, e( i ),
345 $ tau( i ), work, ldwork )
350 CALL ssyr2k( uplo,
'No transpose', n-i-nb+1, nb, -one,
351 $ a( i+nb, i ), lda, work( nb+1 ), ldwork, one,
352 $ a( i+nb, i+nb ), lda )
357 DO 30 j = i, i + nb - 1
365 CALL ssytd2( uplo, n-i+1, a( i, i ), lda, d( i ), e( i ),
369 work( 1 ) = sroundup_lwork(lwkopt)
subroutine ssyr2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SSYR2K
subroutine ssytd2(uplo, n, a, lda, d, e, tau, info)
SSYTD2 reduces a symmetric matrix to real symmetric tridiagonal form by an orthogonal similarity tran...
subroutine ssytrd(uplo, n, a, lda, d, e, tau, work, lwork, info)
SSYTRD
subroutine slatrd(uplo, n, nb, a, lda, e, tau, w, ldw)
SLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal fo...