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
subroutine daxpy(N, DA, DX, INCX, DY, INCY)
DAXPY
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dscal(N, DA, DX, INCX)
DSCAL
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 dtrmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
DTRMV
subroutine dtrsv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
DTRSV