210 $ WORK, LWORK, RWORK, INFO )
220 INTEGER INFO, KD, LDAB, LDZ, N, LWORK
223 DOUBLE PRECISION RWORK( * ), W( * )
224 COMPLEX*16 AB( LDAB, * ), WORK( * ), Z( LDZ, * )
230 DOUBLE PRECISION ZERO, ONE
231 parameter( zero = 0.0d0, one = 1.0d0 )
234 LOGICAL LOWER, WANTZ, LQUERY
235 INTEGER IINFO, IMAX, INDE, INDWRK, INDRWK, ISCALE,
236 $ llwork, lwmin, lhtrd, lwtrd, ib, indhous
237 DOUBLE PRECISION ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
243 DOUBLE PRECISION DLAMCH, ZLANHB
244 EXTERNAL lsame, dlamch, zlanhb, ilaenv2stage
257 wantz = lsame( jobz,
'V' )
258 lower = lsame( uplo,
'L' )
259 lquery = ( lwork.EQ.-1 )
262 IF( .NOT.( lsame( jobz,
'N' ) ) )
THEN
264 ELSE IF( .NOT.( lower .OR. lsame( uplo,
'U' ) ) )
THEN
266 ELSE IF( n.LT.0 )
THEN
268 ELSE IF( kd.LT.0 )
THEN
270 ELSE IF( ldab.LT.kd+1 )
THEN
272 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
281 ib = ilaenv2stage( 2,
'ZHETRD_HB2ST', jobz,
283 lhtrd = ilaenv2stage( 3,
'ZHETRD_HB2ST', jobz,
285 lwtrd = ilaenv2stage( 4,
'ZHETRD_HB2ST', jobz,
287 lwmin = lhtrd + lwtrd
291 IF( lwork.LT.lwmin .AND. .NOT.lquery )
296 CALL xerbla(
'ZHBEV_2STAGE ', -info )
298 ELSE IF( lquery )
THEN
309 w( 1 ) = dble( ab( 1, 1 ) )
311 w( 1 ) = dble( ab( kd+1, 1 ) )
320 safmin = dlamch(
'Safe minimum' )
321 eps = dlamch(
'Precision' )
322 smlnum = safmin / eps
323 bignum = one / smlnum
324 rmin = sqrt( smlnum )
325 rmax = sqrt( bignum )
329 anrm = zlanhb(
'M', uplo, n, kd, ab, ldab, rwork )
331 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
334 ELSE IF( anrm.GT.rmax )
THEN
338 IF( iscale.EQ.1 )
THEN
340 CALL zlascl(
'B', kd, kd, one, sigma, n, n, ab, ldab, info )
342 CALL zlascl(
'Q', kd, kd, one, sigma, n, n, ab, ldab, info )
350 indwrk = indhous + lhtrd
351 llwork = lwork - indwrk + 1
354 $ rwork( inde ), work( indhous ), lhtrd,
355 $ work( indwrk ), llwork, iinfo )
359 IF( .NOT.wantz )
THEN
360 CALL dsterf( n, w, rwork( inde ), info )
363 CALL zsteqr( jobz, n, w, rwork( inde ), z, ldz,
364 $ rwork( indrwk ), info )
369 IF( iscale.EQ.1 )
THEN
375 CALL dscal( imax, one / sigma, w, 1 )
subroutine xerbla(srname, info)
subroutine zhbev_2stage(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, rwork, info)
ZHBEV_2STAGE computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER m...
subroutine zhetrd_2stage(vect, uplo, n, a, lda, d, e, tau, hous2, lhous2, work, lwork, info)
ZHETRD_2STAGE
subroutine zhetrd_hb2st(stage1, vect, uplo, n, kd, ab, ldab, d, e, hous, lhous, work, lwork, info)
ZHETRD_HB2ST reduces a complex Hermitian band matrix A to real symmetric tridiagonal form T
subroutine zlascl(type, kl, ku, cfrom, cto, m, n, a, lda, info)
ZLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
subroutine dscal(n, da, dx, incx)
DSCAL
subroutine zsteqr(compz, n, d, e, z, ldz, work, info)
ZSTEQR
subroutine dsterf(n, d, e, info)
DSTERF