126 SUBROUTINE ssygs2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
134 INTEGER INFO, ITYPE, LDA, LDB, N
137 REAL A( LDA, * ), B( LDB, * )
144 parameter( one = 1.0, half = 0.5 )
166 upper = lsame( uplo,
'U' )
167 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
169 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
171 ELSE IF( n.LT.0 )
THEN
173 ELSE IF( lda.LT.max( 1, n ) )
THEN
175 ELSE IF( ldb.LT.max( 1, n ) )
THEN
179 CALL xerbla(
'SSYGS2', -info )
183 IF( itype.EQ.1 )
THEN
197 CALL sscal( n-k, one / bkk, a( k, k+1 ), lda )
199 CALL saxpy( n-k, ct, b( k, k+1 ), ldb, a( k, k+1 ),
201 CALL ssyr2( uplo, n-k, -one, a( k, k+1 ), lda,
202 $ b( k, k+1 ), ldb, a( k+1, k+1 ), lda )
203 CALL saxpy( n-k, ct, b( k, k+1 ), ldb, a( k, k+1 ),
205 CALL strsv( uplo,
'Transpose',
'Non-unit', n-k,
206 $ b( k+1, k+1 ), ldb, a( k, k+1 ), lda )
222 CALL sscal( n-k, one / bkk, a( k+1, k ), 1 )
224 CALL saxpy( n-k, ct, b( k+1, k ), 1, a( k+1, k ), 1 )
225 CALL ssyr2( uplo, n-k, -one, a( k+1, k ), 1,
226 $ b( k+1, k ), 1, a( k+1, k+1 ), lda )
227 CALL saxpy( n-k, ct, b( k+1, k ), 1, a( k+1, k ), 1 )
228 CALL strsv( uplo,
'No transpose',
'Non-unit', n-k,
229 $ b( k+1, k+1 ), ldb, a( k+1, k ), 1 )
244 CALL strmv( uplo,
'No transpose',
'Non-unit', k-1, b,
245 $ ldb, a( 1, k ), 1 )
247 CALL saxpy( k-1, ct, b( 1, k ), 1, a( 1, k ), 1 )
248 CALL ssyr2( uplo, k-1, one, a( 1, k ), 1, b( 1, k ), 1,
250 CALL saxpy( k-1, ct, b( 1, k ), 1, a( 1, k ), 1 )
251 CALL sscal( k-1, bkk, a( 1, k ), 1 )
252 a( k, k ) = akk*bkk**2
264 CALL strmv( uplo,
'Transpose',
'Non-unit', k-1, b, ldb,
267 CALL saxpy( k-1, ct, b( k, 1 ), ldb, a( k, 1 ), lda )
268 CALL ssyr2( uplo, k-1, one, a( k, 1 ), lda, b( k, 1 ),
270 CALL saxpy( k-1, ct, b( k, 1 ), ldb, a( k, 1 ), lda )
271 CALL sscal( k-1, bkk, a( k, 1 ), lda )
272 a( k, k ) = akk*bkk**2
subroutine xerbla(srname, info)
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
subroutine ssygs2(itype, uplo, n, a, lda, b, ldb, info)
SSYGS2 reduces a symmetric definite generalized eigenproblem to standard form, using the factorizatio...
subroutine ssyr2(uplo, n, alpha, x, incx, y, incy, a, lda)
SSYR2
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine strmv(uplo, trans, diag, n, a, lda, x, incx)
STRMV
subroutine strsv(uplo, trans, diag, n, a, lda, x, incx)
STRSV