237 SUBROUTINE chpevx( JOBZ, RANGE, UPLO, N, AP, VL, VU, IL, IU,
238 $ ABSTOL, M, W, Z, LDZ, WORK, RWORK, IWORK,
246 CHARACTER JOBZ, RANGE, UPLO
247 INTEGER IL, INFO, IU, LDZ, M, N
251 INTEGER IFAIL( * ), IWORK( * )
252 REAL RWORK( * ), W( * )
253 COMPLEX AP( * ), WORK( * ), Z( LDZ, * )
260 PARAMETER ( ZERO = 0.0e0, one = 1.0e0 )
262 parameter( cone = ( 1.0e0, 0.0e0 ) )
265 LOGICAL ALLEIG, INDEIG, TEST, VALEIG, WANTZ
267 INTEGER I, IINFO, IMAX, INDD, INDE, INDEE,
268 $ indisp, indiwk, indrwk, indtau, indwrk, iscale,
269 $ itmp1, j, jj, nsplit
270 REAL ABSTLL, ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN,
271 $ SIGMA, SMLNUM, TMP1, VLL, VUU
276 EXTERNAL lsame, clanhp, slamch
283 INTRINSIC max, min, real, sqrt
289 wantz = lsame( jobz,
'V' )
290 alleig = lsame( range,
'A' )
291 valeig = lsame( range,
'V' )
292 indeig = lsame( range,
'I' )
295 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
297 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
299 ELSE IF( .NOT.( lsame( uplo,
'L' ) .OR. lsame( uplo,
'U' ) ) )
302 ELSE IF( n.LT.0 )
THEN
306 IF( n.GT.0 .AND. vu.LE.vl )
308 ELSE IF( indeig )
THEN
309 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
311 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
317 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
322 CALL xerbla(
'CHPEVX', -info )
333 IF( alleig .OR. indeig )
THEN
335 w( 1 ) = real( ap( 1 ) )
337 IF( vl.LT.real( ap( 1 ) ) .AND. vu.GE.real( ap( 1 ) ) )
THEN
339 w( 1 ) = real( ap( 1 ) )
349 safmin = slamch(
'Safe minimum' )
350 eps = slamch(
'Precision' )
351 smlnum = safmin / eps
352 bignum = one / smlnum
353 rmin = sqrt( smlnum )
354 rmax = min( sqrt( bignum ), one / sqrt( sqrt( safmin ) ) )
367 anrm = clanhp(
'M', uplo, n, ap, rwork )
368 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
371 ELSE IF( anrm.GT.rmax )
THEN
375 IF( iscale.EQ.1 )
THEN
376 CALL csscal( ( n*( n+1 ) ) / 2, sigma, ap, 1 )
378 $ abstll = abstol*sigma
392 CALL chptrd( uplo, n, ap, rwork( indd ), rwork( inde ),
393 $ work( indtau ), iinfo )
401 IF (il.EQ.1 .AND. iu.EQ.n)
THEN
405 IF ((alleig .OR. test) .AND. (abstol.LE.zero))
THEN
406 CALL scopy( n, rwork( indd ), 1, w, 1 )
408 IF( .NOT.wantz )
THEN
409 CALL scopy( n-1, rwork( inde ), 1, rwork( indee ), 1 )
410 CALL ssterf( n, w, rwork( indee ), info )
412 CALL cupgtr( uplo, n, ap, work( indtau ), z, ldz,
413 $ work( indwrk ), iinfo )
414 CALL scopy( n-1, rwork( inde ), 1, rwork( indee ), 1 )
415 CALL csteqr( jobz, n, w, rwork( indee ), z, ldz,
416 $ rwork( indrwk ), info )
439 CALL sstebz( range, order, n, vll, vuu, il, iu, abstll,
440 $ rwork( indd ), rwork( inde ), m, nsplit, w,
441 $ iwork( 1 ), iwork( indisp ), rwork( indrwk ),
442 $ iwork( indiwk ), info )
445 CALL cstein( n, rwork( indd ), rwork( inde ), m, w,
446 $ iwork( 1 ), iwork( indisp ), z, ldz,
447 $ rwork( indrwk ), iwork( indiwk ), ifail, info )
453 CALL cupmtr(
'L', uplo,
'N', n, m, ap, work( indtau ), z, ldz,
454 $ work( indwrk ), iinfo )
460 IF( iscale.EQ.1 )
THEN
466 CALL sscal( imax, one / sigma, w, 1 )
477 IF( w( jj ).LT.tmp1 )
THEN
484 itmp1 = iwork( 1 + i-1 )
486 iwork( 1 + i-1 ) = iwork( 1 + j-1 )
488 iwork( 1 + j-1 ) = itmp1
489 CALL cswap( n, z( 1, i ), 1, z( 1, j ), 1 )
492 ifail( i ) = ifail( j )
subroutine xerbla(srname, info)
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine chpevx(jobz, range, uplo, n, ap, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
CHPEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine chptrd(uplo, n, ap, d, e, tau, info)
CHPTRD
subroutine csscal(n, sa, cx, incx)
CSSCAL
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 cstein(n, d, e, m, w, iblock, isplit, z, ldz, work, iwork, ifail, info)
CSTEIN
subroutine csteqr(compz, n, d, e, z, ldz, work, info)
CSTEQR
subroutine ssterf(n, d, e, info)
SSTERF
subroutine cswap(n, cx, incx, cy, incy)
CSWAP
subroutine cupgtr(uplo, n, ap, tau, q, ldq, work, info)
CUPGTR
subroutine cupmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info)
CUPMTR