249 SUBROUTINE zhegvd( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
250 $ lwork, rwork, lrwork, iwork, liwork, info )
259 INTEGER INFO, ITYPE, LDA, LDB, LIWORK, LRWORK, LWORK, N
263 DOUBLE PRECISION RWORK( * ), W( * )
264 COMPLEX*16 A( lda, * ), B( ldb, * ), WORK( * )
271 parameter ( cone = ( 1.0d+0, 0.0d+0 ) )
274 LOGICAL LQUERY, UPPER, WANTZ
276 INTEGER LIOPT, LIWMIN, LOPT, LROPT, LRWMIN, LWMIN
292 wantz = lsame( jobz,
'V' )
293 upper = lsame( uplo,
'U' )
294 lquery = ( lwork.EQ.-1 .OR. lrwork.EQ.-1 .OR. liwork.EQ.-1 )
301 ELSE IF( wantz )
THEN
303 lrwmin = 1 + 5*n + 2*n*n
313 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
315 ELSE IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
317 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
319 ELSE IF( n.LT.0 )
THEN
321 ELSE IF( lda.LT.max( 1, n ) )
THEN
323 ELSE IF( ldb.LT.max( 1, n ) )
THEN
332 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
334 ELSE IF( lrwork.LT.lrwmin .AND. .NOT.lquery )
THEN
336 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
342 CALL xerbla(
'ZHEGVD', -info )
344 ELSE IF( lquery )
THEN
355 CALL zpotrf( uplo, n, b, ldb, info )
363 CALL zhegst( itype, uplo, n, a, lda, b, ldb, info )
364 CALL zheevd( jobz, uplo, n, a, lda, w, work, lwork, rwork, lrwork,
365 $ iwork, liwork, info )
366 lopt = max( dble( lopt ), dble( work( 1 ) ) )
367 lropt = max( dble( lropt ), dble( rwork( 1 ) ) )
368 liopt = max( dble( liopt ), dble( iwork( 1 ) ) )
370 IF( wantz .AND. info.EQ.0 )
THEN
374 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
385 CALL ztrsm(
'Left', uplo, trans,
'Non-unit', n, n, cone,
388 ELSE IF( itype.EQ.3 )
THEN
399 CALL ztrmm(
'Left', uplo, trans,
'Non-unit', n, n, cone,
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 zheevd(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO)
ZHEEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices ...
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ztrmm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
ZTRMM
subroutine zhegvd(ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO)
ZHEGVD
subroutine ztrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
ZTRSM