251 SUBROUTINE chbgvd( 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 REAL RWORK( * ), W( * )
268 COMPLEX AB( ldab, * ), BB( ldbb, * ), WORK( * ),
276 parameter ( cone = ( 1.0e+0, 0.0e+0 ),
277 $ czero = ( 0.0e+0, 0.0e+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(
'CHBGVD', -info )
350 ELSE IF( lquery )
THEN
361 CALL cpbstf( uplo, n, kb, bb, ldbb, info )
372 llwk2 = lwork - indwk2 + 2
373 llrwk = lrwork - indwrk + 2
374 CALL chbgst( jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, z, ldz,
375 $ work, rwork, iinfo )
384 CALL chbtrd( vect, uplo, n, ka, ab, ldab, w, rwork( inde ), z,
389 IF( .NOT.wantz )
THEN
390 CALL ssterf( n, w, rwork( inde ), info )
392 CALL cstedc(
'I', n, w, rwork( inde ), work, n, work( indwk2 ),
393 $ llwk2, rwork( indwrk ), llrwk, iwork, liwork,
395 CALL cgemm(
'N',
'N', n, n, n, cone, z, ldz, work, n, czero,
396 $ work( indwk2 ), n )
397 CALL clacpy(
'A', n, n, work( indwk2 ), n, z, ldz )
subroutine cpbstf(UPLO, N, KD, AB, LDAB, INFO)
CPBSTF
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine chbtrd(VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ, WORK, INFO)
CHBTRD
subroutine chbgst(VECT, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, X, LDX, WORK, RWORK, INFO)
CHBGST
subroutine cstedc(COMPZ, N, D, E, Z, LDZ, WORK, LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO)
CSTEDC
subroutine clacpy(UPLO, M, N, A, LDA, B, LDB)
CLACPY copies all or part of one two-dimensional array to another.
subroutine ssterf(N, D, E, INFO)
SSTERF
subroutine chbgvd(JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z, LDZ, WORK, LWORK, RWORK, LRWORK, IWORK, LIWORK, INFO)
CHBGVD
subroutine cgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
CGEMM