LAPACK  3.5.0
LAPACK: Linear Algebra PACKage
sstemr.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine sstemr (JOBZ, RANGE, N, D, E, VL, VU, IL, IU, M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK, IWORK, LIWORK, INFO)
 SSTEMR More...
 

Function/Subroutine Documentation

subroutine sstemr ( character  JOBZ,
character  RANGE,
integer  N,
real, dimension( * )  D,
real, dimension( * )  E,
real  VL,
real  VU,
integer  IL,
integer  IU,
integer  M,
real, dimension( * )  W,
real, dimension( ldz, * )  Z,
integer  LDZ,
integer  NZC,
integer, dimension( * )  ISUPPZ,
logical  TRYRAC,
real, dimension( * )  WORK,
integer  LWORK,
integer, dimension( * )  IWORK,
integer  LIWORK,
integer  INFO 
)

SSTEMR

Download SSTEMR + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 SSTEMR computes selected eigenvalues and, optionally, eigenvectors
 of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
 a well defined set of pairwise different real eigenvalues, the corresponding
 real eigenvectors are pairwise orthogonal.

 The spectrum may be computed either completely or partially by specifying
 either an interval (VL,VU] or a range of indices IL:IU for the desired
 eigenvalues.

 Depending on the number of desired eigenvalues, these are computed either
 by bisection or the dqds algorithm. Numerically orthogonal eigenvectors are
 computed by the use of various suitable L D L^T factorizations near clusters
 of close eigenvalues (referred to as RRRs, Relatively Robust
 Representations). An informal sketch of the algorithm follows.

 For each unreduced block (submatrix) of T,
    (a) Compute T - sigma I  = L D L^T, so that L and D
        define all the wanted eigenvalues to high relative accuracy.
        This means that small relative changes in the entries of D and L
        cause only small relative changes in the eigenvalues and
        eigenvectors. The standard (unfactored) representation of the
        tridiagonal matrix T does not have this property in general.
    (b) Compute the eigenvalues to suitable accuracy.
        If the eigenvectors are desired, the algorithm attains full
        accuracy of the computed eigenvalues only right before
        the corresponding vectors have to be computed, see steps c) and d).
    (c) For each cluster of close eigenvalues, select a new
        shift close to the cluster, find a new factorization, and refine
        the shifted eigenvalues to suitable accuracy.
    (d) For each eigenvalue with a large enough relative separation compute
        the corresponding eigenvector by forming a rank revealing twisted
        factorization. Go back to (c) for any clusters that remain.

 For more details, see:
 - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
   to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
   Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
 - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
   Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
   2004.  Also LAPACK Working Note 154.
 - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
   tridiagonal eigenvalue/eigenvector problem",
   Computer Science Division Technical Report No. UCB/CSD-97-971,
   UC Berkeley, May 1997.

 Further Details
 1.SSTEMR works only on machines which follow IEEE-754
 floating-point standard in their handling of infinities and NaNs.
 This permits the use of efficient inner loops avoiding a check for
 zero divisors.
Parameters
[in]JOBZ
          JOBZ is CHARACTER*1
          = 'N':  Compute eigenvalues only;
          = 'V':  Compute eigenvalues and eigenvectors.
[in]RANGE
          RANGE is CHARACTER*1
          = 'A': all eigenvalues will be found.
          = 'V': all eigenvalues in the half-open interval (VL,VU]
                 will be found.
          = 'I': the IL-th through IU-th eigenvalues will be found.
[in]N
          N is INTEGER
          The order of the matrix.  N >= 0.
[in,out]D
          D is REAL array, dimension (N)
          On entry, the N diagonal elements of the tridiagonal matrix
          T. On exit, D is overwritten.
[in,out]E
          E is REAL array, dimension (N)
          On entry, the (N-1) subdiagonal elements of the tridiagonal
          matrix T in elements 1 to N-1 of E. E(N) need not be set on
          input, but is used internally as workspace.
          On exit, E is overwritten.
[in]VL
          VL is REAL
[in]VU
          VU is REAL

          If RANGE='V', the lower and upper bounds of the interval to
          be searched for eigenvalues. VL < VU.
          Not referenced if RANGE = 'A' or 'I'.
[in]IL
          IL is INTEGER
[in]IU
          IU is INTEGER

          If RANGE='I', the indices (in ascending order) of the
          smallest and largest eigenvalues to be returned.
          1 <= IL <= IU <= N, if N > 0.
          Not referenced if RANGE = 'A' or 'V'.
[out]M
          M is INTEGER
          The total number of eigenvalues found.  0 <= M <= N.
          If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
[out]W
          W is REAL array, dimension (N)
          The first M elements contain the selected eigenvalues in
          ascending order.
[out]Z
          Z is REAL array, dimension (LDZ, max(1,M) )
          If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
          contain the orthonormal eigenvectors of the matrix T
          corresponding to the selected eigenvalues, with the i-th
          column of Z holding the eigenvector associated with W(i).
          If JOBZ = 'N', then Z is not referenced.
          Note: the user must ensure that at least max(1,M) columns are
          supplied in the array Z; if RANGE = 'V', the exact value of M
          is not known in advance and can be computed with a workspace
          query by setting NZC = -1, see below.
[in]LDZ
          LDZ is INTEGER
          The leading dimension of the array Z.  LDZ >= 1, and if
          JOBZ = 'V', then LDZ >= max(1,N).
[in]NZC
          NZC is INTEGER
          The number of eigenvectors to be held in the array Z.
          If RANGE = 'A', then NZC >= max(1,N).
          If RANGE = 'V', then NZC >= the number of eigenvalues in (VL,VU].
          If RANGE = 'I', then NZC >= IU-IL+1.
          If NZC = -1, then a workspace query is assumed; the
          routine calculates the number of columns of the array Z that
          are needed to hold the eigenvectors.
          This value is returned as the first entry of the Z array, and
          no error message related to NZC is issued by XERBLA.
[out]ISUPPZ
          ISUPPZ is INTEGER ARRAY, dimension ( 2*max(1,M) )
          The support of the eigenvectors in Z, i.e., the indices
          indicating the nonzero elements in Z. The i-th computed eigenvector
          is nonzero only in elements ISUPPZ( 2*i-1 ) through
          ISUPPZ( 2*i ). This is relevant in the case when the matrix
          is split. ISUPPZ is only accessed when JOBZ is 'V' and N > 0.
[in,out]TRYRAC
          TRYRAC is LOGICAL
          If TRYRAC.EQ..TRUE., indicates that the code should check whether
          the tridiagonal matrix defines its eigenvalues to high relative
          accuracy.  If so, the code uses relative-accuracy preserving
          algorithms that might be (a bit) slower depending on the matrix.
          If the matrix does not define its eigenvalues to high relative
          accuracy, the code can uses possibly faster algorithms.
          If TRYRAC.EQ..FALSE., the code is not required to guarantee
          relatively accurate eigenvalues and can use the fastest possible
          techniques.
          On exit, a .TRUE. TRYRAC will be set to .FALSE. if the matrix
          does not define its eigenvalues to high relative accuracy.
[out]WORK
          WORK is REAL array, dimension (LWORK)
          On exit, if INFO = 0, WORK(1) returns the optimal
          (and minimal) LWORK.
[in]LWORK
          LWORK is INTEGER
          The dimension of the array WORK. LWORK >= max(1,18*N)
          if JOBZ = 'V', and LWORK >= max(1,12*N) if JOBZ = 'N'.
          If LWORK = -1, then a workspace query is assumed; the routine
          only calculates the optimal size of the WORK array, returns
          this value as the first entry of the WORK array, and no error
          message related to LWORK is issued by XERBLA.
[out]IWORK
          IWORK is INTEGER array, dimension (LIWORK)
          On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
[in]LIWORK
          LIWORK is INTEGER
          The dimension of the array IWORK.  LIWORK >= max(1,10*N)
          if the eigenvectors are desired, and LIWORK >= max(1,8*N)
          if only the eigenvalues are to be computed.
          If LIWORK = -1, then a workspace query is assumed; the
          routine only calculates the optimal size of the IWORK array,
          returns this value as the first entry of the IWORK array, and
          no error message related to LIWORK is issued by XERBLA.
[out]INFO
          INFO is INTEGER
          On exit, INFO
          = 0:  successful exit
          < 0:  if INFO = -i, the i-th argument had an illegal value
          > 0:  if INFO = 1X, internal error in SLARRE,
                if INFO = 2X, internal error in SLARRV.
                Here, the digit X = ABS( IINFO ) < 10, where IINFO is
                the nonzero error code returned by SLARRE or
                SLARRV, respectively.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2013
Contributors:
Beresford Parlett, University of California, Berkeley, USA
Jim Demmel, University of California, Berkeley, USA
Inderjit Dhillon, University of Texas, Austin, USA
Osni Marques, LBNL/NERSC, USA
Christof Voemel, University of California, Berkeley, USA

Definition at line 314 of file sstemr.f.

314 *
315 * -- LAPACK computational routine (version 3.5.0) --
316 * -- LAPACK is a software package provided by Univ. of Tennessee, --
317 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
318 * November 2013
319 *
320 * .. Scalar Arguments ..
321  CHARACTER jobz, range
322  LOGICAL tryrac
323  INTEGER il, info, iu, ldz, nzc, liwork, lwork, m, n
324  REAL vl, vu
325 * ..
326 * .. Array Arguments ..
327  INTEGER isuppz( * ), iwork( * )
328  REAL d( * ), e( * ), w( * ), work( * )
329  REAL z( ldz, * )
330 * ..
331 *
332 * =====================================================================
333 *
334 * .. Parameters ..
335  REAL zero, one, four, minrgp
336  parameter( zero = 0.0e0, one = 1.0e0,
337  $ four = 4.0e0,
338  $ minrgp = 3.0e-3 )
339 * ..
340 * .. Local Scalars ..
341  LOGICAL alleig, indeig, lquery, valeig, wantz, zquery
342  INTEGER i, ibegin, iend, ifirst, iil, iindbl, iindw,
343  $ iindwk, iinfo, iinspl, iiu, ilast, in, indd,
344  $ inde2, inderr, indgp, indgrs, indwrk, itmp,
345  $ itmp2, j, jblk, jj, liwmin, lwmin, nsplit,
346  $ nzcmin, offset, wbegin, wend
347  REAL bignum, cs, eps, pivmin, r1, r2, rmax, rmin,
348  $ rtol1, rtol2, safmin, scale, smlnum, sn,
349  $ thresh, tmp, tnrm, wl, wu
350 * ..
351 * ..
352 * .. External Functions ..
353  LOGICAL lsame
354  REAL slamch, slanst
355  EXTERNAL lsame, slamch, slanst
356 * ..
357 * .. External Subroutines ..
358  EXTERNAL scopy, slae2, slaev2, slarrc, slarre, slarrj,
360 * ..
361 * .. Intrinsic Functions ..
362  INTRINSIC max, min, sqrt
363 * ..
364 * .. Executable Statements ..
365 *
366 * Test the input parameters.
367 *
368  wantz = lsame( jobz, 'V' )
369  alleig = lsame( range, 'A' )
370  valeig = lsame( range, 'V' )
371  indeig = lsame( range, 'I' )
372 *
373  lquery = ( ( lwork.EQ.-1 ).OR.( liwork.EQ.-1 ) )
374  zquery = ( nzc.EQ.-1 )
375 
376 * SSTEMR needs WORK of size 6*N, IWORK of size 3*N.
377 * In addition, SLARRE needs WORK of size 6*N, IWORK of size 5*N.
378 * Furthermore, SLARRV needs WORK of size 12*N, IWORK of size 7*N.
379  IF( wantz ) THEN
380  lwmin = 18*n
381  liwmin = 10*n
382  ELSE
383 * need less workspace if only the eigenvalues are wanted
384  lwmin = 12*n
385  liwmin = 8*n
386  ENDIF
387 
388  wl = zero
389  wu = zero
390  iil = 0
391  iiu = 0
392  nsplit = 0
393 
394  IF( valeig ) THEN
395 * We do not reference VL, VU in the cases RANGE = 'I','A'
396 * The interval (WL, WU] contains all the wanted eigenvalues.
397 * It is either given by the user or computed in SLARRE.
398  wl = vl
399  wu = vu
400  ELSEIF( indeig ) THEN
401 * We do not reference IL, IU in the cases RANGE = 'V','A'
402  iil = il
403  iiu = iu
404  ENDIF
405 *
406  info = 0
407  IF( .NOT.( wantz .OR. lsame( jobz, 'N' ) ) ) THEN
408  info = -1
409  ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) ) THEN
410  info = -2
411  ELSE IF( n.LT.0 ) THEN
412  info = -3
413  ELSE IF( valeig .AND. n.GT.0 .AND. wu.LE.wl ) THEN
414  info = -7
415  ELSE IF( indeig .AND. ( iil.LT.1 .OR. iil.GT.n ) ) THEN
416  info = -8
417  ELSE IF( indeig .AND. ( iiu.LT.iil .OR. iiu.GT.n ) ) THEN
418  info = -9
419  ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) ) THEN
420  info = -13
421  ELSE IF( lwork.LT.lwmin .AND. .NOT.lquery ) THEN
422  info = -17
423  ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery ) THEN
424  info = -19
425  END IF
426 *
427 * Get machine constants.
428 *
429  safmin = slamch( 'Safe minimum' )
430  eps = slamch( 'Precision' )
431  smlnum = safmin / eps
432  bignum = one / smlnum
433  rmin = sqrt( smlnum )
434  rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
435 *
436  IF( info.EQ.0 ) THEN
437  work( 1 ) = lwmin
438  iwork( 1 ) = liwmin
439 *
440  IF( wantz .AND. alleig ) THEN
441  nzcmin = n
442  ELSE IF( wantz .AND. valeig ) THEN
443  CALL slarrc( 'T', n, vl, vu, d, e, safmin,
444  $ nzcmin, itmp, itmp2, info )
445  ELSE IF( wantz .AND. indeig ) THEN
446  nzcmin = iiu-iil+1
447  ELSE
448 * WANTZ .EQ. FALSE.
449  nzcmin = 0
450  ENDIF
451  IF( zquery .AND. info.EQ.0 ) THEN
452  z( 1,1 ) = nzcmin
453  ELSE IF( nzc.LT.nzcmin .AND. .NOT.zquery ) THEN
454  info = -14
455  END IF
456  END IF
457 
458  IF( info.NE.0 ) THEN
459 *
460  CALL xerbla( 'SSTEMR', -info )
461 *
462  RETURN
463  ELSE IF( lquery .OR. zquery ) THEN
464  RETURN
465  END IF
466 *
467 * Handle N = 0, 1, and 2 cases immediately
468 *
469  m = 0
470  IF( n.EQ.0 )
471  $ RETURN
472 *
473  IF( n.EQ.1 ) THEN
474  IF( alleig .OR. indeig ) THEN
475  m = 1
476  w( 1 ) = d( 1 )
477  ELSE
478  IF( wl.LT.d( 1 ) .AND. wu.GE.d( 1 ) ) THEN
479  m = 1
480  w( 1 ) = d( 1 )
481  END IF
482  END IF
483  IF( wantz.AND.(.NOT.zquery) ) THEN
484  z( 1, 1 ) = one
485  isuppz(1) = 1
486  isuppz(2) = 1
487  END IF
488  RETURN
489  END IF
490 *
491  IF( n.EQ.2 ) THEN
492  IF( .NOT.wantz ) THEN
493  CALL slae2( d(1), e(1), d(2), r1, r2 )
494  ELSE IF( wantz.AND.(.NOT.zquery) ) THEN
495  CALL slaev2( d(1), e(1), d(2), r1, r2, cs, sn )
496  END IF
497  IF( alleig.OR.
498  $ (valeig.AND.(r2.GT.wl).AND.
499  $ (r2.LE.wu)).OR.
500  $ (indeig.AND.(iil.EQ.1)) ) THEN
501  m = m+1
502  w( m ) = r2
503  IF( wantz.AND.(.NOT.zquery) ) THEN
504  z( 1, m ) = -sn
505  z( 2, m ) = cs
506 * Note: At most one of SN and CS can be zero.
507  IF (sn.NE.zero) THEN
508  IF (cs.NE.zero) THEN
509  isuppz(2*m-1) = 1
510  isuppz(2*m) = 2
511  ELSE
512  isuppz(2*m-1) = 1
513  isuppz(2*m) = 1
514  END IF
515  ELSE
516  isuppz(2*m-1) = 2
517  isuppz(2*m) = 2
518  END IF
519  ENDIF
520  ENDIF
521  IF( alleig.OR.
522  $ (valeig.AND.(r1.GT.wl).AND.
523  $ (r1.LE.wu)).OR.
524  $ (indeig.AND.(iiu.EQ.2)) ) THEN
525  m = m+1
526  w( m ) = r1
527  IF( wantz.AND.(.NOT.zquery) ) THEN
528  z( 1, m ) = cs
529  z( 2, m ) = sn
530 * Note: At most one of SN and CS can be zero.
531  IF (sn.NE.zero) THEN
532  IF (cs.NE.zero) THEN
533  isuppz(2*m-1) = 1
534  isuppz(2*m) = 2
535  ELSE
536  isuppz(2*m-1) = 1
537  isuppz(2*m) = 1
538  END IF
539  ELSE
540  isuppz(2*m-1) = 2
541  isuppz(2*m) = 2
542  END IF
543  ENDIF
544  ENDIF
545  ELSE
546 
547 * Continue with general N
548 
549  indgrs = 1
550  inderr = 2*n + 1
551  indgp = 3*n + 1
552  indd = 4*n + 1
553  inde2 = 5*n + 1
554  indwrk = 6*n + 1
555 *
556  iinspl = 1
557  iindbl = n + 1
558  iindw = 2*n + 1
559  iindwk = 3*n + 1
560 *
561 * Scale matrix to allowable range, if necessary.
562 * The allowable range is related to the PIVMIN parameter; see the
563 * comments in SLARRD. The preference for scaling small values
564 * up is heuristic; we expect users' matrices not to be close to the
565 * RMAX threshold.
566 *
567  scale = one
568  tnrm = slanst( 'M', n, d, e )
569  IF( tnrm.GT.zero .AND. tnrm.LT.rmin ) THEN
570  scale = rmin / tnrm
571  ELSE IF( tnrm.GT.rmax ) THEN
572  scale = rmax / tnrm
573  END IF
574  IF( scale.NE.one ) THEN
575  CALL sscal( n, scale, d, 1 )
576  CALL sscal( n-1, scale, e, 1 )
577  tnrm = tnrm*scale
578  IF( valeig ) THEN
579 * If eigenvalues in interval have to be found,
580 * scale (WL, WU] accordingly
581  wl = wl*scale
582  wu = wu*scale
583  ENDIF
584  END IF
585 *
586 * Compute the desired eigenvalues of the tridiagonal after splitting
587 * into smaller subblocks if the corresponding off-diagonal elements
588 * are small
589 * THRESH is the splitting parameter for SLARRE
590 * A negative THRESH forces the old splitting criterion based on the
591 * size of the off-diagonal. A positive THRESH switches to splitting
592 * which preserves relative accuracy.
593 *
594  IF( tryrac ) THEN
595 * Test whether the matrix warrants the more expensive relative approach.
596  CALL slarrr( n, d, e, iinfo )
597  ELSE
598 * The user does not care about relative accurately eigenvalues
599  iinfo = -1
600  ENDIF
601 * Set the splitting criterion
602  IF (iinfo.EQ.0) THEN
603  thresh = eps
604  ELSE
605  thresh = -eps
606 * relative accuracy is desired but T does not guarantee it
607  tryrac = .false.
608  ENDIF
609 *
610  IF( tryrac ) THEN
611 * Copy original diagonal, needed to guarantee relative accuracy
612  CALL scopy(n,d,1,work(indd),1)
613  ENDIF
614 * Store the squares of the offdiagonal values of T
615  DO 5 j = 1, n-1
616  work( inde2+j-1 ) = e(j)**2
617  5 CONTINUE
618 
619 * Set the tolerance parameters for bisection
620  IF( .NOT.wantz ) THEN
621 * SLARRE computes the eigenvalues to full precision.
622  rtol1 = four * eps
623  rtol2 = four * eps
624  ELSE
625 * SLARRE computes the eigenvalues to less than full precision.
626 * SLARRV will refine the eigenvalue approximations, and we can
627 * need less accurate initial bisection in SLARRE.
628 * Note: these settings do only affect the subset case and SLARRE
629  rtol1 = max( sqrt(eps)*5.0e-2, four * eps )
630  rtol2 = max( sqrt(eps)*5.0e-3, four * eps )
631  ENDIF
632  CALL slarre( range, n, wl, wu, iil, iiu, d, e,
633  $ work(inde2), rtol1, rtol2, thresh, nsplit,
634  $ iwork( iinspl ), m, w, work( inderr ),
635  $ work( indgp ), iwork( iindbl ),
636  $ iwork( iindw ), work( indgrs ), pivmin,
637  $ work( indwrk ), iwork( iindwk ), iinfo )
638  IF( iinfo.NE.0 ) THEN
639  info = 10 + abs( iinfo )
640  RETURN
641  END IF
642 * Note that if RANGE .NE. 'V', SLARRE computes bounds on the desired
643 * part of the spectrum. All desired eigenvalues are contained in
644 * (WL,WU]
645 
646 
647  IF( wantz ) THEN
648 *
649 * Compute the desired eigenvectors corresponding to the computed
650 * eigenvalues
651 *
652  CALL slarrv( n, wl, wu, d, e,
653  $ pivmin, iwork( iinspl ), m,
654  $ 1, m, minrgp, rtol1, rtol2,
655  $ w, work( inderr ), work( indgp ), iwork( iindbl ),
656  $ iwork( iindw ), work( indgrs ), z, ldz,
657  $ isuppz, work( indwrk ), iwork( iindwk ), iinfo )
658  IF( iinfo.NE.0 ) THEN
659  info = 20 + abs( iinfo )
660  RETURN
661  END IF
662  ELSE
663 * SLARRE computes eigenvalues of the (shifted) root representation
664 * SLARRV returns the eigenvalues of the unshifted matrix.
665 * However, if the eigenvectors are not desired by the user, we need
666 * to apply the corresponding shifts from SLARRE to obtain the
667 * eigenvalues of the original matrix.
668  DO 20 j = 1, m
669  itmp = iwork( iindbl+j-1 )
670  w( j ) = w( j ) + e( iwork( iinspl+itmp-1 ) )
671  20 CONTINUE
672  END IF
673 *
674 
675  IF ( tryrac ) THEN
676 * Refine computed eigenvalues so that they are relatively accurate
677 * with respect to the original matrix T.
678  ibegin = 1
679  wbegin = 1
680  DO 39 jblk = 1, iwork( iindbl+m-1 )
681  iend = iwork( iinspl+jblk-1 )
682  in = iend - ibegin + 1
683  wend = wbegin - 1
684 * check if any eigenvalues have to be refined in this block
685  36 CONTINUE
686  IF( wend.LT.m ) THEN
687  IF( iwork( iindbl+wend ).EQ.jblk ) THEN
688  wend = wend + 1
689  GO TO 36
690  END IF
691  END IF
692  IF( wend.LT.wbegin ) THEN
693  ibegin = iend + 1
694  GO TO 39
695  END IF
696 
697  offset = iwork(iindw+wbegin-1)-1
698  ifirst = iwork(iindw+wbegin-1)
699  ilast = iwork(iindw+wend-1)
700  rtol2 = four * eps
701  CALL slarrj( in,
702  $ work(indd+ibegin-1), work(inde2+ibegin-1),
703  $ ifirst, ilast, rtol2, offset, w(wbegin),
704  $ work( inderr+wbegin-1 ),
705  $ work( indwrk ), iwork( iindwk ), pivmin,
706  $ tnrm, iinfo )
707  ibegin = iend + 1
708  wbegin = wend + 1
709  39 CONTINUE
710  ENDIF
711 *
712 * If matrix was scaled, then rescale eigenvalues appropriately.
713 *
714  IF( scale.NE.one ) THEN
715  CALL sscal( m, one / scale, w, 1 )
716  END IF
717  END IF
718 *
719 * If eigenvalues are not in increasing order, then sort them,
720 * possibly along with eigenvectors.
721 *
722  IF( nsplit.GT.1 .OR. n.EQ.2 ) THEN
723  IF( .NOT. wantz ) THEN
724  CALL slasrt( 'I', m, w, iinfo )
725  IF( iinfo.NE.0 ) THEN
726  info = 3
727  RETURN
728  END IF
729  ELSE
730  DO 60 j = 1, m - 1
731  i = 0
732  tmp = w( j )
733  DO 50 jj = j + 1, m
734  IF( w( jj ).LT.tmp ) THEN
735  i = jj
736  tmp = w( jj )
737  END IF
738  50 CONTINUE
739  IF( i.NE.0 ) THEN
740  w( i ) = w( j )
741  w( j ) = tmp
742  IF( wantz ) THEN
743  CALL sswap( n, z( 1, i ), 1, z( 1, j ), 1 )
744  itmp = isuppz( 2*i-1 )
745  isuppz( 2*i-1 ) = isuppz( 2*j-1 )
746  isuppz( 2*j-1 ) = itmp
747  itmp = isuppz( 2*i )
748  isuppz( 2*i ) = isuppz( 2*j )
749  isuppz( 2*j ) = itmp
750  END IF
751  END IF
752  60 CONTINUE
753  END IF
754  ENDIF
755 *
756 *
757  work( 1 ) = lwmin
758  iwork( 1 ) = liwmin
759  RETURN
760 *
761 * End of SSTEMR
762 *
subroutine slarrr(N, D, E, INFO)
SLARRR performs tests to decide whether the symmetric tridiagonal matrix T warrants expensive computa...
Definition: slarrr.f:96
subroutine sswap(N, SX, INCX, SY, INCY)
SSWAP
Definition: sswap.f:53
subroutine slae2(A, B, C, RT1, RT2)
SLAE2 computes the eigenvalues of a 2-by-2 symmetric matrix.
Definition: slae2.f:104
subroutine slaev2(A, B, C, RT1, RT2, CS1, SN1)
SLAEV2 computes the eigenvalues and eigenvectors of a 2-by-2 symmetric/Hermitian matrix.
Definition: slaev2.f:122
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
subroutine scopy(N, SX, INCX, SY, INCY)
SCOPY
Definition: scopy.f:53
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55
real function slanst(NORM, N, D, E)
SLANST returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real symmetric tridiagonal matrix.
Definition: slanst.f:102
subroutine slarrv(N, VL, VU, D, L, PIVMIN, ISPLIT, M, DOL, DOU, MINRGP, RTOL1, RTOL2, W, WERR, WGAP, IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ, WORK, IWORK, INFO)
SLARRV computes the eigenvectors of the tridiagonal matrix T = L D LT given L, D and the eigenvalues ...
Definition: slarrv.f:285
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:69
subroutine slarre(RANGE, N, VL, VU, IL, IU, D, E, E2, RTOL1, RTOL2, SPLTOL, NSPLIT, ISPLIT, M, W, WERR, WGAP, IBLOCK, INDEXW, GERS, PIVMIN, WORK, IWORK, INFO)
SLARRE given the tridiagonal matrix T, sets small off-diagonal elements to zero and for each unreduce...
Definition: slarre.f:299
subroutine slarrc(JOBT, N, VL, VU, D, E, PIVMIN, EIGCNT, LCNT, RCNT, INFO)
SLARRC computes the number of eigenvalues of the symmetric tridiagonal matrix.
Definition: slarrc.f:138
subroutine slasrt(ID, N, D, INFO)
SLASRT sorts numbers in increasing or decreasing order.
Definition: slasrt.f:90
subroutine slarrj(N, D, E2, IFIRST, ILAST, RTOL, OFFSET, W, WERR, WORK, IWORK, PIVMIN, SPDIAM, INFO)
SLARRJ performs refinement of the initial estimates of the eigenvalues of the matrix T...
Definition: slarrj.f:170
subroutine sscal(N, SA, SX, INCX)
SSCAL
Definition: sscal.f:55

Here is the call graph for this function:

Here is the caller graph for this function: