243 SUBROUTINE zhbgvd( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
244 $ Z, LDZ, WORK, LWORK, RWORK, LRWORK, IWORK,
253 INTEGER INFO, KA, KB, LDAB, LDBB, LDZ, LIWORK, LRWORK,
258 DOUBLE PRECISION RWORK( * ), W( * )
259 COMPLEX*16 AB( LDAB, * ), BB( LDBB, * ), WORK( * ),
266 COMPLEX*16 CONE, CZERO
267 PARAMETER ( CONE = ( 1.0d+0, 0.0d+0 ),
268 $ czero = ( 0.0d+0, 0.0d+0 ) )
271 LOGICAL LQUERY, UPPER, WANTZ
273 INTEGER IINFO, INDE, INDWK2, INDWRK, LIWMIN, LLRWK,
274 $ llwk2, lrwmin, lwmin
288 wantz = lsame( jobz,
'V' )
289 upper = lsame( uplo,
'U' )
290 lquery = ( lwork.EQ.-1 .OR. lrwork.EQ.-1 .OR. liwork.EQ.-1 )
297 ELSE IF( wantz )
THEN
299 lrwmin = 1 + 5*n + 2*n**2
306 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
308 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
310 ELSE IF( n.LT.0 )
THEN
312 ELSE IF( ka.LT.0 )
THEN
314 ELSE IF( kb.LT.0 .OR. kb.GT.ka )
THEN
316 ELSE IF( ldab.LT.ka+1 )
THEN
318 ELSE IF( ldbb.LT.kb+1 )
THEN
320 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
329 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
331 ELSE IF( lrwork.LT.lrwmin .AND. .NOT.lquery )
THEN
333 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
339 CALL xerbla(
'ZHBGVD', -info )
341 ELSE IF( lquery )
THEN
352 CALL zpbstf( uplo, n, kb, bb, ldbb, info )
363 llwk2 = lwork - indwk2 + 2
364 llrwk = lrwork - indwrk + 2
365 CALL zhbgst( jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, z, ldz,
366 $ work, rwork, iinfo )
375 CALL zhbtrd( vect, uplo, n, ka, ab, ldab, w, rwork( inde ), z,
380 IF( .NOT.wantz )
THEN
381 CALL dsterf( n, w, rwork( inde ), info )
383 CALL zstedc(
'I', n, w, rwork( inde ), work, n, work( indwk2 ),
384 $ llwk2, rwork( indwrk ), llrwk, iwork, liwork,
386 CALL zgemm(
'N',
'N', n, n, n, cone, z, ldz, work, n, czero,
387 $ work( indwk2 ), n )
388 CALL zlacpy(
'A', n, n, work( indwk2 ), n, z, ldz )
subroutine xerbla(srname, info)
subroutine zgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
ZGEMM
subroutine zhbgst(vect, uplo, n, ka, kb, ab, ldab, bb, ldbb, x, ldx, work, rwork, info)
ZHBGST
subroutine zhbgvd(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
ZHBGVD
subroutine zhbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
ZHBTRD
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zpbstf(uplo, n, kd, ab, ldab, info)
ZPBSTF
subroutine zstedc(compz, n, d, e, z, ldz, work, lwork, rwork, lrwork, iwork, liwork, info)
ZSTEDC
subroutine dsterf(n, d, e, info)
DSTERF