112 SUBROUTINE dspgst( ITYPE, UPLO, N, AP, BP, INFO )
120 INTEGER INFO, ITYPE, N
123 DOUBLE PRECISION AP( * ), BP( * )
129 DOUBLE PRECISION ONE, HALF
130 parameter( one = 1.0d0, half = 0.5d0 )
134 INTEGER J, J1, J1J1, JJ, K, K1, K1K1, KK
135 DOUBLE PRECISION AJJ, AKK, BJJ, BKK, CT
143 DOUBLE PRECISION DDOT
151 upper = lsame( uplo,
'U' )
152 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
154 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
156 ELSE IF( n.LT.0 )
THEN
160 CALL xerbla(
'DSPGST', -info )
164 IF( itype.EQ.1 )
THEN
179 CALL dtpsv( uplo,
'Transpose',
'Nonunit', j, bp,
181 CALL dspmv( uplo, j-1, -one, ap, bp( j1 ), 1, one,
183 CALL dscal( j-1, one / bjj, ap( j1 ), 1 )
184 ap( jj ) = ( ap( jj )-ddot( j-1, ap( j1 ), 1, bp( j1 ),
195 k1k1 = kk + n - k + 1
204 CALL dscal( n-k, one / bkk, ap( kk+1 ), 1 )
206 CALL daxpy( n-k, ct, bp( kk+1 ), 1, ap( kk+1 ), 1 )
207 CALL dspr2( uplo, n-k, -one, ap( kk+1 ), 1,
208 $ bp( kk+1 ), 1, ap( k1k1 ) )
209 CALL daxpy( n-k, ct, bp( kk+1 ), 1, ap( kk+1 ), 1 )
210 CALL dtpsv( uplo,
'No transpose',
'Non-unit', n-k,
211 $ bp( k1k1 ), ap( kk+1 ), 1 )
232 CALL dtpmv( uplo,
'No transpose',
'Non-unit', k-1, bp,
235 CALL daxpy( k-1, ct, bp( k1 ), 1, ap( k1 ), 1 )
236 CALL dspr2( uplo, k-1, one, ap( k1 ), 1, bp( k1 ), 1,
238 CALL daxpy( k-1, ct, bp( k1 ), 1, ap( k1 ), 1 )
239 CALL dscal( k-1, bkk, ap( k1 ), 1 )
240 ap( kk ) = akk*bkk**2
250 j1j1 = jj + n - j + 1
256 ap( jj ) = ajj*bjj + ddot( n-j, ap( jj+1 ), 1,
258 CALL dscal( n-j, bjj, ap( jj+1 ), 1 )
259 CALL dspmv( uplo, n-j, one, ap( j1j1 ), bp( jj+1 ), 1,
260 $ one, ap( jj+1 ), 1 )
261 CALL dtpmv( uplo,
'Transpose',
'Non-unit', n-j+1,
262 $ bp( jj ), ap( jj ), 1 )
subroutine xerbla(srname, info)
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
subroutine dspgst(itype, uplo, n, ap, bp, info)
DSPGST
subroutine dspmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
DSPMV
subroutine dspr2(uplo, n, alpha, x, incx, y, incy, ap)
DSPR2
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dtpmv(uplo, trans, diag, n, ap, x, incx)
DTPMV
subroutine dtpsv(uplo, trans, diag, n, ap, x, incx)
DTPSV