223 SUBROUTINE chpgvd( ITYPE, JOBZ, UPLO, N, AP, BP, W, Z, LDZ, WORK,
224 $ LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO )
232 INTEGER INFO, ITYPE, LDZ, LIWORK, LRWORK, LWORK, N
236 REAL RWORK( * ), W( * )
237 COMPLEX AP( * ), BP( * ), WORK( * ), Z( LDZ, * )
243 LOGICAL LQUERY, UPPER, WANTZ
245 INTEGER J, LIWMIN, LRWMIN, LWMIN, NEIG
250 EXTERNAL lsame, sroundup_lwork
262 wantz = lsame( jobz,
'V' )
263 upper = lsame( uplo,
'U' )
264 lquery = ( lwork.EQ.-1 .OR. lrwork.EQ.-1 .OR. liwork.EQ.-1 )
267 IF( itype.LT.1 .OR. itype.GT.3 )
THEN
269 ELSE IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
271 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
273 ELSE IF( n.LT.0 )
THEN
275 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
287 lrwmin = 1 + 5*n + 2*n**2
296 work( 1 ) = sroundup_lwork(lwmin)
299 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
301 ELSE IF( lrwork.LT.lrwmin .AND. .NOT.lquery )
THEN
303 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
309 CALL xerbla(
'CHPGVD', -info )
311 ELSE IF( lquery )
THEN
322 CALL cpptrf( uplo, n, bp, info )
330 CALL chpgst( itype, uplo, n, ap, bp, info )
331 CALL chpevd( jobz, uplo, n, ap, w, z, ldz, work, lwork, rwork,
332 $ lrwork, iwork, liwork, info )
333 lwmin = int( max( real( lwmin ), real( work( 1 ) ) ) )
334 lrwmin = int( max( real( lrwmin ), real( rwork( 1 ) ) ) )
335 liwmin = int( max( real( liwmin ), real( iwork( 1 ) ) ) )
344 IF( itype.EQ.1 .OR. itype.EQ.2 )
THEN
356 CALL ctpsv( uplo, trans,
'Non-unit', n, bp, z( 1, j ),
360 ELSE IF( itype.EQ.3 )
THEN
372 CALL ctpmv( uplo, trans,
'Non-unit', n, bp, z( 1, j ),
378 work( 1 ) = sroundup_lwork(lwmin)
subroutine xerbla(srname, info)
subroutine chpevd(jobz, uplo, n, ap, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
CHPEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine chpgst(itype, uplo, n, ap, bp, info)
CHPGST
subroutine chpgvd(itype, jobz, uplo, n, ap, bp, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
CHPGVD
subroutine cpptrf(uplo, n, ap, info)
CPPTRF
subroutine ctpmv(uplo, trans, diag, n, ap, x, incx)
CTPMV
subroutine ctpsv(uplo, trans, diag, n, ap, x, incx)
CTPSV