303 SUBROUTINE sstevr( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
304 $ M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
312 CHARACTER JOBZ, RANGE
313 INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
317 INTEGER ISUPPZ( * ), IWORK( * )
318 REAL D( * ), E( * ), W( * ), WORK( * ), Z( LDZ, * )
325 PARAMETER ( ZERO = 0.0e+0, one = 1.0e+0, two = 2.0e+0 )
328 LOGICAL ALLEIG, INDEIG, TEST, LQUERY, VALEIG, WANTZ,
331 INTEGER I, IEEEOK, IMAX, INDIBL, INDIFL, INDISP,
332 $ indiwo, iscale, j, jj, liwmin, lwmin, nsplit
333 REAL BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA, SMLNUM,
334 $ TMP1, TNRM, VLL, VUU
339 REAL SLAMCH, SLANST, SROUNDUP_LWORK
340 EXTERNAL lsame, ilaenv, slamch, slanst, sroundup_lwork
347 INTRINSIC max, min, sqrt
354 ieeeok = ilaenv( 10,
'SSTEVR',
'N', 1, 2, 3, 4 )
356 wantz = lsame( jobz,
'V' )
357 alleig = lsame( range,
'A' )
358 valeig = lsame( range,
'V' )
359 indeig = lsame( range,
'I' )
361 lquery = ( ( lwork.EQ.-1 ) .OR. ( liwork.EQ.-1 ) )
362 lwmin = max( 1, 20*n )
363 liwmin = max(1, 10*n )
367 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
369 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
371 ELSE IF( n.LT.0 )
THEN
375 IF( n.GT.0 .AND. vu.LE.vl )
377 ELSE IF( indeig )
THEN
378 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
380 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
386 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
392 work( 1 ) = sroundup_lwork(lwmin)
395 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
397 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
403 CALL xerbla(
'SSTEVR', -info )
405 ELSE IF( lquery )
THEN
416 IF( alleig .OR. indeig )
THEN
420 IF( vl.LT.d( 1 ) .AND. vu.GE.d( 1 ) )
THEN
432 safmin = slamch(
'Safe minimum' )
433 eps = slamch(
'Precision' )
434 smlnum = safmin / eps
435 bignum = one / smlnum
436 rmin = sqrt( smlnum )
437 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
448 tnrm = slanst(
'M', n, d, e )
449 IF( tnrm.GT.zero .AND. tnrm.LT.rmin )
THEN
452 ELSE IF( tnrm.GT.rmax )
THEN
456 IF( iscale.EQ.1 )
THEN
457 CALL sscal( n, sigma, d, 1 )
458 CALL sscal( n-1, sigma, e( 1 ), 1 )
489 IF( il.EQ.1 .AND. iu.EQ.n )
THEN
493 IF( ( alleig .OR. test ) .AND. ieeeok.EQ.1 )
THEN
494 CALL scopy( n-1, e( 1 ), 1, work( 1 ), 1 )
495 IF( .NOT.wantz )
THEN
496 CALL scopy( n, d, 1, w, 1 )
497 CALL ssterf( n, w, work, info )
499 CALL scopy( n, d, 1, work( n+1 ), 1 )
500 IF (abstol .LE. two*n*eps)
THEN
505 CALL sstemr( jobz,
'A', n, work( n+1 ), work, vl, vu, il,
506 $ iu, m, w, z, ldz, n, isuppz, tryrac,
507 $ work( 2*n+1 ), lwork-2*n, iwork, liwork, info )
525 CALL sstebz( range, order, n, vll, vuu, il, iu, abstol, d, e, m,
526 $ nsplit, w, iwork( indibl ), iwork( indisp ), work,
527 $ iwork( indiwo ), info )
530 CALL sstein( n, d, e, m, w, iwork( indibl ), iwork( indisp ),
531 $ z, ldz, work, iwork( indiwo ), iwork( indifl ),
538 IF( iscale.EQ.1 )
THEN
544 CALL sscal( imax, one / sigma, w, 1 )
555 IF( w( jj ).LT.tmp1 )
THEN
564 CALL sswap( n, z( 1, i ), 1, z( 1, j ), 1 )
573 work( 1 ) = sroundup_lwork(lwmin)
subroutine xerbla(srname, info)
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
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 sstevr(jobz, range, n, d, e, vl, vu, il, iu, abstol, m, w, z, ldz, isuppz, work, lwork, iwork, liwork, info)
SSTEVR computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine sswap(n, sx, incx, sy, incy)
SSWAP