LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ sstemr()

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

          If RANGE='V', the lower bound of the interval to
          be searched for eigenvalues. VL < VU.
          Not referenced if RANGE = 'A' or 'I'.
[in]VU
          VU is REAL

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

          If RANGE='I', the index of the
          smallest eigenvalue to be returned.
          1 <= IL <= IU <= N, if N > 0.
          Not referenced if RANGE = 'A' or 'V'.
[in]IU
          IU is INTEGER

          If RANGE='I', the index of the
          largest eigenvalue 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 = .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 = .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.
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 318 of file sstemr.f.

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