177 SUBROUTINE zhegv( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W,
179 $ LWORK, RWORK, INFO )
187 INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
190 DOUBLE PRECISION RWORK( * ), W( * )
191 COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
198 PARAMETER ( ONE = ( 1.0d+0, 0.0d+0 ) )
201 LOGICAL LQUERY, UPPER, WANTZ
203 INTEGER LWKOPT, NB, NEIG
208 EXTERNAL lsame, ilaenv
221 wantz = lsame( jobz,
'V' )
222 upper = lsame( uplo,
'U' )
223 lquery = ( lwork.EQ.-1 )
226 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
228 ELSE IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
230 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
232 ELSE IF( n.LT.0 )
THEN
234 ELSE IF( lda.LT.max( 1, n ) )
THEN
236 ELSE IF( ldb.LT.max( 1, n ) )
THEN
241 nb = ilaenv( 1,
'ZHETRD', uplo, n, -1, -1, -1 )
242 lwkopt = max( 1, ( nb + 1 )*n )
245 IF( lwork.LT.max( 1, 2*n - 1 ) .AND. .NOT.lquery )
THEN
251 CALL xerbla(
'ZHEGV ', -info )
253 ELSE IF( lquery )
THEN
264 CALL zpotrf( uplo, n, b, ldb, info )
272 CALL zhegst( itype, uplo, n, a, lda, b, ldb, info )
273 CALL zheev( jobz, uplo, n, a, lda, w, work, lwork, rwork,
283 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
294 CALL ztrsm(
'Left', uplo, trans,
'Non-unit', n, neig,
298 ELSE IF( itype.EQ.3 )
THEN
309 CALL ztrmm(
'Left', uplo, trans,
'Non-unit', n, neig,
subroutine xerbla(srname, info)
subroutine zheev(jobz, uplo, n, a, lda, w, work, lwork, rwork, info)
ZHEEV 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 zhegv(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, rwork, info)
ZHEGV
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