219 SUBROUTINE dsbgvd( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W,
220 $ Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO )
228 INTEGER INFO, KA, KB, LDAB, LDBB, LDZ, LIWORK, LWORK, N
232 DOUBLE PRECISION AB( LDAB, * ), BB( LDBB, * ), W( * ),
233 $ work( * ), z( ldz, * )
239 DOUBLE PRECISION ONE, ZERO
240 parameter( one = 1.0d+0, zero = 0.0d+0 )
243 LOGICAL LQUERY, UPPER, WANTZ
245 INTEGER IINFO, INDE, INDWK2, INDWRK, LIWMIN, LLWRK2,
260 wantz = lsame( jobz,
'V' )
261 upper = lsame( uplo,
'U' )
262 lquery = ( lwork.EQ.-1 .OR. liwork.EQ.-1 )
268 ELSE IF( wantz )
THEN
270 lwmin = 1 + 5*n + 2*n**2
276 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
278 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
280 ELSE IF( n.LT.0 )
THEN
282 ELSE IF( ka.LT.0 )
THEN
284 ELSE IF( kb.LT.0 .OR. kb.GT.ka )
THEN
286 ELSE IF( ldab.LT.ka+1 )
THEN
288 ELSE IF( ldbb.LT.kb+1 )
THEN
290 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
298 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
300 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
306 CALL xerbla(
'DSBGVD', -info )
308 ELSE IF( lquery )
THEN
319 CALL dpbstf( uplo, n, kb, bb, ldbb, info )
329 indwk2 = indwrk + n*n
330 llwrk2 = lwork - indwk2 + 1
331 CALL dsbgst( jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, z, ldz,
341 CALL dsbtrd( vect, uplo, n, ka, ab, ldab, w, work( inde ), z, ldz,
342 $ work( indwrk ), iinfo )
346 IF( .NOT.wantz )
THEN
347 CALL dsterf( n, w, work( inde ), info )
349 CALL dstedc(
'I', n, w, work( inde ), work( indwrk ), n,
350 $ work( indwk2 ), llwrk2, iwork, liwork, info )
351 CALL dgemm(
'N',
'N', n, n, n, one, z, ldz, work( indwrk ), n,
352 $ zero, work( indwk2 ), n )
353 CALL dlacpy(
'A', n, n, work( indwk2 ), n, z, ldz )
subroutine xerbla(srname, info)
subroutine dgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
DGEMM
subroutine dsbgst(vect, uplo, n, ka, kb, ab, ldab, bb, ldbb, x, ldx, work, info)
DSBGST
subroutine dsbgvd(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, lwork, iwork, liwork, info)
DSBGVD
subroutine dsbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
DSBTRD
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dpbstf(uplo, n, kd, ab, ldab, info)
DPBSTF
subroutine dstedc(compz, n, d, e, z, ldz, work, lwork, iwork, liwork, info)
DSTEDC
subroutine dsterf(n, d, e, info)
DSTERF