187 SUBROUTINE dpbrfs( 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 DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
201 $ berr( * ), ferr( * ), work( * ), x( ldx, * )
208 parameter( itmax = 5 )
209 DOUBLE PRECISION ZERO
210 parameter( zero = 0.0d+0 )
212 parameter( one = 1.0d+0 )
214 parameter( two = 2.0d+0 )
215 DOUBLE PRECISION THREE
216 parameter( three = 3.0d+0 )
220 INTEGER COUNT, I, J, K, KASE, L, NZ
221 DOUBLE PRECISION EPS, LSTRES, S, SAFE1, SAFE2, SAFMIN, XK
230 INTRINSIC abs, max, min
234 DOUBLE PRECISION DLAMCH
235 EXTERNAL lsame, dlamch
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(
'DPBRFS', -info )
267 IF( n.EQ.0 .OR. nrhs.EQ.0 )
THEN
277 nz = min( n+1, 2*kd+2 )
278 eps = dlamch(
'Epsilon' )
279 safmin = dlamch(
'Safe minimum' )
295 CALL dcopy( n, b( 1, j ), 1, work( n+1 ), 1 )
296 CALL dsbmv( 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 dpbtrs( uplo, n, kd, 1, afb, ldafb, work( n+1 ), n,
362 CALL daxpy( 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 dlacn2( n, work( 2*n+1 ), work( n+1 ), iwork, ferr( j ),
407 CALL dpbtrs( 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 dpbtrs( 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 daxpy(n, da, dx, incx, dy, incy)
DAXPY
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dsbmv(uplo, n, k, alpha, a, lda, x, incx, beta, y, incy)
DSBMV
subroutine dlacn2(n, v, x, isgn, est, kase, isave)
DLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
subroutine dpbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, iwork, info)
DPBRFS
subroutine dpbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
DPBTRS