295 SUBROUTINE chbgvx( JOBZ, RANGE, UPLO, N, KA, KB, AB, LDAB, BB,
296 $ LDBB, Q, LDQ, VL, VU, IL, IU, ABSTOL, M, W, Z,
297 $ LDZ, WORK, RWORK, IWORK, IFAIL, INFO )
304 CHARACTER JOBZ, RANGE, UPLO
305 INTEGER IL, INFO, IU, KA, KB, LDAB, LDBB, LDQ, LDZ, M,
310 INTEGER IFAIL( * ), IWORK( * )
311 REAL RWORK( * ), W( * )
312 COMPLEX AB( LDAB, * ), BB( LDBB, * ), Q( LDQ, * ),
313 $ work( * ), z( ldz, * )
320 PARAMETER ( ZERO = 0.0e+0 )
322 parameter( czero = ( 0.0e+0, 0.0e+0 ),
323 $ cone = ( 1.0e+0, 0.0e+0 ) )
326 LOGICAL ALLEIG, INDEIG, TEST, UPPER, VALEIG, WANTZ
327 CHARACTER ORDER, VECT
328 INTEGER I, IINFO, INDD, INDE, INDEE, INDISP,
329 $ indiwk, indrwk, indwrk, itmp1, j, jj, nsplit
349 wantz = lsame( jobz,
'V' )
350 upper = lsame( uplo,
'U' )
351 alleig = lsame( range,
'A' )
352 valeig = lsame( range,
'V' )
353 indeig = lsame( range,
'I' )
356 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
358 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
360 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
362 ELSE IF( n.LT.0 )
THEN
364 ELSE IF( ka.LT.0 )
THEN
366 ELSE IF( kb.LT.0 .OR. kb.GT.ka )
THEN
368 ELSE IF( ldab.LT.ka+1 )
THEN
370 ELSE IF( ldbb.LT.kb+1 )
THEN
372 ELSE IF( ldq.LT.1 .OR. ( wantz .AND. ldq.LT.n ) )
THEN
376 IF( n.GT.0 .AND. vu.LE.vl )
378 ELSE IF( indeig )
THEN
379 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
381 ELSE IF ( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
387 IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
393 CALL xerbla(
'CHBGVX', -info )
405 CALL cpbstf( uplo, n, kb, bb, ldbb, info )
413 CALL chbgst( jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, q, ldq,
414 $ work, rwork, iinfo )
428 CALL chbtrd( vect, uplo, n, ka, ab, ldab, rwork( indd ),
429 $ rwork( inde ), q, ldq, work( indwrk ), iinfo )
437 IF( il.EQ.1 .AND. iu.EQ.n )
THEN
441 IF( ( alleig .OR. test ) .AND. ( abstol.LE.zero ) )
THEN
442 CALL scopy( n, rwork( indd ), 1, w, 1 )
444 CALL scopy( n-1, rwork( inde ), 1, rwork( indee ), 1 )
445 IF( .NOT.wantz )
THEN
446 CALL ssterf( n, w, rwork( indee ), info )
448 CALL clacpy(
'A', n, n, q, ldq, z, ldz )
449 CALL csteqr( jobz, n, w, rwork( indee ), z, ldz,
450 $ rwork( indrwk ), info )
474 CALL sstebz( range, order, n, vl, vu, il, iu, abstol,
475 $ rwork( indd ), rwork( inde ), m, nsplit, w,
476 $ iwork( 1 ), iwork( indisp ), rwork( indrwk ),
477 $ iwork( indiwk ), info )
480 CALL cstein( n, rwork( indd ), rwork( inde ), m, w,
481 $ iwork( 1 ), iwork( indisp ), z, ldz,
482 $ rwork( indrwk ), iwork( indiwk ), ifail, info )
488 CALL ccopy( n, z( 1, j ), 1, work( 1 ), 1 )
489 CALL cgemv(
'N', n, n, cone, q, ldq, work, 1, czero,
504 IF( w( jj ).LT.tmp1 )
THEN
511 itmp1 = iwork( 1 + i-1 )
513 iwork( 1 + i-1 ) = iwork( 1 + j-1 )
515 iwork( 1 + j-1 ) = itmp1
516 CALL cswap( n, z( 1, i ), 1, z( 1, j ), 1 )
519 ifail( i ) = ifail( j )
subroutine chbgvx(jobz, range, uplo, n, ka, kb, ab, ldab, bb, ldbb, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)
CHBGVX