181 SUBROUTINE zhegv( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
182 $ lwork, rwork, info )
191 INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
194 DOUBLE PRECISION RWORK( * ), W( * )
195 COMPLEX*16 A( lda, * ), B( ldb, * ), WORK( * )
202 parameter ( one = ( 1.0d+0, 0.0d+0 ) )
205 LOGICAL LQUERY, UPPER, WANTZ
207 INTEGER LWKOPT, NB, NEIG
212 EXTERNAL lsame, ilaenv
224 wantz = lsame( jobz,
'V' )
225 upper = lsame( uplo,
'U' )
226 lquery = ( lwork.EQ.-1 )
229 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
231 ELSE IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
233 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
235 ELSE IF( n.LT.0 )
THEN
237 ELSE IF( lda.LT.max( 1, n ) )
THEN
239 ELSE IF( ldb.LT.max( 1, n ) )
THEN
244 nb = ilaenv( 1,
'ZHETRD', uplo, n, -1, -1, -1 )
245 lwkopt = max( 1, ( nb + 1 )*n )
248 IF( lwork.LT.max( 1, 2*n - 1 ) .AND. .NOT.lquery )
THEN
254 CALL xerbla(
'ZHEGV ', -info )
256 ELSE IF( lquery )
THEN
267 CALL zpotrf( uplo, n, b, ldb, info )
275 CALL zhegst( itype, uplo, n, a, lda, b, ldb, info )
276 CALL zheev( jobz, uplo, n, a, lda, w, work, lwork, rwork, info )
285 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
296 CALL ztrsm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
299 ELSE IF( itype.EQ.3 )
THEN
310 CALL ztrmm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
subroutine zpotrf(UPLO, N, A, LDA, INFO)
ZPOTRF VARIANT: right looking block version of the algorithm, calling Level 3 BLAS.
subroutine zhegst(ITYPE, UPLO, N, A, LDA, B, LDB, INFO)
ZHEGST
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ztrmm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
ZTRMM
subroutine zhegv(ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, RWORK, INFO)
ZHEGV
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 ztrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
ZTRSM