187 SUBROUTINE spbrfs( UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB, B,
188 $ LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO )
196 INTEGER INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
200 REAL AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
201 $ berr( * ), ferr( * ), work( * ), x( ldx, * )
208 parameter( itmax = 5 )
210 parameter( zero = 0.0e+0 )
212 parameter( one = 1.0e+0 )
214 parameter( two = 2.0e+0 )
216 parameter( three = 3.0e+0 )
220 INTEGER COUNT, I, J, K, KASE, L, NZ
221 REAL EPS, LSTRES, S, SAFE1, SAFE2, SAFMIN, XK
230 INTRINSIC abs, max, min
235 EXTERNAL lsame, slamch
242 upper = lsame( uplo,
'U' )
243 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
245 ELSE IF( n.LT.0 )
THEN
247 ELSE IF( kd.LT.0 )
THEN
249 ELSE IF( nrhs.LT.0 )
THEN
251 ELSE IF( ldab.LT.kd+1 )
THEN
253 ELSE IF( ldafb.LT.kd+1 )
THEN
255 ELSE IF( ldb.LT.max( 1, n ) )
THEN
257 ELSE IF( ldx.LT.max( 1, n ) )
THEN
261 CALL xerbla(
'SPBRFS', -info )
267 IF( n.EQ.0 .OR. nrhs.EQ.0 )
THEN
277 nz = min( n+1, 2*kd+2 )
278 eps = slamch(
'Epsilon' )
279 safmin = slamch(
'Safe minimum' )
295 CALL scopy( n, b( 1, j ), 1, work( n+1 ), 1 )
296 CALL ssbmv( uplo, n, kd, -one, ab, ldab, x( 1, j ), 1, one,
309 work( i ) = abs( b( i, j ) )
317 xk = abs( x( k, j ) )
319 DO 40 i = max( 1, k-kd ), k - 1
320 work( i ) = work( i ) + abs( ab( l+i, k ) )*xk
321 s = s + abs( ab( l+i, k ) )*abs( x( i, j ) )
323 work( k ) = work( k ) + abs( ab( kd+1, k ) )*xk + s
328 xk = abs( x( k, j ) )
329 work( k ) = work( k ) + abs( ab( 1, k ) )*xk
331 DO 60 i = k + 1, min( n, k+kd )
332 work( i ) = work( i ) + abs( ab( l+i, k ) )*xk
333 s = s + abs( ab( l+i, k ) )*abs( x( i, j ) )
335 work( k ) = work( k ) + s
340 IF( work( i ).GT.safe2 )
THEN
341 s = max( s, abs( work( n+i ) ) / work( i ) )
343 s = max( s, ( abs( work( n+i ) )+safe1 ) /
344 $ ( work( i )+safe1 ) )
355 IF( berr( j ).GT.eps .AND. two*berr( j ).LE.lstres .AND.
356 $ count.LE.itmax )
THEN
360 CALL spbtrs( uplo, n, kd, 1, afb, ldafb, work( n+1 ), n,
362 CALL saxpy( n, one, work( n+1 ), 1, x( 1, j ), 1 )
391 IF( work( i ).GT.safe2 )
THEN
392 work( i ) = abs( work( n+i ) ) + nz*eps*work( i )
394 work( i ) = abs( work( n+i ) ) + nz*eps*work( i ) + safe1
400 CALL slacn2( n, work( 2*n+1 ), work( n+1 ), iwork, ferr( j ),
407 CALL spbtrs( uplo, n, kd, 1, afb, ldafb, work( n+1 ), n,
410 work( n+i ) = work( n+i )*work( i )
412 ELSE IF( kase.EQ.2 )
THEN
417 work( n+i ) = work( n+i )*work( i )
419 CALL spbtrs( uplo, n, kd, 1, afb, ldafb, work( n+1 ), n,
429 lstres = max( lstres, abs( x( i, j ) ) )
432 $ 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 ssbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy)
SSBMV
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...
subroutine spbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, iwork, info)
SPBRFS
subroutine spbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
SPBTRS