227 SUBROUTINE dsbgvd( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
228 $ z, ldz, work, lwork, iwork, liwork, info )
237 INTEGER INFO, KA, KB, LDAB, LDBB, LDZ, LIWORK, LWORK, N
241 DOUBLE PRECISION AB( ldab, * ), BB( ldbb, * ), W( * ),
242 $ work( * ), z( ldz, * )
248 DOUBLE PRECISION ONE, ZERO
249 parameter ( one = 1.0d+0, zero = 0.0d+0 )
252 LOGICAL LQUERY, UPPER, WANTZ
254 INTEGER IINFO, INDE, INDWK2, INDWRK, LIWMIN, LLWRK2,
269 wantz = lsame( jobz,
'V' )
270 upper = lsame( uplo,
'U' )
271 lquery = ( lwork.EQ.-1 .OR. liwork.EQ.-1 )
277 ELSE IF( wantz )
THEN
279 lwmin = 1 + 5*n + 2*n**2
285 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
287 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
289 ELSE IF( n.LT.0 )
THEN
291 ELSE IF( ka.LT.0 )
THEN
293 ELSE IF( kb.LT.0 .OR. kb.GT.ka )
THEN
295 ELSE IF( ldab.LT.ka+1 )
THEN
297 ELSE IF( ldbb.LT.kb+1 )
THEN
299 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
307 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
309 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
315 CALL xerbla(
'DSBGVD', -info )
317 ELSE IF( lquery )
THEN
328 CALL dpbstf( uplo, n, kb, bb, ldbb, info )
338 indwk2 = indwrk + n*n
339 llwrk2 = lwork - indwk2 + 1
340 CALL dsbgst( jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, z, ldz,
350 CALL dsbtrd( vect, uplo, n, ka, ab, ldab, w, work( inde ), z, ldz,
351 $ work( indwrk ), iinfo )
355 IF( .NOT.wantz )
THEN
356 CALL dsterf( n, w, work( inde ), info )
358 CALL dstedc(
'I', n, w, work( inde ), work( indwrk ), n,
359 $ work( indwk2 ), llwrk2, iwork, liwork, info )
360 CALL dgemm(
'N',
'N', n, n, n, one, z, ldz, work( indwrk ), n,
361 $ zero, work( indwk2 ), n )
362 CALL dlacpy(
'A', n, n, work( indwk2 ), n, z, ldz )
subroutine dsterf(N, D, E, INFO)
DSTERF
subroutine dsbtrd(VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ, WORK, INFO)
DSBTRD
subroutine dpbstf(UPLO, N, KD, AB, LDAB, INFO)
DPBSTF
subroutine dlacpy(UPLO, M, N, A, LDA, B, LDB)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dgemm(TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, BETA, C, LDC)
DGEMM
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dstedc(COMPZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSTEDC
subroutine dsbgvd(JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)
DSBGVD
subroutine dsbgst(VECT, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, X, LDX, WORK, INFO)
DSBGST