181 SUBROUTINE chegv( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
182 $ lwork, rwork, info )
191 INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
194 REAL RWORK( * ), W( * )
195 COMPLEX A( lda, * ), B( ldb, * ), WORK( * )
202 parameter ( one = ( 1.0e+0, 0.0e+0 ) )
205 LOGICAL LQUERY, UPPER, WANTZ
207 INTEGER LWKOPT, NB, NEIG
212 EXTERNAL ilaenv, lsame
224 wantz = lsame( jobz,
'V' )
225 upper = lsame( uplo,
'U' )
226 lquery = ( lwork.EQ. -1 )
229 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
231 ELSE IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
233 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
235 ELSE IF( n.LT.0 )
THEN
237 ELSE IF( lda.LT.max( 1, n ) )
THEN
239 ELSE IF( ldb.LT.max( 1, n ) )
THEN
244 nb = ilaenv( 1,
'CHETRD', uplo, n, -1, -1, -1 )
245 lwkopt = max( 1, ( nb + 1 )*n )
248 IF( lwork.LT.max( 1, 2*n-1 ) .AND. .NOT.lquery )
THEN
254 CALL xerbla(
'CHEGV ', -info )
256 ELSE IF( lquery )
THEN
267 CALL cpotrf( uplo, n, b, ldb, info )
275 CALL chegst( itype, uplo, n, a, lda, b, ldb, info )
276 CALL cheev( jobz, uplo, n, a, lda, w, work, lwork, rwork, info )
285 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
296 CALL ctrsm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
299 ELSE IF( itype.EQ.3 )
THEN
310 CALL ctrmm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
subroutine chegst(ITYPE, UPLO, N, A, LDA, B, LDB, INFO)
CHEGST
subroutine cheev(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK, INFO)
CHEEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices ...
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ctrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRSM
subroutine cpotrf(UPLO, N, A, LDA, INFO)
CPOTRF
subroutine ctrmm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRMM
subroutine chegv(ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, RWORK, INFO)
CHEGV