180 SUBROUTINE strrfs( UPLO, TRANS, DIAG, N, NRHS, A, LDA, B, LDB, X,
181 $ LDX, FERR, BERR, WORK, IWORK, INFO )
188 CHARACTER DIAG, TRANS, UPLO
189 INTEGER INFO, LDA, LDB, LDX, N, NRHS
193 REAL A( LDA, * ), B( LDB, * ), BERR( * ), FERR( * ),
194 $ work( * ), x( ldx, * )
201 parameter( zero = 0.0e+0 )
203 parameter( one = 1.0e+0 )
206 LOGICAL NOTRAN, NOUNIT, UPPER
208 INTEGER I, J, K, KASE, NZ
209 REAL EPS, LSTRES, S, SAFE1, SAFE2, SAFMIN, XK
223 EXTERNAL lsame, slamch
230 upper = lsame( uplo,
'U' )
231 notran = lsame( trans,
'N' )
232 nounit = lsame( diag,
'N' )
234 IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
236 ELSE IF( .NOT.notran .AND. .NOT.lsame( trans,
'T' ) .AND. .NOT.
237 $ lsame( trans,
'C' ) )
THEN
239 ELSE IF( .NOT.nounit .AND. .NOT.lsame( diag,
'U' ) )
THEN
241 ELSE IF( n.LT.0 )
THEN
243 ELSE IF( nrhs.LT.0 )
THEN
245 ELSE IF( lda.LT.max( 1, n ) )
THEN
247 ELSE IF( ldb.LT.max( 1, n ) )
THEN
249 ELSE IF( ldx.LT.max( 1, n ) )
THEN
253 CALL xerbla(
'STRRFS', -info )
259 IF( n.EQ.0 .OR. nrhs.EQ.0 )
THEN
276 eps = slamch(
'Epsilon' )
277 safmin = slamch(
'Safe minimum' )
288 CALL scopy( n, x( 1, j ), 1, work( n+1 ), 1 )
289 CALL strmv( uplo, trans, diag, n, a, lda, work( n+1 ), 1 )
290 CALL saxpy( n, -one, b( 1, j ), 1, work( n+1 ), 1 )
302 work( i ) = abs( b( i, j ) )
312 xk = abs( x( k, j ) )
314 work( i ) = work( i ) + abs( a( i, k ) )*xk
319 xk = abs( x( k, j ) )
321 work( i ) = work( i ) + abs( a( i, k ) )*xk
323 work( k ) = work( k ) + xk
329 xk = abs( x( k, j ) )
331 work( i ) = work( i ) + abs( a( i, k ) )*xk
336 xk = abs( x( k, j ) )
338 work( i ) = work( i ) + abs( a( i, k ) )*xk
340 work( k ) = work( k ) + xk
353 s = s + abs( a( i, k ) )*abs( x( i, j ) )
355 work( k ) = work( k ) + s
361 s = s + abs( a( i, k ) )*abs( x( i, j ) )
363 work( k ) = work( k ) + s
371 s = s + abs( a( i, k ) )*abs( x( i, j ) )
373 work( k ) = work( k ) + s
379 s = s + abs( a( i, k ) )*abs( x( i, j ) )
381 work( k ) = work( k ) + s
388 IF( work( i ).GT.safe2 )
THEN
389 s = max( s, abs( work( n+i ) ) / work( i ) )
391 s = max( s, ( abs( work( n+i ) )+safe1 ) /
392 $ ( work( i )+safe1 ) )
420 IF( work( i ).GT.safe2 )
THEN
421 work( i ) = abs( work( n+i ) ) + nz*eps*work( i )
423 work( i ) = abs( work( n+i ) ) + nz*eps*work( i ) + safe1
429 CALL slacn2( n, work( 2*n+1 ), work( n+1 ), iwork, ferr( j ),
436 CALL strsv( uplo, transt, diag, n, a, lda, work( n+1 ),
439 work( n+i ) = work( i )*work( n+i )
446 work( n+i ) = work( i )*work( n+i )
448 CALL strsv( uplo, trans, diag, n, a, lda, work( n+1 ),
458 lstres = max( lstres, abs( x( i, j ) ) )
461 $ 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 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 strmv(uplo, trans, diag, n, a, lda, x, incx)
STRMV
subroutine strrfs(uplo, trans, diag, n, nrhs, a, lda, b, ldb, x, ldx, ferr, berr, work, iwork, info)
STRRFS
subroutine strsv(uplo, trans, diag, n, a, lda, x, incx)
STRSV