192 INTEGER INFO, LDA, LWORK, N
195 DOUBLE PRECISION A( LDA, * ), W( * ), WORK( * )
201 DOUBLE PRECISION ZERO, ONE
202 parameter( zero = 0.0d0, one = 1.0d0 )
205 LOGICAL LOWER, LQUERY, WANTZ
206 INTEGER IINFO, IMAX, INDE, INDTAU, INDWRK, ISCALE,
207 $ llwork, lwmin, lhtrd, lwtrd, kd, ib, indhous
208 DOUBLE PRECISION ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
214 DOUBLE PRECISION DLAMCH, DLANSY
215 EXTERNAL lsame, dlamch, dlansy, ilaenv2stage
228 wantz = lsame( jobz,
'V' )
229 lower = lsame( uplo,
'L' )
230 lquery = ( lwork.EQ.-1 )
233 IF( .NOT.( lsame( jobz,
'N' ) ) )
THEN
235 ELSE IF( .NOT.( lower .OR. lsame( uplo,
'U' ) ) )
THEN
237 ELSE IF( n.LT.0 )
THEN
239 ELSE IF( lda.LT.max( 1, n ) )
THEN
244 kd = ilaenv2stage( 1,
'DSYTRD_2STAGE', jobz, n, -1, -1, -1 )
245 ib = ilaenv2stage( 2,
'DSYTRD_2STAGE', jobz, n, kd, -1, -1 )
246 lhtrd = ilaenv2stage( 3,
'DSYTRD_2STAGE', jobz, n, kd, ib, -1 )
247 lwtrd = ilaenv2stage( 4,
'DSYTRD_2STAGE', jobz, n, kd, ib, -1 )
248 lwmin = 2*n + lhtrd + lwtrd
251 IF( lwork.LT.lwmin .AND. .NOT.lquery )
256 CALL xerbla(
'DSYEV_2STAGE ', -info )
258 ELSE IF( lquery )
THEN
278 safmin = dlamch(
'Safe minimum' )
279 eps = dlamch(
'Precision' )
280 smlnum = safmin / eps
281 bignum = one / smlnum
282 rmin = sqrt( smlnum )
283 rmax = sqrt( bignum )
287 anrm = dlansy(
'M', uplo, n, a, lda, work )
289 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
292 ELSE IF( anrm.GT.rmax )
THEN
297 $
CALL dlascl( uplo, 0, 0, one, sigma, n, n, a, lda, info )
304 indwrk = indhous + lhtrd
305 llwork = lwork - indwrk + 1
308 $ work( indtau ), work( indhous ), lhtrd,
309 $ work( indwrk ), llwork, iinfo )
314 IF( .NOT.wantz )
THEN
315 CALL dsterf( n, w, work( inde ), info )
320 CALL dorgtr( uplo, n, a, lda, work( indtau ), work( indwrk ),
322 CALL dsteqr( jobz, n, w, work( inde ), a, lda, work( indtau ),
328 IF( iscale.EQ.1 )
THEN
334 CALL dscal( imax, one / sigma, w, 1 )
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 dsytrd_2stage(vect, uplo, n, a, lda, d, e, tau, hous2, lhous2, work, lwork, info)
DSYTRD_2STAGE
subroutine dlascl(type, kl, ku, cfrom, cto, m, n, a, lda, info)
DLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dsteqr(compz, n, d, e, z, ldz, work, info)
DSTEQR
subroutine dsterf(n, d, e, info)
DSTERF
subroutine dorgtr(uplo, n, a, lda, tau, work, lwork, info)
DORGTR