172 SUBROUTINE dsytd2( UPLO, N, A, LDA, D, E, TAU, INFO )
183 DOUBLE PRECISION A( LDA, * ), D( * ), E( * ), TAU( * )
189 DOUBLE PRECISION ONE, ZERO, HALF
190 parameter( one = 1.0d0, zero = 0.0d0,
191 $ half = 1.0d0 / 2.0d0 )
196 DOUBLE PRECISION ALPHA, TAUI
203 DOUBLE PRECISION DDOT
214 upper = lsame( uplo,
'U' )
215 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
217 ELSE IF( n.LT.0 )
THEN
219 ELSE IF( lda.LT.max( 1, n ) )
THEN
223 CALL xerbla(
'DSYTD2', -info )
236 DO 10 i = n - 1, 1, -1
241 CALL dlarfg( i, a( i, i+1 ), a( 1, i+1 ), 1, taui )
244 IF( taui.NE.zero )
THEN
252 CALL dsymv( uplo, i, taui, a, lda, a( 1, i+1 ), 1, zero,
257 alpha = -half*taui*ddot( i, tau, 1, a( 1, i+1 ), 1 )
258 CALL daxpy( i, alpha, a( 1, i+1 ), 1, tau, 1 )
263 CALL dsyr2( uplo, i, -one, a( 1, i+1 ), 1, tau, 1, a,
268 d( i+1 ) = a( i+1, i+1 )
281 CALL dlarfg( n-i, a( i+1, i ), a( min( i+2, n ), i ), 1,
285 IF( taui.NE.zero )
THEN
293 CALL dsymv( uplo, n-i, taui, a( i+1, i+1 ), lda,
294 $ a( i+1, i ), 1, zero, tau( i ), 1 )
298 alpha = -half*taui*ddot( n-i, tau( i ), 1, a( i+1, i ),
300 CALL daxpy( n-i, alpha, a( i+1, i ), 1, tau( i ), 1 )
305 CALL dsyr2( uplo, n-i, -one, a( i+1, i ), 1, tau( i ), 1,
306 $ a( i+1, i+1 ), lda )
subroutine xerbla(srname, info)
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
subroutine dsymv(uplo, n, alpha, a, lda, x, incx, beta, y, incy)
DSYMV
subroutine dsyr2(uplo, n, alpha, x, incx, y, incy, a, lda)
DSYR2
subroutine dsytd2(uplo, n, a, lda, d, e, tau, info)
DSYTD2 reduces a symmetric matrix to real symmetric tridiagonal form by an orthogonal similarity tran...
subroutine dlarfg(n, alpha, x, incx, tau)
DLARFG generates an elementary reflector (Householder matrix).