217 SUBROUTINE dsbgvd( JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB,
219 $ Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO )
227 INTEGER INFO, KA, KB, LDAB, LDBB, LDZ, LIWORK, LWORK, N
231 DOUBLE PRECISION AB( LDAB, * ), BB( LDBB, * ), W( * ),
232 $ work( * ), z( ldz, * )
238 DOUBLE PRECISION ONE, ZERO
239 PARAMETER ( ONE = 1.0d+0, zero = 0.0d+0 )
242 LOGICAL LQUERY, UPPER, WANTZ
244 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,
343 $ work( indwrk ), iinfo )
347 IF( .NOT.wantz )
THEN
348 CALL dsterf( n, w, work( inde ), info )
350 CALL dstedc(
'I', n, w, work( inde ), work( indwrk ), n,
351 $ work( indwk2 ), llwrk2, iwork, liwork, info )
352 CALL dgemm(
'N',
'N', n, n, n, one, z, ldz, work( indwrk ),
354 $ zero, work( indwk2 ), n )
355 CALL dlacpy(
'A', n, n, work( indwk2 ), n, z, ldz )
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