232 SUBROUTINE chegv_2stage( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W,
233 $ work, lwork, rwork, info )
244 INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
247 REAL RWORK( * ), W( * )
248 COMPLEX A( lda, * ), B( ldb, * ), WORK( * )
255 parameter ( one = ( 1.0e+0, 0.0e+0 ) )
258 LOGICAL LQUERY, UPPER, WANTZ
260 INTEGER NEIG, LWMIN, LHTRD, LWTRD, KD, IB
265 EXTERNAL lsame, ilaenv
278 wantz = lsame( jobz,
'V' )
279 upper = lsame( uplo,
'U' )
280 lquery = ( lwork.EQ.-1 )
283 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
285 ELSE IF( .NOT.( lsame( jobz,
'N' ) ) )
THEN
287 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
289 ELSE IF( n.LT.0 )
THEN
291 ELSE IF( lda.LT.max( 1, n ) )
THEN
293 ELSE IF( ldb.LT.max( 1, n ) )
THEN
298 kd = ilaenv( 17,
'CHETRD_2STAGE', jobz, n, -1, -1, -1 )
299 ib = ilaenv( 18,
'CHETRD_2STAGE', jobz, n, kd, -1, -1 )
300 lhtrd = ilaenv( 19,
'CHETRD_2STAGE', jobz, n, kd, ib, -1 )
301 lwtrd = ilaenv( 20,
'CHETRD_2STAGE', jobz, n, kd, ib, -1 )
302 lwmin = n + lhtrd + lwtrd
305 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
311 CALL xerbla(
'CHEGV_2STAGE ', -info )
313 ELSE IF( lquery )
THEN
324 CALL cpotrf( uplo, n, b, ldb, info )
332 CALL chegst( itype, uplo, n, a, lda, b, ldb, info )
334 $ work, lwork, rwork, info )
343 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
354 CALL ctrsm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
357 ELSE IF( itype.EQ.3 )
THEN
368 CALL ctrmm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
subroutine ctrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRSM
subroutine chegst(ITYPE, UPLO, N, A, LDA, B, LDB, INFO)
CHEGST
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine cheev_2stage(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, RWORK, INFO)
CHEEV_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for HE mat...
subroutine cpotrf(UPLO, N, A, LDA, INFO)
CPOTRF
subroutine ctrmm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
CTRMM
subroutine chegv_2stage(ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, RWORK, INFO)
CHEGV_2STAGE