151 SUBROUTINE dsptrd( UPLO, N, AP, D, E, TAU, INFO )
163 DOUBLE PRECISION ap( * ), d( * ), e( * ), tau( * )
169 DOUBLE PRECISION one, zero, half
170 parameter( one = 1.0d0, zero = 0.0d0,
171 $ half = 1.0d0 / 2.0d0 )
175 INTEGER i, i1, i1i1, ii
176 DOUBLE PRECISION alpha, taui
183 DOUBLE PRECISION ddot
191 upper =
lsame( uplo,
'U' )
192 IF( .NOT.upper .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
194 ELSE IF( n.LT.0 )
THEN
198 CALL
xerbla(
'DSPTRD', -info )
212 i1 = n*( n-1 ) / 2 + 1
213 DO 10 i = n - 1, 1, -1
218 CALL
dlarfg( i, ap( i1+i-1 ), ap( i1 ), 1, taui )
219 e( i ) = ap( i1+i-1 )
221 IF( taui.NE.zero )
THEN
229 CALL
dspmv( uplo, i, taui, ap, ap( i1 ), 1, zero, tau,
234 alpha = -half*taui*
ddot( i, tau, 1, ap( i1 ), 1 )
235 CALL
daxpy( i, alpha, ap( i1 ), 1, tau, 1 )
240 CALL
dspr2( uplo, i, -one, ap( i1 ), 1, tau, 1, ap )
242 ap( i1+i-1 ) = e( i )
244 d( i+1 ) = ap( i1+i )
256 i1i1 = ii + n - i + 1
261 CALL
dlarfg( n-i, ap( ii+1 ), ap( ii+2 ), 1, taui )
264 IF( taui.NE.zero )
THEN
272 CALL
dspmv( uplo, n-i, taui, ap( i1i1 ), ap( ii+1 ), 1,
273 $ zero, tau( i ), 1 )
277 alpha = -half*taui*
ddot( n-i, tau( i ), 1, ap( ii+1 ),
279 CALL
daxpy( n-i, alpha, ap( ii+1 ), 1, tau( i ), 1 )
284 CALL
dspr2( uplo, n-i, -one, ap( ii+1 ), 1, tau( i ), 1,