219 SUBROUTINE ssbgvd( 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 REAL AB( LDAB, * ), BB( LDBB, * ), W( * ),
233 $ work( * ), z( ldz, * )
240 parameter( one = 1.0e+0, zero = 0.0e+0 )
243 LOGICAL LQUERY, UPPER, WANTZ
245 INTEGER IINFO, INDE, INDWK2, INDWRK, LIWMIN, LLWRK2,
251 EXTERNAL lsame, sroundup_lwork
261 wantz = lsame( jobz,
'V' )
262 upper = lsame( uplo,
'U' )
263 lquery = ( lwork.EQ.-1 .OR. liwork.EQ.-1 )
269 ELSE IF( wantz )
THEN
271 lwmin = 1 + 5*n + 2*n**2
277 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
279 ELSE IF( .NOT.( upper .OR. lsame( uplo,
'L' ) ) )
THEN
281 ELSE IF( n.LT.0 )
THEN
283 ELSE IF( ka.LT.0 )
THEN
285 ELSE IF( kb.LT.0 .OR. kb.GT.ka )
THEN
287 ELSE IF( ldab.LT.ka+1 )
THEN
289 ELSE IF( ldbb.LT.kb+1 )
THEN
291 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
296 work( 1 ) = sroundup_lwork(lwmin)
299 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
301 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
307 CALL xerbla(
'SSBGVD', -info )
309 ELSE IF( lquery )
THEN
320 CALL spbstf( uplo, n, kb, bb, ldbb, info )
330 indwk2 = indwrk + n*n
331 llwrk2 = lwork - indwk2 + 1
332 CALL ssbgst( jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, z, ldz,
342 CALL ssbtrd( vect, uplo, n, ka, ab, ldab, w, work( inde ), z, ldz,
343 $ work( indwrk ), iinfo )
347 IF( .NOT.wantz )
THEN
348 CALL ssterf( n, w, work( inde ), info )
350 CALL sstedc(
'I', n, w, work( inde ), work( indwrk ), n,
351 $ work( indwk2 ), llwrk2, iwork, liwork, info )
352 CALL sgemm(
'N',
'N', n, n, n, one, z, ldz, work( indwrk ), n,
353 $ zero, work( indwk2 ), n )
354 CALL slacpy(
'A', n, n, work( indwk2 ), n, z, ldz )
357 work( 1 ) = sroundup_lwork(lwmin)
subroutine xerbla(srname, info)
subroutine sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc)
SGEMM
subroutine ssbgst(vect, uplo, n, ka, kb, ab, ldab, bb, ldbb, x, ldx, work, info)
SSBGST
subroutine ssbgvd(jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, w, z, ldz, work, lwork, iwork, liwork, info)
SSBGVD
subroutine ssbtrd(vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
SSBTRD
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
subroutine spbstf(uplo, n, kd, ab, ldab, info)
SPBSTF
subroutine sstedc(compz, n, d, e, z, ldz, work, lwork, iwork, liwork, info)
SSTEDC
subroutine ssterf(n, d, e, info)
SSTERF