231 SUBROUTINE zhpgvd( 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 DOUBLE PRECISION rwork( * ), w( * )
246 COMPLEX*16 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(
'ZHPGVD', -info )
319 ELSE IF( lquery )
THEN
330 CALL
zpptrf( uplo, n, bp, info )
338 CALL
zhpgst( itype, uplo, n, ap, bp, info )
339 CALL
zhpevd( jobz, uplo, n, ap, w, z, ldz, work, lwork, rwork,
340 $ lrwork, iwork, liwork, info )
341 lwmin = max( dble( lwmin ), dble( work( 1 ) ) )
342 lrwmin = max( dble( lrwmin ), dble( rwork( 1 ) ) )
343 liwmin = max( dble( liwmin ), dble( iwork( 1 ) ) )
352 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
364 CALL
ztpsv( uplo, trans,
'Non-unit', n, bp, z( 1, j ),
368 ELSE IF( itype.EQ.3 )
THEN
380 CALL
ztpmv( uplo, trans,
'Non-unit', n, bp, z( 1, j ),