249 SUBROUTINE chegvd( 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 REAL RWORK( * ), W( * )
264 COMPLEX A( lda, * ), B( ldb, * ), WORK( * )
271 parameter ( cone = ( 1.0e+0, 0.0e+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(
'CHEGVD', -info )
344 ELSE IF( lquery )
THEN
355 CALL cpotrf( uplo, n, b, ldb, info )
363 CALL chegst( itype, uplo, n, a, lda, b, ldb, info )
364 CALL cheevd( jobz, uplo, n, a, lda, w, work, lwork, rwork, lrwork,
365 $ iwork, liwork, info )
366 lopt = max(
REAL( LOPT ),
REAL( WORK( 1 ) ) )
367 lropt = max(
REAL( LROPT ),
REAL( RWORK( 1 ) ) )
368 liopt = max(
REAL( LIOPT ),
REAL( IWORK( 1 ) ) )
370 IF( wantz .AND. info.EQ.0 )
THEN
374 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
385 CALL ctrsm(
'Left', uplo, trans,
'Non-unit', n, n, cone,
388 ELSE IF( itype.EQ.3 )
THEN
399 CALL ctrmm(
'Left', uplo, trans,
'Non-unit', n, n, cone,
subroutine chegvd(ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO)
CHEGVD
subroutine chegst(ITYPE, UPLO, N, A, LDA, B, LDB, INFO)
CHEGST
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ctrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRSM
subroutine cheevd(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO)
CHEEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matrices ...
subroutine cpotrf(UPLO, N, A, LDA, INFO)
CPOTRF
subroutine ctrmm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRMM