167 DOUBLE PRECISION FUNCTION dla_gbrcond( TRANS, N, KL, KU, AB, LDAB,
168 $ AFB, LDAFB, IPIV, CMODE, C,
169 $ INFO, WORK, IWORK )
177 INTEGER n, ldab, ldafb, info, kl, ku, cmode
180 INTEGER iwork( * ), ipiv( * )
181 DOUBLE PRECISION ab( ldab, * ), afb( ldafb, * ), work( * ),
189 INTEGER kase, i, j, kd, ke
190 DOUBLE PRECISION ainvnm, tmp
210 notrans =
lsame( trans,
'N' )
211 IF ( .NOT. notrans .AND. .NOT.
lsame(trans,
'T')
212 $ .AND. .NOT.
lsame(trans,
'C') )
THEN
214 ELSE IF( n.LT.0 )
THEN
216 ELSE IF( kl.LT.0 .OR. kl.GT.n-1 )
THEN
218 ELSE IF( ku.LT.0 .OR. ku.GT.n-1 )
THEN
220 ELSE IF( ldab.LT.kl+ku+1 )
THEN
222 ELSE IF( ldafb.LT.2*kl+ku+1 )
THEN
226 CALL xerbla(
'DLA_GBRCOND', -info )
242 IF ( cmode .EQ. 1 )
THEN
243 DO j = max( i-kl, 1 ), min( i+ku, n )
244 tmp = tmp + abs( ab( kd+i-j, j ) * c( j ) )
246 ELSE IF ( cmode .EQ. 0 )
THEN
247 DO j = max( i-kl, 1 ), min( i+ku, n )
248 tmp = tmp + abs( ab( kd+i-j, j ) )
251 DO j = max( i-kl, 1 ), min( i+ku, n )
252 tmp = tmp + abs( ab( kd+i-j, j ) / c( j ) )
260 IF ( cmode .EQ. 1 )
THEN
261 DO j = max( i-kl, 1 ), min( i+ku, n )
262 tmp = tmp + abs( ab( ke-i+j, i ) * c( j ) )
264 ELSE IF ( cmode .EQ. 0 )
THEN
265 DO j = max( i-kl, 1 ), min( i+ku, n )
266 tmp = tmp + abs( ab( ke-i+j, i ) )
269 DO j = max( i-kl, 1 ), min( i+ku, n )
270 tmp = tmp + abs( ab( ke-i+j, i ) / c( j ) )
283 CALL dlacn2( n, work( n+1 ), work, iwork, ainvnm, kase, isave )
290 work( i ) = work( i ) * work( 2*n+i )
294 CALL dgbtrs(
'No transpose', n, kl, ku, 1, afb, ldafb,
295 $ ipiv, work, n, info )
297 CALL dgbtrs(
'Transpose', n, kl, ku, 1, afb, ldafb, ipiv,
303 IF ( cmode .EQ. 1 )
THEN
305 work( i ) = work( i ) / c( i )
307 ELSE IF ( cmode .EQ. -1 )
THEN
309 work( i ) = work( i ) * c( i )
316 IF ( cmode .EQ. 1 )
THEN
318 work( i ) = work( i ) / c( i )
320 ELSE IF ( cmode .EQ. -1 )
THEN
322 work( i ) = work( i ) * c( i )
327 CALL dgbtrs(
'Transpose', n, kl, ku, 1, afb, ldafb, ipiv,
330 CALL dgbtrs(
'No transpose', n, kl, ku, 1, afb, ldafb,
331 $ ipiv, work, n, info )
337 work( i ) = work( i ) * work( 2*n+i )
345 IF( ainvnm .NE. 0.0d+0 )
subroutine xerbla(srname, info)
subroutine dgbtrs(trans, n, kl, ku, nrhs, ab, ldab, ipiv, b, ldb, info)
DGBTRS
double precision function dla_gbrcond(trans, n, kl, ku, ab, ldab, afb, ldafb, ipiv, cmode, c, info, work, iwork)
DLA_GBRCOND estimates the Skeel condition number for a general banded matrix.
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...
logical function lsame(ca, cb)
LSAME