191 SUBROUTINE ssytrd( UPLO, N, A, LDA, D, E, TAU, WORK, LWORK, INFO )
199 INTEGER INFO, LDA, LWORK, N
202 REAL A( LDA, * ), D( * ), E( * ), TAU( * ),
210 parameter( one = 1.0e+0 )
213 LOGICAL LQUERY, UPPER
214 INTEGER I, IINFO, IWS, J, KK, LDWORK, LWKOPT, NB,
227 EXTERNAL lsame, ilaenv, sroundup_lwork
234 upper = lsame( uplo,
'U' )
235 lquery = ( lwork.EQ.-1 )
236 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
238 ELSE IF( n.LT.0 )
THEN
240 ELSE IF( lda.LT.max( 1, n ) )
THEN
242 ELSE IF( lwork.LT.1 .AND. .NOT.lquery )
THEN
250 nb = ilaenv( 1,
'SSYTRD', uplo, n, -1, -1, -1 )
252 work( 1 ) = sroundup_lwork(lwkopt)
256 CALL xerbla(
'SSYTRD', -info )
258 ELSE IF( lquery )
THEN
271 IF( nb.GT.1 .AND. nb.LT.n )
THEN
276 nx = max( nb, ilaenv( 3,
'SSYTRD', uplo, n, -1, -1, -1 ) )
283 IF( lwork.LT.iws )
THEN
289 nb = max( lwork / ldwork, 1 )
290 nbmin = ilaenv( 2,
'SSYTRD', uplo, n, -1, -1, -1 )
306 kk = n - ( ( n-nx+nb-1 ) / nb )*nb
307 DO 20 i = n - nb + 1, kk + 1, -nb
313 CALL slatrd( uplo, i+nb-1, nb, a, lda, e, tau, work,
319 CALL ssyr2k( uplo,
'No transpose', i-1, nb, -one, a( 1, i ),
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 xerbla(srname, info)
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...