231 $ WORK, LWORK, RWORK, INFO )
241 INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
244 DOUBLE PRECISION RWORK( * ), W( * )
245 COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
252 parameter( one = ( 1.0d+0, 0.0d+0 ) )
255 LOGICAL LQUERY, UPPER, WANTZ
257 INTEGER NEIG, LWMIN, LHTRD, LWTRD, KD, IB
262 EXTERNAL lsame, ilaenv2stage
275 wantz = lsame( jobz,
'V' )
276 upper = lsame( uplo,
'U' )
277 lquery = ( lwork.EQ.-1 )
280 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
282 ELSE IF( .NOT.( lsame( jobz,
'N' ) ) )
THEN
284 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
286 ELSE IF( n.LT.0 )
THEN
288 ELSE IF( lda.LT.max( 1, n ) )
THEN
290 ELSE IF( ldb.LT.max( 1, n ) )
THEN
295 kd = ilaenv2stage( 1,
'ZHETRD_2STAGE', jobz, n, -1, -1, -1 )
296 ib = ilaenv2stage( 2,
'ZHETRD_2STAGE', jobz, n, kd, -1, -1 )
297 lhtrd = ilaenv2stage( 3,
'ZHETRD_2STAGE', jobz, n, kd, ib, -1 )
298 lwtrd = ilaenv2stage( 4,
'ZHETRD_2STAGE', jobz, n, kd, ib, -1 )
299 lwmin = n + lhtrd + lwtrd
302 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
308 CALL xerbla(
'ZHEGV_2STAGE ', -info )
310 ELSE IF( lquery )
THEN
321 CALL zpotrf( uplo, n, b, ldb, info )
329 CALL zhegst( itype, uplo, n, a, lda, b, ldb, info )
331 $ work, lwork, rwork, info )
340 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
351 CALL ztrsm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
354 ELSE IF( itype.EQ.3 )
THEN
365 CALL ztrmm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
subroutine xerbla(srname, info)
subroutine zheev_2stage(jobz, uplo, n, a, lda, w, work, lwork, rwork, info)
ZHEEV_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE matr...
subroutine zhegst(itype, uplo, n, a, lda, b, ldb, info)
ZHEGST
subroutine zhegv_2stage(itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, rwork, info)
ZHEGV_2STAGE
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