177 SUBROUTINE ssprfs( UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X, LDX,
178 $ FERR, BERR, WORK, IWORK, INFO )
186 INTEGER INFO, LDB, LDX, N, NRHS
189 INTEGER IPIV( * ), IWORK( * )
190 REAL AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
191 $ ferr( * ), work( * ), x( ldx, * )
198 parameter( itmax = 5 )
200 parameter( zero = 0.0e+0 )
202 parameter( one = 1.0e+0 )
204 parameter( two = 2.0e+0 )
206 parameter( three = 3.0e+0 )
210 INTEGER COUNT, I, IK, J, K, KASE, KK, NZ
211 REAL EPS, LSTRES, S, SAFE1, SAFE2, SAFMIN, XK
225 EXTERNAL lsame, slamch
232 upper = lsame( uplo,
'U' )
233 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
235 ELSE IF( n.LT.0 )
THEN
237 ELSE IF( nrhs.LT.0 )
THEN
239 ELSE IF( ldb.LT.max( 1, n ) )
THEN
241 ELSE IF( ldx.LT.max( 1, n ) )
THEN
245 CALL xerbla(
'SSPRFS', -info )
251 IF( n.EQ.0 .OR. nrhs.EQ.0 )
THEN
262 eps = slamch(
'Epsilon' )
263 safmin = slamch(
'Safe minimum' )
279 CALL scopy( n, b( 1, j ), 1, work( n+1 ), 1 )
280 CALL sspmv( uplo, n, -one, ap, x( 1, j ), 1, one, work( n+1 ),
293 work( i ) = abs( b( i, j ) )
302 xk = abs( x( k, j ) )
305 work( i ) = work( i ) + abs( ap( ik ) )*xk
306 s = s + abs( ap( ik ) )*abs( x( i, j ) )
309 work( k ) = work( k ) + abs( ap( kk+k-1 ) )*xk + s
315 xk = abs( x( k, j ) )
316 work( k ) = work( k ) + abs( ap( kk ) )*xk
319 work( i ) = work( i ) + abs( ap( ik ) )*xk
320 s = s + abs( ap( ik ) )*abs( x( i, j ) )
323 work( k ) = work( k ) + s
329 IF( work( i ).GT.safe2 )
THEN
330 s = max( s, abs( work( n+i ) ) / work( i ) )
332 s = max( s, ( abs( work( n+i ) )+safe1 ) /
333 $ ( work( i )+safe1 ) )
344 IF( berr( j ).GT.eps .AND. two*berr( j ).LE.lstres .AND.
345 $ count.LE.itmax )
THEN
349 CALL ssptrs( uplo, n, 1, afp, ipiv, work( n+1 ), n, info )
350 CALL saxpy( n, one, work( n+1 ), 1, x( 1, j ), 1 )
379 IF( work( i ).GT.safe2 )
THEN
380 work( i ) = abs( work( n+i ) ) + nz*eps*work( i )
382 work( i ) = abs( work( n+i ) ) + nz*eps*work( i ) + safe1
388 CALL slacn2( n, work( 2*n+1 ), work( n+1 ), iwork, ferr( j ),
395 CALL ssptrs( uplo, n, 1, afp, ipiv, work( n+1 ), n,
398 work( n+i ) = work( i )*work( n+i )
400 ELSE IF( kase.EQ.2 )
THEN
405 work( n+i ) = work( i )*work( n+i )
407 CALL ssptrs( uplo, n, 1, afp, ipiv, work( n+1 ), n,
417 lstres = max( lstres, abs( x( i, j ) ) )
420 $ ferr( j ) = ferr( j ) / lstres
subroutine xerbla(srname, info)
subroutine saxpy(n, sa, sx, incx, sy, incy)
SAXPY
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine sspmv(uplo, n, alpha, ap, x, incx, beta, y, incy)
SSPMV
subroutine ssprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
SSPRFS
subroutine ssptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info)
SSPTRS
subroutine slacn2(n, v, x, isgn, est, kase, isave)
SLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...