124 SUBROUTINE dsygs2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
132 INTEGER INFO, ITYPE, LDA, LDB, N
135 DOUBLE PRECISION A( LDA, * ), B( LDB, * )
141 DOUBLE PRECISION ONE, HALF
142 parameter( one = 1.0d0, half = 0.5d0 )
147 DOUBLE PRECISION AKK, BKK, CT
165 upper = lsame( uplo,
'U' )
166 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
168 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
170 ELSE IF( n.LT.0 )
THEN
172 ELSE IF( lda.LT.max( 1, n ) )
THEN
174 ELSE IF( ldb.LT.max( 1, n ) )
THEN
178 CALL xerbla(
'DSYGS2', -info )
182 IF( itype.EQ.1 )
THEN
196 CALL dscal( n-k, one / bkk, a( k, k+1 ), lda )
198 CALL daxpy( n-k, ct, b( k, k+1 ), ldb, a( k, k+1 ),
200 CALL dsyr2( uplo, n-k, -one, a( k, k+1 ), lda,
201 $ b( k, k+1 ), ldb, a( k+1, k+1 ), lda )
202 CALL daxpy( n-k, ct, b( k, k+1 ), ldb, a( k, k+1 ),
204 CALL dtrsv( uplo,
'Transpose',
'Non-unit', n-k,
205 $ b( k+1, k+1 ), ldb, a( k, k+1 ), lda )
221 CALL dscal( n-k, one / bkk, a( k+1, k ), 1 )
223 CALL daxpy( n-k, ct, b( k+1, k ), 1, a( k+1, k ),
225 CALL dsyr2( uplo, n-k, -one, a( k+1, k ), 1,
226 $ b( k+1, k ), 1, a( k+1, k+1 ), lda )
227 CALL daxpy( n-k, ct, b( k+1, k ), 1, a( k+1, k ),
229 CALL dtrsv( uplo,
'No transpose',
'Non-unit', n-k,
230 $ b( k+1, k+1 ), ldb, a( k+1, k ), 1 )
245 CALL dtrmv( uplo,
'No transpose',
'Non-unit', k-1, b,
246 $ ldb, a( 1, k ), 1 )
248 CALL daxpy( k-1, ct, b( 1, k ), 1, a( 1, k ), 1 )
249 CALL dsyr2( uplo, k-1, one, a( 1, k ), 1, b( 1, k ),
252 CALL daxpy( k-1, ct, b( 1, k ), 1, a( 1, k ), 1 )
253 CALL dscal( k-1, bkk, a( 1, k ), 1 )
254 a( k, k ) = akk*bkk**2
266 CALL dtrmv( uplo,
'Transpose',
'Non-unit', k-1, b,
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