251 SUBROUTINE zhbgvd( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
252 $ z, ldz, work, lwork, rwork, lrwork, iwork,
262 INTEGER INFO, KA, KB, LDAB, LDBB, LDZ, LIWORK, LRWORK,
267 DOUBLE PRECISION RWORK( * ), W( * )
268 COMPLEX*16 AB( ldab, * ), BB( ldbb, * ), WORK( * ),
275 COMPLEX*16 CONE, CZERO
276 parameter ( cone = ( 1.0d+0, 0.0d+0 ),
277 $ czero = ( 0.0d+0, 0.0d+0 ) )
280 LOGICAL LQUERY, UPPER, WANTZ
282 INTEGER IINFO, INDE, INDWK2, INDWRK, LIWMIN, LLRWK,
283 $ llwk2, lrwmin, lwmin
297 wantz = lsame( jobz,
'V' )
298 upper = lsame( uplo,
'U' )
299 lquery = ( lwork.EQ.-1 .OR. lrwork.EQ.-1 .OR. liwork.EQ.-1 )
306 ELSE IF( wantz )
THEN
308 lrwmin = 1 + 5*n + 2*n**2
315 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
317 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
319 ELSE IF( n.LT.0 )
THEN
321 ELSE IF( ka.LT.0 )
THEN
323 ELSE IF( kb.LT.0 .OR. kb.GT.ka )
THEN
325 ELSE IF( ldab.LT.ka+1 )
THEN
327 ELSE IF( ldbb.LT.kb+1 )
THEN
329 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
338 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
340 ELSE IF( lrwork.LT.lrwmin .AND. .NOT.lquery )
THEN
342 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
348 CALL xerbla(
'ZHBGVD', -info )
350 ELSE IF( lquery )
THEN
361 CALL zpbstf( uplo, n, kb, bb, ldbb, info )
372 llwk2 = lwork - indwk2 + 2
373 llrwk = lrwork - indwrk + 2
374 CALL zhbgst( jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, z, ldz,
375 $ work, rwork, iinfo )
384 CALL zhbtrd( vect, uplo, n, ka, ab, ldab, w, rwork( inde ), z,
389 IF( .NOT.wantz )
THEN
390 CALL dsterf( n, w, rwork( inde ), info )
392 CALL zstedc(
'I', n, w, rwork( inde ), work, n, work( indwk2 ),
393 $ llwk2, rwork( indwrk ), llrwk, iwork, liwork,
395 CALL zgemm(
'N',
'N', n, n, n, cone, z, ldz, work, n, czero,
396 $ work( indwk2 ), n )
397 CALL zlacpy(
'A', n, n, work( indwk2 ), n, z, ldz )
subroutine dsterf(N, D, E, INFO)
DSTERF
subroutine zlacpy(UPLO, M, N, A, LDA, B, LDB)
ZLACPY copies all or part of one two-dimensional array to another.
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 xerbla(SRNAME, INFO)
XERBLA
subroutine zstedc(COMPZ, N, D, E, Z, LDZ, WORK, LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO)
ZSTEDC
subroutine zpbstf(UPLO, N, KD, AB, LDAB, INFO)
ZPBSTF
subroutine zhbtrd(VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ, WORK, INFO)
ZHBTRD