149 SUBROUTINE ssptrd( UPLO, N, AP, D, E, TAU, INFO )
160 REAL AP( * ), D( * ), E( * ), TAU( * )
167 parameter( one = 1.0, zero = 0.0, half = 1.0 / 2.0 )
171 INTEGER I, I1, I1I1, II
187 upper = lsame( uplo,
'U' )
188 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
190 ELSE IF( n.LT.0 )
THEN
194 CALL xerbla(
'SSPTRD', -info )
208 i1 = n*( n-1 ) / 2 + 1
209 DO 10 i = n - 1, 1, -1
214 CALL slarfg( i, ap( i1+i-1 ), ap( i1 ), 1, taui )
215 e( i ) = ap( i1+i-1 )
217 IF( taui.NE.zero )
THEN
225 CALL sspmv( uplo, i, taui, ap, ap( i1 ), 1, zero, tau,
230 alpha = -half*taui*sdot( i, tau, 1, ap( i1 ), 1 )
231 CALL saxpy( i, alpha, ap( i1 ), 1, tau, 1 )
236 CALL sspr2( uplo, i, -one, ap( i1 ), 1, tau, 1, ap )
238 ap( i1+i-1 ) = e( i )
240 d( i+1 ) = ap( i1+i )
252 i1i1 = ii + n - i + 1
257 CALL slarfg( n-i, ap( ii+1 ), ap( ii+2 ), 1, taui )
260 IF( taui.NE.zero )
THEN
268 CALL sspmv( uplo, n-i, taui, ap( i1i1 ), ap( ii+1 ), 1,
269 $ zero, tau( i ), 1 )
273 alpha = -half*taui*sdot( n-i, tau( i ), 1, ap( ii+1 ),
275 CALL saxpy( n-i, alpha, ap( ii+1 ), 1, tau( i ), 1 )
280 CALL sspr2( uplo, n-i, -one, ap( ii+1 ), 1, tau( i ), 1,
subroutine xerbla(srname, info)
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
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).