304 SUBROUTINE chegvx( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB,
305 $ VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK,
306 $ LWORK, RWORK, IWORK, IFAIL, INFO )
313 CHARACTER JOBZ, RANGE, UPLO
314 INTEGER IL, INFO, ITYPE, IU, LDA, LDB, LDZ, LWORK, M, N
318 INTEGER IFAIL( * ), IWORK( * )
319 REAL RWORK( * ), W( * )
320 COMPLEX A( LDA, * ), B( LDB, * ), WORK( * ),
328 PARAMETER ( CONE = ( 1.0e+0, 0.0e+0 ) )
331 LOGICAL ALLEIG, INDEIG, LQUERY, UPPER, VALEIG, WANTZ
339 EXTERNAL ilaenv, lsame, sroundup_lwork
351 wantz = lsame( jobz,
'V' )
352 upper = lsame( uplo,
'U' )
353 alleig = lsame( range,
'A' )
354 valeig = lsame( range,
'V' )
355 indeig = lsame( range,
'I' )
356 lquery = ( lwork.EQ.-1 )
359 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
361 ELSE IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
363 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
365 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
367 ELSE IF( n.LT.0 )
THEN
369 ELSE IF( lda.LT.max( 1, n ) )
THEN
371 ELSE IF( ldb.LT.max( 1, n ) )
THEN
375 IF( n.GT.0 .AND. vu.LE.vl )
377 ELSE IF( indeig )
THEN
378 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
380 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
386 IF (ldz.LT.1 .OR. (wantz .AND. ldz.LT.n))
THEN
392 nb = ilaenv( 1,
'CHETRD', uplo, n, -1, -1, -1 )
393 lwkopt = max( 1, ( nb + 1 )*n )
394 work( 1 ) = sroundup_lwork(lwkopt)
396 IF( lwork.LT.max( 1, 2*n ) .AND. .NOT.lquery )
THEN
402 CALL xerbla(
'CHEGVX', -info )
404 ELSE IF( lquery )
THEN
417 CALL cpotrf( uplo, n, b, ldb, info )
425 CALL chegst( itype, uplo, n, a, lda, b, ldb, info )
426 CALL cheevx( jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol,
427 $ m, w, z, ldz, work, lwork, rwork, iwork, ifail,
436 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
447 CALL ctrsm(
'Left', uplo, trans,
'Non-unit', n, m, cone, b,
450 ELSE IF( itype.EQ.3 )
THEN
461 CALL ctrmm(
'Left', uplo, trans,
'Non-unit', n, m, cone, b,
468 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
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 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 cpotrf(uplo, n, a, lda, info)
CPOTRF
subroutine ctrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
CTRMM
subroutine ctrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
CTRSM