231 SUBROUTINE chpgvd( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
232 $ lwork, rwork, lrwork, iwork, liwork, info )
241 INTEGER info, itype, ldz, liwork, lrwork, lwork, n
245 REAL rwork( * ), w( * )
246 COMPLEX ap( * ), bp( * ), work( * ), z( ldz, * )
252 LOGICAL lquery, upper, wantz
254 INTEGER j, liwmin, lrwmin, lwmin, neig
270 wantz =
lsame( jobz,
'V' )
271 upper =
lsame( uplo,
'U' )
272 lquery = ( lwork.EQ.-1 .OR. lrwork.EQ.-1 .OR. liwork.EQ.-1 )
275 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
277 ELSE IF( .NOT.( wantz .OR.
lsame( jobz,
'N' ) ) )
THEN
279 ELSE IF( .NOT.( upper .OR.
lsame( uplo,
'L' ) ) )
THEN
281 ELSE IF( n.LT.0 )
THEN
283 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
295 lrwmin = 1 + 5*n + 2*n**2
307 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
309 ELSE IF( lrwork.LT.lrwmin .AND. .NOT.lquery )
THEN
311 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
317 CALL
xerbla(
'CHPGVD', -info )
319 ELSE IF( lquery )
THEN
330 CALL
cpptrf( uplo, n, bp, info )
338 CALL
chpgst( itype, uplo, n, ap, bp, info )
339 CALL
chpevd( jobz, uplo, n, ap, w, z, ldz, work, lwork, rwork,
340 $ lrwork, iwork, liwork, info )
341 lwmin = max(
REAL( LWMIN ),
REAL( WORK( 1 ) ) )
342 lrwmin = max(
REAL( LRWMIN ),
REAL( RWORK( 1 ) ) )
343 liwmin = max(
REAL( LIWMIN ),
REAL( IWORK( 1 ) ) )
352 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
364 CALL
ctpsv( uplo, trans,
'Non-unit', n, bp, z( 1, j ),
368 ELSE IF( itype.EQ.3 )
THEN
380 CALL
ctpmv( uplo, trans,
'Non-unit', n, bp, z( 1, j ),