110 SUBROUTINE dspgst( ITYPE, UPLO, N, AP, BP, INFO )
118 INTEGER INFO, ITYPE, N
121 DOUBLE PRECISION AP( * ), BP( * )
127 DOUBLE PRECISION ONE, HALF
128 parameter( one = 1.0d0, half = 0.5d0 )
132 INTEGER J, J1, J1J1, JJ, K, K1, K1K1, KK
133 DOUBLE PRECISION AJJ, AKK, BJJ, BKK, CT
142 DOUBLE PRECISION DDOT
150 upper = lsame( uplo,
'U' )
151 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
153 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
155 ELSE IF( n.LT.0 )
THEN
159 CALL xerbla(
'DSPGST', -info )
163 IF( itype.EQ.1 )
THEN
178 CALL dtpsv( uplo,
'Transpose',
'Nonunit', j, bp,
180 CALL dspmv( uplo, j-1, -one, ap, bp( j1 ), 1, one,
182 CALL dscal( j-1, one / bjj, ap( j1 ), 1 )
183 ap( jj ) = ( ap( jj )-ddot( j-1, ap( j1 ), 1,
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 )