225 $ WORK, LWORK, INFO )
235 INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
238 DOUBLE PRECISION A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
245 parameter( one = 1.0d+0 )
248 LOGICAL LQUERY, UPPER, WANTZ
250 INTEGER NEIG, LWMIN, LHTRD, LWTRD, KD, IB
255 EXTERNAL lsame, ilaenv2stage
268 wantz = lsame( jobz,
'V' )
269 upper = lsame( uplo,
'U' )
270 lquery = ( lwork.EQ.-1 )
273 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
275 ELSE IF( .NOT.( lsame( jobz,
'N' ) ) )
THEN
277 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
279 ELSE IF( n.LT.0 )
THEN
281 ELSE IF( lda.LT.max( 1, n ) )
THEN
283 ELSE IF( ldb.LT.max( 1, n ) )
THEN
288 kd = ilaenv2stage( 1,
'DSYTRD_2STAGE', jobz, n, -1, -1, -1 )
289 ib = ilaenv2stage( 2,
'DSYTRD_2STAGE', jobz, n, kd, -1, -1 )
290 lhtrd = ilaenv2stage( 3,
'DSYTRD_2STAGE', jobz, n, kd, ib, -1 )
291 lwtrd = ilaenv2stage( 4,
'DSYTRD_2STAGE', jobz, n, kd, ib, -1 )
292 lwmin = 2*n + lhtrd + lwtrd
295 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
301 CALL xerbla(
'DSYGV_2STAGE ', -info )
303 ELSE IF( lquery )
THEN
314 CALL dpotrf( uplo, n, b, ldb, info )
322 CALL dsygst( itype, uplo, n, a, lda, b, ldb, info )
323 CALL dsyev_2stage( jobz, uplo, n, a, lda, w, work, lwork, info )
332 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
343 CALL dtrsm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
346 ELSE IF( itype.EQ.3 )
THEN
357 CALL dtrmm(
'Left', uplo, trans,
'Non-unit', n, neig, one,
subroutine xerbla(srname, info)
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 matr...
subroutine dsygst(itype, uplo, n, a, lda, b, ldb, info)
DSYGST
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 dtrsm(side, uplo, transa, diag, m, n, alpha, a, lda, b, ldb)
DTRSM