128 SUBROUTINE chegs2( ITYPE, UPLO, N, A, LDA, B, LDB, INFO )
137 INTEGER INFO, ITYPE, LDA, LDB, N
140 COMPLEX A( lda, * ), B( ldb, * )
147 parameter ( one = 1.0e+0, half = 0.5e+0 )
149 parameter ( cone = ( 1.0e+0, 0.0e+0 ) )
173 upper = lsame( uplo,
'U' )
174 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
176 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
178 ELSE IF( n.LT.0 )
THEN
180 ELSE IF( lda.LT.max( 1, n ) )
THEN
182 ELSE IF( ldb.LT.max( 1, n ) )
THEN
186 CALL xerbla(
'CHEGS2', -info )
190 IF( itype.EQ.1 )
THEN
204 CALL csscal( n-k, one / bkk, a( k, k+1 ), lda )
206 CALL clacgv( n-k, a( k, k+1 ), lda )
207 CALL clacgv( n-k, b( k, k+1 ), ldb )
208 CALL caxpy( n-k, ct, b( k, k+1 ), ldb, a( k, k+1 ),
210 CALL cher2( uplo, n-k, -cone, a( k, k+1 ), lda,
211 $ b( k, k+1 ), ldb, a( k+1, k+1 ), lda )
212 CALL caxpy( n-k, ct, b( k, k+1 ), ldb, a( k, k+1 ),
214 CALL clacgv( n-k, b( k, k+1 ), ldb )
215 CALL ctrsv( uplo,
'Conjugate transpose',
'Non-unit',
216 $ n-k, b( k+1, k+1 ), ldb, a( k, k+1 ),
218 CALL clacgv( n-k, a( k, k+1 ), lda )
234 CALL csscal( n-k, one / bkk, a( k+1, k ), 1 )
236 CALL caxpy( n-k, ct, b( k+1, k ), 1, a( k+1, k ), 1 )
237 CALL cher2( uplo, n-k, -cone, a( k+1, k ), 1,
238 $ b( k+1, k ), 1, a( k+1, k+1 ), lda )
239 CALL caxpy( n-k, ct, b( k+1, k ), 1, a( k+1, k ), 1 )
240 CALL ctrsv( uplo,
'No transpose',
'Non-unit', n-k,
241 $ b( k+1, k+1 ), ldb, a( k+1, k ), 1 )
256 CALL ctrmv( uplo,
'No transpose',
'Non-unit', k-1, b,
257 $ ldb, a( 1, k ), 1 )
259 CALL caxpy( k-1, ct, b( 1, k ), 1, a( 1, k ), 1 )
260 CALL cher2( uplo, k-1, cone, a( 1, k ), 1, b( 1, k ), 1,
262 CALL caxpy( k-1, ct, b( 1, k ), 1, a( 1, k ), 1 )
263 CALL csscal( k-1, bkk, a( 1, k ), 1 )
264 a( k, k ) = akk*bkk**2
276 CALL clacgv( k-1, a( k, 1 ), lda )
277 CALL ctrmv( uplo,
'Conjugate transpose',
'Non-unit', k-1,
278 $ b, ldb, a( k, 1 ), lda )
280 CALL clacgv( k-1, b( k, 1 ), ldb )
281 CALL caxpy( k-1, ct, b( k, 1 ), ldb, a( k, 1 ), lda )
282 CALL cher2( uplo, k-1, cone, a( k, 1 ), lda, b( k, 1 ),
284 CALL caxpy( k-1, ct, b( k, 1 ), ldb, a( k, 1 ), lda )
285 CALL clacgv( k-1, b( k, 1 ), ldb )
286 CALL csscal( k-1, bkk, a( k, 1 ), lda )
287 CALL clacgv( k-1, a( k, 1 ), lda )
288 a( k, k ) = akk*bkk**2
subroutine ctrsv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
CTRSV
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ctrmv(UPLO, TRANS, DIAG, N, A, LDA, X, INCX)
CTRMV
subroutine cher2(UPLO, N, ALPHA, X, INCX, Y, INCY, A, LDA)
CHER2
subroutine clacgv(N, X, INCX)
CLACGV conjugates a complex vector.
subroutine chegs2(ITYPE, UPLO, N, A, LDA, B, LDB, INFO)
CHEGS2 reduces a Hermitian definite generalized eigenproblem to standard form, using the factorizatio...
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY
subroutine csscal(N, SA, CX, INCX)
CSSCAL