333 SUBROUTINE ssyevr( JOBZ, RANGE, UPLO, N, A, LDA, VL, VU, IL, IU,
334 $ ABSTOL, M, W, Z, LDZ, ISUPPZ, WORK, LWORK,
335 $ IWORK, LIWORK, INFO )
342 CHARACTER JOBZ, RANGE, UPLO
343 INTEGER IL, INFO, IU, LDA, LDZ, LIWORK, LWORK, M, N
347 INTEGER ISUPPZ( * ), IWORK( * )
348 REAL A( LDA, * ), W( * ), WORK( * ), Z( LDZ, * )
355 PARAMETER ( ZERO = 0.0e+0, one = 1.0e+0, two = 2.0e+0 )
358 LOGICAL ALLEIG, INDEIG, LOWER, LQUERY, TEST, VALEIG,
361 INTEGER I, IEEEOK, IINFO, IMAX, INDD, INDDD, INDE,
362 $ indee, indibl, indifl, indisp, indiwo, indtau,
363 $ indwk, indwkn, iscale, j, jj, liwmin,
364 $ llwork, llwrkn, lwkopt, lwmin, nb, nsplit
365 REAL ABSTLL, ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN,
366 $ SIGMA, SMLNUM, TMP1, VLL, VUU
371 REAL SLAMCH, SLANSY, SROUNDUP_LWORK
372 EXTERNAL lsame, ilaenv, slamch, slansy, sroundup_lwork
379 INTRINSIC max, min, sqrt
385 ieeeok = ilaenv( 10,
'SSYEVR',
'N', 1, 2, 3, 4 )
387 lower = lsame( uplo,
'L' )
388 wantz = lsame( jobz,
'V' )
389 alleig = lsame( range,
'A' )
390 valeig = lsame( range,
'V' )
391 indeig = lsame( range,
'I' )
393 lquery = ( ( lwork.EQ.-1 ) .OR. ( liwork.EQ.-1 ) )
395 lwmin = max( 1, 26*n )
396 liwmin = max( 1, 10*n )
399 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
401 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
403 ELSE IF( .NOT.( lower .OR. lsame( uplo,
'U' ) ) )
THEN
405 ELSE IF( n.LT.0 )
THEN
407 ELSE IF( lda.LT.max( 1, n ) )
THEN
411 IF( n.GT.0 .AND. vu.LE.vl )
413 ELSE IF( indeig )
THEN
414 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
416 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
422 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
428 nb = ilaenv( 1,
'SSYTRD', uplo, n, -1, -1, -1 )
429 nb = max( nb, ilaenv( 1,
'SORMTR', uplo, n, -1, -1, -1 ) )
430 lwkopt = max( ( nb+1 )*n, lwmin )
431 work( 1 ) = sroundup_lwork(lwkopt)
434 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
436 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
442 CALL xerbla(
'SSYEVR', -info )
444 ELSE IF( lquery )
THEN
458 IF( alleig .OR. indeig )
THEN
462 IF( vl.LT.a( 1, 1 ) .AND. vu.GE.a( 1, 1 ) )
THEN
477 safmin = slamch(
'Safe minimum' )
478 eps = slamch(
'Precision' )
479 smlnum = safmin / eps
480 bignum = one / smlnum
481 rmin = sqrt( smlnum )
482 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
492 anrm = slansy(
'M', uplo, n, a, lda, work )
493 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
496 ELSE IF( anrm.GT.rmax )
THEN
500 IF( iscale.EQ.1 )
THEN
503 CALL sscal( n-j+1, sigma, a( j, j ), 1 )
507 CALL sscal( j, sigma, a( 1, j ), 1 )
511 $ abstll = abstol*sigma
538 llwork = lwork - indwk + 1
557 CALL ssytrd( uplo, n, a, lda, work( indd ), work( inde ),
558 $ work( indtau ), work( indwk ), llwork, iinfo )
565 IF( il.EQ.1 .AND. iu.EQ.n )
THEN
569 IF( ( alleig.OR.test ) .AND. ( ieeeok.EQ.1 ) )
THEN
570 IF( .NOT.wantz )
THEN
571 CALL scopy( n, work( indd ), 1, w, 1 )
572 CALL scopy( n-1, work( inde ), 1, work( indee ), 1 )
573 CALL ssterf( n, w, work( indee ), info )
575 CALL scopy( n-1, work( inde ), 1, work( indee ), 1 )
576 CALL scopy( n, work( indd ), 1, work( inddd ), 1 )
578 IF (abstol .LE. two*n*eps)
THEN
583 CALL sstemr( jobz,
'A', n, work( inddd ), work( indee ),
584 $ vl, vu, il, iu, m, w, z, ldz, n, isuppz,
585 $ tryrac, work( indwk ), lwork, iwork, liwork,
593 IF( wantz .AND. info.EQ.0 )
THEN
595 llwrkn = lwork - indwkn + 1
596 CALL sormtr(
'L', uplo,
'N', n, m, a, lda,
597 $ work( indtau ), z, ldz, work( indwkn ),
621 CALL sstebz( range, order, n, vll, vuu, il, iu, abstll,
622 $ work( indd ), work( inde ), m, nsplit, w,
623 $ iwork( indibl ), iwork( indisp ), work( indwk ),
624 $ iwork( indiwo ), info )
627 CALL sstein( n, work( indd ), work( inde ), m, w,
628 $ iwork( indibl ), iwork( indisp ), z, ldz,
629 $ work( indwk ), iwork( indiwo ), iwork( indifl ),
636 llwrkn = lwork - indwkn + 1
637 CALL sormtr(
'L', uplo,
'N', n, m, a, lda, work( indtau ), z,
638 $ ldz, work( indwkn ), llwrkn, iinfo )
645 IF( iscale.EQ.1 )
THEN
651 CALL sscal( imax, one / sigma, w, 1 )
664 IF( w( jj ).LT.tmp1 )
THEN
673 CALL sswap( n, z( 1, i ), 1, z( 1, j ), 1 )
680 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine ssyevr(jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info)
SSYEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for SY matrices
subroutine ssytrd(uplo, n, a, lda, d, e, tau, work, lwork, info)
SSYTRD
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine sstebz(range, order, n, vl, vu, il, iu, abstol, d, e, m, nsplit, w, iblock, isplit, work, iwork, info)
SSTEBZ
subroutine sstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
SSTEIN
subroutine sstemr(jobz, range, n, d, e, vl, vu, il, iu, m, w, z, ldz, nzc, isuppz, tryrac, work, lwork, iwork, liwork, info)
SSTEMR
subroutine ssterf(n, d, e, info)
SSTERF
subroutine sswap(n, sx, incx, sy, incy)
SSWAP
subroutine sormtr(side, uplo, trans, m, n, a, lda, tau, c, ldc, work, lwork, info)
SORMTR