306 SUBROUTINE chegvx( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB,
307 $ vl, vu, il, iu, abstol, m, w, z, ldz, work,
308 $ lwork, rwork, iwork, ifail, info )
316 CHARACTER JOBZ, RANGE, UPLO
317 INTEGER IL, INFO, ITYPE, IU, LDA, LDB, LDZ, LWORK, M, N
321 INTEGER IFAIL( * ), IWORK( * )
322 REAL RWORK( * ), W( * )
323 COMPLEX A( lda, * ), B( ldb, * ), WORK( * ),
331 parameter ( cone = ( 1.0e+0, 0.0e+0 ) )
334 LOGICAL ALLEIG, INDEIG, LQUERY, UPPER, VALEIG, WANTZ
341 EXTERNAL ilaenv, lsame
353 wantz = lsame( jobz,
'V' )
354 upper = lsame( uplo,
'U' )
355 alleig = lsame( range,
'A' )
356 valeig = lsame( range,
'V' )
357 indeig = lsame( range,
'I' )
358 lquery = ( lwork.EQ.-1 )
361 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
363 ELSE IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
365 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
367 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
369 ELSE IF( n.LT.0 )
THEN
371 ELSE IF( lda.LT.max( 1, n ) )
THEN
373 ELSE IF( ldb.LT.max( 1, n ) )
THEN
377 IF( n.GT.0 .AND. vu.LE.vl )
379 ELSE IF( indeig )
THEN
380 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
382 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
388 IF (ldz.LT.1 .OR. (wantz .AND. ldz.LT.n))
THEN
394 nb = ilaenv( 1,
'CHETRD', uplo, n, -1, -1, -1 )
395 lwkopt = max( 1, ( nb + 1 )*n )
398 IF( lwork.LT.max( 1, 2*n ) .AND. .NOT.lquery )
THEN
404 CALL xerbla(
'CHEGVX', -info )
406 ELSE IF( lquery )
THEN
419 CALL cpotrf( uplo, n, b, ldb, info )
427 CALL chegst( itype, uplo, n, a, lda, b, ldb, info )
428 CALL cheevx( jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol,
429 $ m, w, z, ldz, work, lwork, rwork, iwork, ifail,
438 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
449 CALL ctrsm(
'Left', uplo, trans,
'Non-unit', n, m, cone, b,
452 ELSE IF( itype.EQ.3 )
THEN
463 CALL ctrmm(
'Left', uplo, trans,
'Non-unit', n, m, cone, b,
subroutine chegst(ITYPE, UPLO, N, A, LDA, B, LDB, INFO)
CHEGST
subroutine chegvx(ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, RWORK, IWORK, IFAIL, INFO)
CHEGVX
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ctrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRSM
subroutine cheevx(JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, RWORK, IWORK, IFAIL, INFO)
CHEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices ...
subroutine cpotrf(UPLO, N, A, LDA, INFO)
CPOTRF
subroutine ctrmm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRMM