227 SUBROUTINE ssbgvd( 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 REAL AB( ldab, * ), BB( ldbb, * ), W( * ),
242 $ work( * ), z( ldz, * )
249 parameter ( one = 1.0e+0, zero = 0.0e+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(
'SSBGVD', -info )
317 ELSE IF( lquery )
THEN
328 CALL spbstf( uplo, n, kb, bb, ldbb, info )
338 indwk2 = indwrk + n*n
339 llwrk2 = lwork - indwk2 + 1
340 CALL ssbgst( jobz, uplo, n, ka, kb, ab, ldab, bb, ldbb, z, ldz,
350 CALL ssbtrd( vect, uplo, n, ka, ab, ldab, w, work( inde ), z, ldz,
351 $ work( indwrk ), iinfo )
355 IF( .NOT.wantz )
THEN
356 CALL ssterf( n, w, work( inde ), info )
358 CALL sstedc(
'I', n, w, work( inde ), work( indwrk ), n,
359 $ work( indwk2 ), llwrk2, iwork, liwork, info )
360 CALL sgemm(
'N',
'N', n, n, n, one, z, ldz, work( indwrk ), n,
361 $ zero, work( indwk2 ), n )
362 CALL slacpy(
'A', n, n, work( indwk2 ), n, z, ldz )
subroutine spbstf(UPLO, N, KD, AB, LDAB, INFO)
SPBSTF
subroutine ssbgvd(JOBZ, UPLO, N, KA, KB, AB, LDAB, BB, LDBB, W, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)
SSBGVD
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 xerbla(SRNAME, INFO)
XERBLA
subroutine ssbtrd(VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ, WORK, INFO)
SSBTRD
subroutine sstedc(COMPZ, N, D, E, Z, LDZ, WORK, LWORK, IWORK, LIWORK, INFO)
SSTEDC
subroutine slacpy(UPLO, M, N, A, LDA, B, LDB)
SLACPY copies all or part of one two-dimensional array to another.
subroutine ssterf(N, D, E, INFO)
SSTERF