302 SUBROUTINE chegvx( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB,
303 $ VL, VU, IL, IU, ABSTOL, M, W, Z, LDZ, WORK,
304 $ LWORK, RWORK, IWORK, IFAIL, INFO )
311 CHARACTER JOBZ, RANGE, UPLO
312 INTEGER IL, INFO, ITYPE, IU, LDA, LDB, LDZ, LWORK, M, N
316 INTEGER IFAIL( * ), IWORK( * )
317 REAL RWORK( * ), W( * )
318 COMPLEX A( LDA, * ), B( LDB, * ), WORK( * ),
326 PARAMETER ( CONE = ( 1.0e+0, 0.0e+0 ) )
329 LOGICAL ALLEIG, INDEIG, LQUERY, UPPER, VALEIG, WANTZ
337 EXTERNAL ilaenv, lsame, sroundup_lwork
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,
'CHETRD', uplo, n, -1, -1, -1 )
392 lwkopt = max( 1, ( nb + 1 )*n )
393 work( 1 ) = sroundup_lwork(lwkopt)
395 IF( lwork.LT.max( 1, 2*n ) .AND. .NOT.lquery )
THEN
401 CALL xerbla(
'CHEGVX', -info )
403 ELSE IF( lquery )
THEN
416 CALL cpotrf( uplo, n, b, ldb, info )
424 CALL chegst( itype, uplo, n, a, lda, b, ldb, info )
425 CALL cheevx( jobz, range, uplo, n, a, lda, vl, vu, il, iu,
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,
451 ELSE IF( itype.EQ.3 )
THEN
462 CALL ctrmm(
'Left', uplo, trans,
'Non-unit', n, m, cone,
470 work( 1 ) = sroundup_lwork(lwkopt)
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 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 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