185 SUBROUTINE ssbevd( JOBZ, UPLO, N, KD, AB, LDAB, W, Z, LDZ, WORK,
186 $ LWORK, IWORK, LIWORK, INFO )
194 INTEGER INFO, KD, LDAB, LDZ, LIWORK, LWORK, N
198 REAL AB( LDAB, * ), W( * ), WORK( * ), Z( LDZ, * )
205 parameter( zero = 0.0e+0, one = 1.0e+0 )
208 LOGICAL LOWER, LQUERY, WANTZ
209 INTEGER IINFO, INDE, INDWK2, INDWRK, ISCALE, LIWMIN,
211 REAL ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
216 REAL SLAMCH, SLANSB, SROUNDUP_LWORK
217 EXTERNAL lsame, slamch, slansb, sroundup_lwork
230 wantz = lsame( jobz,
'V' )
231 lower = lsame( uplo,
'L' )
232 lquery = ( lwork.EQ.-1 .OR. liwork.EQ.-1 )
241 lwmin = 1 + 5*n + 2*n**2
247 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
249 ELSE IF( .NOT.( lower .OR. lsame( uplo,
'U' ) ) )
THEN
251 ELSE IF( n.LT.0 )
THEN
253 ELSE IF( kd.LT.0 )
THEN
255 ELSE IF( ldab.LT.kd+1 )
THEN
257 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
262 work( 1 ) = sroundup_lwork(lwmin)
265 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
267 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
273 CALL xerbla(
'SSBEVD', -info )
275 ELSE IF( lquery )
THEN
293 safmin = slamch(
'Safe minimum' )
294 eps = slamch(
'Precision' )
295 smlnum = safmin / eps
296 bignum = one / smlnum
297 rmin = sqrt( smlnum )
298 rmax = sqrt( bignum )
302 anrm = slansb(
'M', uplo, n, kd, ab, ldab, work )
304 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
307 ELSE IF( anrm.GT.rmax )
THEN
311 IF( iscale.EQ.1 )
THEN
313 CALL slascl(
'B', kd, kd, one, sigma, n, n, ab, ldab, info )
315 CALL slascl(
'Q', kd, kd, one, sigma, n, n, ab, ldab, info )
323 indwk2 = indwrk + n*n
324 llwrk2 = lwork - indwk2 + 1
325 CALL ssbtrd( jobz, uplo, n, kd, ab, ldab, w, work( inde ), z, ldz,
326 $ work( indwrk ), iinfo )
330 IF( .NOT.wantz )
THEN
331 CALL ssterf( n, w, work( inde ), info )
333 CALL sstedc(
'I', n, w, work( inde ), work( indwrk ), n,
334 $ work( indwk2 ), llwrk2, iwork, liwork, info )
335 CALL sgemm(
'N',
'N', n, n, n, one, z, ldz, work( indwrk ), n,
336 $ zero, work( indwk2 ), n )
337 CALL slacpy(
'A', n, n, work( indwk2 ), n, z, ldz )
343 $
CALL sscal( n, one / sigma, w, 1 )
345 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 ssbevd(jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, lwork, iwork, liwork, info)
SSBEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
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 slascl(type, kl, ku, cfrom, cto, m, n, a, lda, info)
SLASCL multiplies a general rectangular matrix by a real scalar defined as cto/cfrom.
subroutine sscal(n, sa, sx, incx)
SSCAL
subroutine sstedc(compz, n, d, e, z, ldz, work, lwork, iwork, liwork, info)
SSTEDC
subroutine ssterf(n, d, e, info)
SSTERF