210 SUBROUTINE sspgvd( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
211 $ lwork, iwork, liwork, info )
220 INTEGER info, itype, ldz, liwork, lwork, n
224 REAL ap( * ), bp( * ), w( * ), work( * ),
231 LOGICAL lquery, upper, wantz
233 INTEGER j, liwmin, lwmin, neig
249 wantz =
lsame( jobz,
'V' )
250 upper =
lsame( uplo,
'U' )
251 lquery = ( lwork.EQ.-1 .OR. liwork.EQ.-1 )
254 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
256 ELSE IF( .NOT.( wantz .OR.
lsame( jobz,
'N' ) ) )
THEN
258 ELSE IF( .NOT.( upper .OR.
lsame( uplo,
'L' ) ) )
THEN
260 ELSE IF( n.LT.0 )
THEN
262 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
273 lwmin = 1 + 6*n + 2*n**2
281 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
283 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
289 CALL
xerbla(
'SSPGVD', -info )
291 ELSE IF( lquery )
THEN
302 CALL
spptrf( uplo, n, bp, info )
310 CALL
sspgst( itype, uplo, n, ap, bp, info )
311 CALL
sspevd( jobz, uplo, n, ap, w, z, ldz, work, lwork, iwork,
313 lwmin = max(
REAL( LWMIN ),
REAL( WORK( 1 ) ) )
314 liwmin = max(
REAL( LIWMIN ),
REAL( IWORK( 1 ) ) )
323 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
335 CALL
stpsv( uplo, trans,
'Non-unit', n, bp, z( 1, j ),
339 ELSE IF( itype.EQ.3 )
THEN
351 CALL
stpmv( uplo, trans,
'Non-unit', n, bp, z( 1, j ),