170 SUBROUTINE sspevd( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK,
171 $ IWORK, LIWORK, INFO )
179 INTEGER INFO, LDZ, LIWORK, LWORK, N
183 REAL AP( * ), W( * ), WORK( * ), Z( LDZ, * )
190 parameter( zero = 0.0e+0, one = 1.0e+0 )
193 LOGICAL LQUERY, WANTZ
194 INTEGER IINFO, INDE, INDTAU, INDWRK, ISCALE, LIWMIN,
196 REAL ANRM, BIGNUM, EPS, RMAX, RMIN, SAFMIN, SIGMA,
201 REAL SLAMCH, SLANSP, SROUNDUP_LWORK
202 EXTERNAL lsame, slamch, slansp, sroundup_lwork
214 wantz = lsame( jobz,
'V' )
215 lquery = ( lwork.EQ.-1 .OR. liwork.EQ.-1 )
218 IF( .NOT.( wantz .OR. lsame( jobz,
'N' ) ) )
THEN
220 ELSE IF( .NOT.( lsame( uplo,
'U' ) .OR. lsame( uplo,
'L' ) ) )
223 ELSE IF( n.LT.0 )
THEN
225 ELSE IF( ldz.LT.1 .OR. ( wantz .AND. ldz.LT.n ) )
THEN
236 lwmin = 1 + 6*n + n**2
243 work( 1 ) = sroundup_lwork(lwmin)
245 IF( lwork.LT.lwmin .AND. .NOT.lquery )
THEN
247 ELSE IF( liwork.LT.liwmin .AND. .NOT.lquery )
THEN
253 CALL xerbla(
'SSPEVD', -info )
255 ELSE IF( lquery )
THEN
273 safmin = slamch(
'Safe minimum' )
274 eps = slamch(
'Precision' )
275 smlnum = safmin / eps
276 bignum = one / smlnum
277 rmin = sqrt( smlnum )
278 rmax = sqrt( bignum )
282 anrm = slansp(
'M', uplo, n, ap, work )
284 IF( anrm.GT.zero .AND. anrm.LT.rmin )
THEN
287 ELSE IF( anrm.GT.rmax )
THEN
291 IF( iscale.EQ.1 )
THEN
292 CALL sscal( ( n*( n+1 ) ) / 2, sigma, ap, 1 )
299 CALL ssptrd( uplo, n, ap, w, work( inde ), work( indtau ), iinfo )
306 IF( .NOT.wantz )
THEN
307 CALL ssterf( n, w, work( inde ), info )
310 llwork = lwork - indwrk + 1
311 CALL sstedc(
'I', n, w, work( inde ), z, ldz, work( indwrk ),
312 $ llwork, iwork, liwork, info )
313 CALL sopmtr(
'L', uplo,
'N', n, n, ap, work( indtau ), z, ldz,
314 $ work( indwrk ), iinfo )
320 $
CALL sscal( n, one / sigma, w, 1 )
322 work( 1 ) = sroundup_lwork(lwmin)
subroutine xerbla(srname, info)
subroutine sspevd(jobz, uplo, n, ap, w, z, ldz, work, lwork, iwork, liwork, info)
SSPEVD computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrice...
subroutine ssptrd(uplo, n, ap, d, e, tau, info)
SSPTRD
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
subroutine sopmtr(side, uplo, trans, m, n, ap, tau, c, ldc, work, info)
SOPMTR