147 SUBROUTINE dsptrd( UPLO, N, AP, D, E, TAU, INFO )
158 DOUBLE PRECISION AP( * ), D( * ), E( * ), TAU( * )
164 DOUBLE PRECISION ONE, ZERO, HALF
165 parameter( one = 1.0d0, zero = 0.0d0,
166 $ half = 1.0d0 / 2.0d0 )
170 INTEGER I, I1, I1I1, II
171 DOUBLE PRECISION ALPHA, TAUI
178 DOUBLE PRECISION DDOT
186 upper = lsame( uplo,
'U' )
187 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
189 ELSE IF( n.LT.0 )
THEN
193 CALL xerbla(
'DSPTRD', -info )
207 i1 = n*( n-1 ) / 2 + 1
208 DO 10 i = n - 1, 1, -1
213 CALL dlarfg( i, ap( i1+i-1 ), ap( i1 ), 1, taui )
214 e( i ) = ap( i1+i-1 )
216 IF( taui.NE.zero )
THEN
224 CALL dspmv( uplo, i, taui, ap, ap( i1 ), 1, zero, tau,
229 alpha = -half*taui*ddot( i, tau, 1, ap( i1 ), 1 )
230 CALL daxpy( i, alpha, ap( i1 ), 1, tau, 1 )
235 CALL dspr2( uplo, i, -one, ap( i1 ), 1, tau, 1, ap )
237 ap( i1+i-1 ) = e( i )
239 d( i+1 ) = ap( i1+i )
251 i1i1 = ii + n - i + 1
256 CALL dlarfg( n-i, ap( ii+1 ), ap( ii+2 ), 1, taui )
259 IF( taui.NE.zero )
THEN
267 CALL dspmv( uplo, n-i, taui, ap( i1i1 ), ap( ii+1 ),
269 $ zero, tau( i ), 1 )
273 alpha = -half*taui*ddot( n-i, tau( i ), 1, ap( ii+1 ),
275 CALL daxpy( n-i, alpha, ap( ii+1 ), 1, tau( i ), 1 )
280 CALL dspr2( uplo, n-i, -one, ap( ii+1 ), 1, tau( i ),
subroutine dspmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
DSPMV
subroutine dspr2(uplo, n, alpha, x, incx, y, incy, ap)
DSPR2
subroutine dsptrd(uplo, n, ap, d, e, tau, info)
DSPTRD
subroutine dlarfg(n, alpha, x, incx, tau)
DLARFG generates an elementary reflector (Householder matrix).