128 SUBROUTINE dsygs2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
137 INTEGER info, itype, lda, ldb, n
140 DOUBLE PRECISION a( lda, * ), b( ldb, * )
146 DOUBLE PRECISION one, half
147 parameter( one = 1.0d0, half = 0.5d0 )
152 DOUBLE PRECISION akk, bkk, ct
169 upper =
lsame( uplo,
'U' )
170 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
172 ELSE IF( .NOT.upper .AND. .NOT.
lsame( uplo,
'L' ) )
THEN
174 ELSE IF( n.LT.0 )
THEN
176 ELSE IF( lda.LT.max( 1, n ) )
THEN
178 ELSE IF( ldb.LT.max( 1, n ) )
THEN
182 CALL
xerbla(
'DSYGS2', -info )
186 IF( itype.EQ.1 )
THEN
200 CALL
dscal( n-k, one / bkk, a( k, k+1 ), lda )
202 CALL
daxpy( n-k, ct, b( k, k+1 ), ldb, a( k, k+1 ),
204 CALL
dsyr2( uplo, n-k, -one, a( k, k+1 ), lda,
205 $ b( k, k+1 ), ldb, a( k+1, k+1 ), lda )
206 CALL
daxpy( n-k, ct, b( k, k+1 ), ldb, a( k, k+1 ),
208 CALL
dtrsv( uplo,
'Transpose',
'Non-unit', n-k,
209 $ b( k+1, k+1 ), ldb, a( k, k+1 ), lda )
225 CALL
dscal( n-k, one / bkk, a( k+1, k ), 1 )
227 CALL
daxpy( n-k, ct, b( k+1, k ), 1, a( k+1, k ), 1 )
228 CALL
dsyr2( uplo, n-k, -one, a( k+1, k ), 1,
229 $ b( k+1, k ), 1, a( k+1, k+1 ), lda )
230 CALL
daxpy( n-k, ct, b( k+1, k ), 1, a( k+1, k ), 1 )
231 CALL
dtrsv( uplo,
'No transpose',
'Non-unit', n-k,
232 $ b( k+1, k+1 ), ldb, a( k+1, k ), 1 )
247 CALL
dtrmv( uplo,
'No transpose',
'Non-unit', k-1, b,
248 $ ldb, a( 1, k ), 1 )
250 CALL
daxpy( k-1, ct, b( 1, k ), 1, a( 1, k ), 1 )
251 CALL
dsyr2( uplo, k-1, one, a( 1, k ), 1, b( 1, k ), 1,
253 CALL
daxpy( k-1, ct, b( 1, k ), 1, a( 1, k ), 1 )
254 CALL
dscal( k-1, bkk, a( 1, k ), 1 )
255 a( k, k ) = akk*bkk**2
267 CALL
dtrmv( uplo,
'Transpose',
'Non-unit', k-1, b, ldb,
270 CALL
daxpy( k-1, ct, b( k, 1 ), ldb, a( k, 1 ), lda )
271 CALL
dsyr2( uplo, k-1, one, a( k, 1 ), lda, b( k, 1 ),
273 CALL
daxpy( k-1, ct, b( k, 1 ), ldb, a( k, 1 ), lda )
274 CALL
dscal( k-1, bkk, a( k, 1 ), lda )
275 a( k, k ) = akk*bkk**2