147 SUBROUTINE ssptrd( UPLO, N, AP, D, E, TAU, INFO )
158 REAL AP( * ), D( * ), E( * ), TAU( * )
165 parameter( one = 1.0, zero = 0.0, half = 1.0 / 2.0 )
169 INTEGER I, I1, I1I1, II
185 upper = lsame( uplo,
'U' )
186 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
188 ELSE IF( n.LT.0 )
THEN
192 CALL xerbla(
'SSPTRD', -info )
206 i1 = n*( n-1 ) / 2 + 1
207 DO 10 i = n - 1, 1, -1
212 CALL slarfg( i, ap( i1+i-1 ), ap( i1 ), 1, taui )
213 e( i ) = ap( i1+i-1 )
215 IF( taui.NE.zero )
THEN
223 CALL sspmv( uplo, i, taui, ap, ap( i1 ), 1, zero, tau,
228 alpha = -half*taui*sdot( i, tau, 1, ap( i1 ), 1 )
229 CALL saxpy( i, alpha, ap( i1 ), 1, tau, 1 )
234 CALL sspr2( uplo, i, -one, ap( i1 ), 1, tau, 1, ap )
236 ap( i1+i-1 ) = e( i )
238 d( i+1 ) = ap( i1+i )
250 i1i1 = ii + n - i + 1
255 CALL slarfg( n-i, ap( ii+1 ), ap( ii+2 ), 1, taui )
258 IF( taui.NE.zero )
THEN
266 CALL sspmv( uplo, n-i, taui, ap( i1i1 ), ap( ii+1 ),
268 $ zero, tau( i ), 1 )
272 alpha = -half*taui*sdot( n-i, tau( i ), 1, ap( ii+1 ),
274 CALL saxpy( n-i, alpha, ap( ii+1 ), 1, tau( i ), 1 )
279 CALL sspr2( uplo, n-i, -one, ap( ii+1 ), 1, tau( i ),
subroutine sspmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
SSPMV
subroutine sspr2(uplo, n, alpha, x, incx, y, incy, ap)
SSPR2
subroutine ssptrd(uplo, n, ap, d, e, tau, info)
SSPTRD
subroutine slarfg(n, alpha, x, incx, tau)
SLARFG generates an elementary reflector (Householder matrix).