304 SUBROUTINE zhegvx( 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
315 DOUBLE PRECISION ABSTOL, VL, VU
318 INTEGER IFAIL( * ), IWORK( * )
319 DOUBLE PRECISION RWORK( * ), W( * )
320 COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * ),
328 PARAMETER ( CONE = ( 1.0d+0, 0.0d+0 ) )
331 LOGICAL ALLEIG, INDEIG, LQUERY, UPPER, VALEIG, WANTZ
338 EXTERNAL lsame, ilaenv
350 wantz = lsame( jobz,
'V' )
351 upper = lsame( uplo,
'U' )
352 alleig = lsame( range,
'A' )
353 valeig = lsame( range,
'V' )
354 indeig = lsame( range,
'I' )
355 lquery = ( lwork.EQ.-1 )
358 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
360 ELSE IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
362 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
364 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
366 ELSE IF( n.LT.0 )
THEN
368 ELSE IF( lda.LT.max( 1, n ) )
THEN
370 ELSE IF( ldb.LT.max( 1, n ) )
THEN
374 IF( n.GT.0 .AND. vu.LE.vl )
376 ELSE IF( indeig )
THEN
377 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
379 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
385 IF (ldz.LT.1 .OR. (wantz .AND. ldz.LT.n))
THEN
391 nb = ilaenv( 1,
'ZHETRD', uplo, n, -1, -1, -1 )
392 lwkopt = max( 1, ( nb + 1 )*n )
395 IF( lwork.LT.max( 1, 2*n ) .AND. .NOT.lquery )
THEN
401 CALL xerbla(
'ZHEGVX', -info )
403 ELSE IF( lquery )
THEN
416 CALL zpotrf( uplo, n, b, ldb, info )
424 CALL zhegst( itype, uplo, n, a, lda, b, ldb, info )
425 CALL zheevx( jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol,
426 $ m, w, z, ldz, work, lwork, rwork, iwork, ifail,
435 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
446 CALL ztrsm(
'Left', uplo, trans,
'Non-unit', n, m, cone, b,
449 ELSE IF( itype.EQ.3 )
THEN
460 CALL ztrmm(
'Left', uplo, trans,
'Non-unit', n, m, cone, b,
subroutine xerbla(srname, info)
subroutine zheevx(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, iwork, ifail, info)
ZHEEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices
subroutine zhegst(itype, uplo, n, a, lda, b, ldb, info)
ZHEGST
subroutine zhegvx(itype, jobz, range, uplo, n, a, lda, b, ldb, vl, vu, il, iu, abstol, m, w, z, ldz, work, lwork, rwork, iwork, ifail, info)
ZHEGVX
subroutine zpotrf(uplo, n, a, lda, info)
ZPOTRF
subroutine ztrmm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRMM
subroutine ztrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
ZTRSM