179 SUBROUTINE zhegv( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
180 $ LWORK, RWORK, INFO )
188 INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
191 DOUBLE PRECISION RWORK( * ), W( * )
192 COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
199 parameter( one = ( 1.0d+0, 0.0d+0 ) )
202 LOGICAL LQUERY, UPPER, WANTZ
204 INTEGER LWKOPT, NB, NEIG
209 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, info )
282 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
293 CALL ztrsm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
296 ELSE IF( itype.EQ.3 )
THEN
307 CALL ztrmm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
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