289 SUBROUTINE ssygvx( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB,
290 $ vl, vu, il, iu, abstol, m, w, z, ldz, work,
291 $ lwork, iwork, ifail, info )
299 CHARACTER jobz, range, uplo
300 INTEGER il, info, itype, iu, lda, ldb, ldz, lwork, m, n
304 INTEGER ifail( * ), iwork( * )
305 REAL a( lda, * ), b( ldb, * ), w( * ), work( * ),
313 parameter( one = 1.0e+0 )
316 LOGICAL alleig, indeig, lquery, upper, valeig, wantz
318 INTEGER lwkmin, lwkopt, nb
335 upper =
lsame( uplo,
'U' )
336 wantz =
lsame( jobz,
'V' )
337 alleig =
lsame( range,
'A' )
338 valeig =
lsame( range,
'V' )
339 indeig =
lsame( range,
'I' )
340 lquery = ( lwork.EQ.-1 )
343 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
345 ELSE IF( .NOT.( wantz .OR.
lsame( jobz,
'N' ) ) )
THEN
347 ELSE IF( .NOT.( alleig .OR. valeig .OR. indeig ) )
THEN
349 ELSE IF( .NOT.( upper .OR.
lsame( uplo,
'L' ) ) )
THEN
351 ELSE IF( n.LT.0 )
THEN
353 ELSE IF( lda.LT.max( 1, n ) )
THEN
355 ELSE IF( ldb.LT.max( 1, n ) )
THEN
359 IF( n.GT.0 .AND. vu.LE.vl )
361 ELSE IF( indeig )
THEN
362 IF( il.LT.1 .OR. il.GT.max( 1, n ) )
THEN
364 ELSE IF( iu.LT.min( n, il ) .OR. iu.GT.n )
THEN
370 IF (ldz.LT.1 .OR. (wantz .AND. ldz.LT.n))
THEN
376 lwkmin = max( 1, 8*n )
377 nb =
ilaenv( 1,
'SSYTRD', uplo, n, -1, -1, -1 )
378 lwkopt = max( lwkmin, ( nb + 3 )*n )
381 IF( lwork.LT.lwkmin .AND. .NOT.lquery )
THEN
387 CALL
xerbla(
'SSYGVX', -info )
389 ELSE IF( lquery )
THEN
402 CALL
spotrf( uplo, n, b, ldb, info )
410 CALL
ssygst( itype, uplo, n, a, lda, b, ldb, info )
411 CALL
ssyevx( jobz, range, uplo, n, a, lda, vl, vu, il, iu, abstol,
412 $ m, w, z, ldz, work, lwork, iwork, ifail, info )
420 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
431 CALL
strsm(
'Left', uplo, trans,
'Non-unit', n, m, one, b,
434 ELSE IF( itype.EQ.3 )
THEN
445 CALL
strmm(
'Left', uplo, trans,
'Non-unit', n, m, one, b,