203 $ WORK, LWORK, INFO )
213 INTEGER INFO, KD, LDAB, LDZ, N, LWORK
216 DOUBLE PRECISION AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
222 DOUBLE PRECISION ZERO, ONE
223 parameter( zero = 0.0d0, one = 1.0d0 )
226 LOGICAL LOWER, WANTZ, LQUERY
227 INTEGER IINFO, IMAX, INDE, INDWRK, ISCALE,
228 $ llwork, lwmin, lhtrd, lwtrd, ib, indhous
229 DOUBLE PRECISION ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
235 DOUBLE PRECISION DLAMCH, DLANSB
236 EXTERNAL lsame, dlamch, dlansb, ilaenv2stage
249 wantz = lsame( jobz,
'V' )
250 lower = lsame( uplo,
'L' )
251 lquery = ( lwork.EQ.-1 )
254 IF( .NOT.( lsame( jobz,
'N' ) ) )
THEN
256 ELSE IF( .NOT.( lower .OR. lsame( uplo,
'U' ) ) )
THEN
258 ELSE IF( n.LT.0 )
THEN
260 ELSE IF( kd.LT.0 )
THEN
262 ELSE IF( ldab.LT.kd+1 )
THEN
264 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
273 ib = ilaenv2stage( 2,
'DSYTRD_SB2ST', jobz,
275 lhtrd = ilaenv2stage( 3,
'DSYTRD_SB2ST', jobz,
277 lwtrd = ilaenv2stage( 4,
'DSYTRD_SB2ST', jobz,
279 lwmin = n + lhtrd + lwtrd
283 IF( lwork.LT.lwmin .AND. .NOT.lquery )
288 CALL xerbla(
'DSBEV_2STAGE ', -info )
290 ELSE IF( lquery )
THEN
303 w( 1 ) = ab( kd+1, 1 )
312 safmin = dlamch(
'Safe minimum' )
313 eps = dlamch(
'Precision' )
314 smlnum = safmin / eps
315 bignum = one / smlnum
316 rmin = sqrt( smlnum )
317 rmax = sqrt( bignum )
321 anrm = dlansb(
'M', uplo, n, kd, ab, ldab, work )
323 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
326 ELSE IF( anrm.GT.rmax )
THEN
330 IF( iscale.EQ.1 )
THEN
332 CALL dlascl(
'B', kd, kd, one, sigma, n, n, ab, ldab, info )
334 CALL dlascl(
'Q', kd, kd, one, sigma, n, n, ab, ldab, info )
342 indwrk = indhous + lhtrd
343 llwork = lwork - indwrk + 1
346 $ work( inde ), work( indhous ), lhtrd,
347 $ work( indwrk ), llwork, iinfo )
351 IF( .NOT.wantz )
THEN
352 CALL dsterf( n, w, work( inde ), info )
354 CALL dsteqr( jobz, n, w, work( inde ), z, ldz, work( indwrk ),
360 IF( iscale.EQ.1 )
THEN
366 CALL dscal( imax, one / sigma, w, 1 )
subroutine xerbla(srname, info)
subroutine dsbev_2stage(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, info)
DSBEV_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER m...
subroutine dsytrd_sb2st(stage1, vect, uplo, n, kd, ab, ldab, d, e, hous, lhous, work, lwork, info)
DSYTRD_SB2ST reduces a real symmetric band matrix A to real symmetric tridiagonal form T
subroutine dlascl(type, kl, ku, cfrom, cto, m, n, a, lda, info)
DLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine dsteqr(compz, n, d, e, z, ldz, work, info)
DSTEQR
subroutine dsterf(n, d, e, info)
DSTERF