128 SUBROUTINE ssygs2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
137 INTEGER info, itype, lda, ldb, n
140 REAL a( lda, * ), b( ldb, * )
147 parameter( one = 1.0, half = 0.5 )
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(
'SSYGS2', -info )
186 IF( itype.EQ.1 )
THEN
200 CALL
sscal( n-k, one / bkk, a( k, k+1 ), lda )
202 CALL
saxpy( n-k, ct, b( k, k+1 ), ldb, a( k, k+1 ),
204 CALL
ssyr2( uplo, n-k, -one, a( k, k+1 ), lda,
205 $ b( k, k+1 ), ldb, a( k+1, k+1 ), lda )
206 CALL
saxpy( n-k, ct, b( k, k+1 ), ldb, a( k, k+1 ),
208 CALL
strsv( uplo,
'Transpose',
'Non-unit', n-k,
209 $ b( k+1, k+1 ), ldb, a( k, k+1 ), lda )
225 CALL
sscal( n-k, one / bkk, a( k+1, k ), 1 )
227 CALL
saxpy( n-k, ct, b( k+1, k ), 1, a( k+1, k ), 1 )
228 CALL
ssyr2( uplo, n-k, -one, a( k+1, k ), 1,
229 $ b( k+1, k ), 1, a( k+1, k+1 ), lda )
230 CALL
saxpy( n-k, ct, b( k+1, k ), 1, a( k+1, k ), 1 )
231 CALL
strsv( uplo,
'No transpose',
'Non-unit', n-k,
232 $ b( k+1, k+1 ), ldb, a( k+1, k ), 1 )
247 CALL
strmv( uplo,
'No transpose',
'Non-unit', k-1, b,
248 $ ldb, a( 1, k ), 1 )
250 CALL
saxpy( k-1, ct, b( 1, k ), 1, a( 1, k ), 1 )
251 CALL
ssyr2( uplo, k-1, one, a( 1, k ), 1, b( 1, k ), 1,
253 CALL
saxpy( k-1, ct, b( 1, k ), 1, a( 1, k ), 1 )
254 CALL
sscal( k-1, bkk, a( 1, k ), 1 )
255 a( k, k ) = akk*bkk**2
267 CALL
strmv( uplo,
'Transpose',
'Non-unit', k-1, b, ldb,
270 CALL
saxpy( k-1, ct, b( k, 1 ), ldb, a( k, 1 ), lda )
271 CALL
ssyr2( uplo, k-1, one, a( k, 1 ), lda, b( k, 1 ),
273 CALL
saxpy( k-1, ct, b( k, 1 ), ldb, a( k, 1 ), lda )
274 CALL
sscal( k-1, bkk, a( k, 1 ), lda )
275 a( k, k ) = akk*bkk**2