226 SUBROUTINE dsygv_2stage( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W,
227 $ work, lwork, info )
238 INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
241 DOUBLE PRECISION A( lda, * ), B( ldb, * ), W( * ), WORK( * )
248 parameter ( one = 1.0d+0 )
251 LOGICAL LQUERY, UPPER, WANTZ
253 INTEGER NEIG, LWMIN, LHTRD, LWTRD, KD, IB
258 EXTERNAL lsame, ilaenv
271 wantz = lsame( jobz,
'V' )
272 upper = lsame( uplo,
'U' )
273 lquery = ( lwork.EQ.-1 )
276 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
278 ELSE IF( .NOT.( lsame( jobz,
'N' ) ) )
THEN
280 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
282 ELSE IF( n.LT.0 )
THEN
284 ELSE IF( lda.LT.max( 1, n ) )
THEN
286 ELSE IF( ldb.LT.max( 1, n ) )
THEN
291 kd = ilaenv( 17,
'DSYTRD_2STAGE', jobz, n, -1, -1, -1 )
292 ib = ilaenv( 18,
'DSYTRD_2STAGE', jobz, n, kd, -1, -1 )
293 lhtrd = ilaenv( 19,
'DSYTRD_2STAGE', jobz, n, kd, ib, -1 )
294 lwtrd = ilaenv( 20,
'DSYTRD_2STAGE', jobz, n, kd, ib, -1 )
295 lwmin = 2*n + lhtrd + lwtrd
298 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
304 CALL xerbla(
'DSYGV_2STAGE ', -info )
306 ELSE IF( lquery )
THEN
317 CALL dpotrf( uplo, n, b, ldb, info )
325 CALL dsygst( itype, uplo, n, a, lda, b, ldb, info )
326 CALL dsyev_2stage( jobz, uplo, n, a, lda, w, work, lwork, info )
335 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
346 CALL dtrsm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
349 ELSE IF( itype.EQ.3 )
THEN
360 CALL dtrmm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
subroutine dtrsm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
DTRSM
subroutine dsygv_2stage(ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK, INFO)
DSYGV_2STAGE
subroutine dpotrf(UPLO, N, A, LDA, INFO)
DPOTRF
subroutine dtrmm(SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, B, LDB)
DTRMM
subroutine dsyev_2stage(JOBZ, UPLO, N, A, LDA, W, WORK, LWORK, INFO)
DSYEV_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY mat...
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dsygst(ITYPE, UPLO, N, A, LDA, B, LDB, INFO)
DSYGST