126 SUBROUTINE dsygs2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
134 INTEGER INFO, ITYPE, LDA, LDB, N
137 DOUBLE PRECISION A( LDA, * ), B( LDB, * )
143 DOUBLE PRECISION ONE, HALF
144 parameter( one = 1.0d0, half = 0.5d0 )
149 DOUBLE PRECISION AKK, BKK, CT
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(
'DSYGS2', -info )
183 IF( itype.EQ.1 )
THEN
197 CALL dscal( n-k, one / bkk, a( k, k+1 ), lda )
199 CALL daxpy( n-k, ct, b( k, k+1 ), ldb, a( k, k+1 ),
201 CALL dsyr2( uplo, n-k, -one, a( k, k+1 ), lda,
202 $ b( k, k+1 ), ldb, a( k+1, k+1 ), lda )
203 CALL daxpy( n-k, ct, b( k, k+1 ), ldb, a( k, k+1 ),
205 CALL dtrsv( uplo,
'Transpose',
'Non-unit', n-k,
206 $ b( k+1, k+1 ), ldb, a( k, k+1 ), lda )
222 CALL dscal( n-k, one / bkk, a( k+1, k ), 1 )
224 CALL daxpy( n-k, ct, b( k+1, k ), 1, a( k+1, k ), 1 )
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 ), 1 )
228 CALL dtrsv( uplo,
'No transpose',
'Non-unit', n-k,
229 $ b( k+1, k+1 ), ldb, a( k+1, k ), 1 )
244 CALL dtrmv( uplo,
'No transpose',
'Non-unit', k-1, b,
245 $ ldb, a( 1, k ), 1 )
247 CALL daxpy( k-1, ct, b( 1, k ), 1, a( 1, k ), 1 )
248 CALL dsyr2( uplo, k-1, one, a( 1, k ), 1, b( 1, k ), 1,
250 CALL daxpy( k-1, ct, b( 1, k ), 1, a( 1, k ), 1 )
251 CALL dscal( k-1, bkk, a( 1, k ), 1 )
252 a( k, k ) = akk*bkk**2
264 CALL dtrmv( uplo,
'Transpose',
'Non-unit', k-1, b, ldb,
267 CALL daxpy( k-1, ct, b( k, 1 ), ldb, a( k, 1 ), lda )
268 CALL dsyr2( uplo, k-1, one, a( k, 1 ), lda, b( k, 1 ),
270 CALL daxpy( k-1, ct, b( k, 1 ), ldb, a( k, 1 ), lda )
271 CALL dscal( k-1, bkk, a( k, 1 ), lda )
272 a( k, k ) = akk*bkk**2
subroutine xerbla(srname, info)
subroutine daxpy(n, da, dx, incx, dy, incy)
DAXPY
subroutine dsygs2(itype, uplo, n, a, lda, b, ldb, info)
DSYGS2 reduces a symmetric definite generalized eigenproblem to standard form, using the factorizatio...
subroutine dsyr2(uplo, n, alpha, x, incx, y, incy, a, lda)
DSYR2
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dtrmv(uplo, trans, diag, n, a, lda, x, incx)
DTRMV
subroutine dtrsv(uplo, trans, diag, n, a, lda, x, incx)
DTRSV