338 SUBROUTINE dpbsvx( FACT, UPLO, N, KD, NRHS, AB, LDAB, AFB,
340 $ EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR,
341 $ WORK, IWORK, INFO )
348 CHARACTER EQUED, FACT, UPLO
349 INTEGER INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
350 DOUBLE PRECISION RCOND
354 DOUBLE PRECISION AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
355 $ BERR( * ), FERR( * ), S( * ), WORK( * ),
362 DOUBLE PRECISION ZERO, ONE
363 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
366 LOGICAL EQUIL, NOFACT, RCEQU, UPPER
367 INTEGER I, INFEQU, J, J1, J2
368 DOUBLE PRECISION AMAX, ANORM, BIGNUM, SCOND, SMAX, SMIN, SMLNUM
372 DOUBLE PRECISION DLAMCH, DLANSB
373 EXTERNAL LSAME, DLAMCH, DLANSB
386 nofact = lsame( fact,
'N' )
387 equil = lsame( fact,
'E' )
388 upper = lsame( uplo,
'U' )
389 IF( nofact .OR. equil )
THEN
393 rcequ = lsame( equed,
'Y' )
394 smlnum = dlamch(
'Safe minimum' )
395 bignum = one / smlnum
400 IF( .NOT.nofact .AND.
402 $ .NOT.lsame( fact,
'F' ) )
405 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
407 ELSE IF( n.LT.0 )
THEN
409 ELSE IF( kd.LT.0 )
THEN
411 ELSE IF( nrhs.LT.0 )
THEN
413 ELSE IF( ldab.LT.kd+1 )
THEN
415 ELSE IF( ldafb.LT.kd+1 )
THEN
417 ELSE IF( lsame( fact,
'F' ) .AND. .NOT.
418 $ ( rcequ .OR. lsame( equed,
'N' ) ) )
THEN
425 smin = min( smin, s( j ) )
426 smax = max( smax, s( j ) )
428 IF( smin.LE.zero )
THEN
430 ELSE IF( n.GT.0 )
THEN
431 scond = max( smin, smlnum ) / min( smax, bignum )
437 IF( ldb.LT.max( 1, n ) )
THEN
439 ELSE IF( ldx.LT.max( 1, n ) )
THEN
446 CALL xerbla(
'DPBSVX', -info )
454 CALL dpbequ( uplo, n, kd, ab, ldab, s, scond, amax, infequ )
455 IF( infequ.EQ.0 )
THEN
459 CALL dlaqsb( uplo, n, kd, ab, ldab, s, scond, amax,
461 rcequ = lsame( equed,
'Y' )
470 b( i, j ) = s( i )*b( i, j )
475 IF( nofact .OR. equil )
THEN
482 CALL dcopy( j-j1+1, ab( kd+1-j+j1, j ), 1,
483 $ afb( kd+1-j+j1, j ), 1 )
488 CALL dcopy( j2-j+1, ab( 1, j ), 1, afb( 1, j ), 1 )
492 CALL dpbtrf( uplo, n, kd, afb, ldafb, info )
504 anorm = dlansb(
'1', uplo, n, kd, ab, ldab, work )
508 CALL dpbcon( uplo, n, kd, afb, ldafb, anorm, rcond, work,
514 CALL dlacpy(
'Full', n, nrhs, b, ldb, x, ldx )
515 CALL dpbtrs( uplo, n, kd, nrhs, afb, ldafb, x, ldx, info )
520 CALL dpbrfs( uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb,
522 $ ldx, ferr, berr, work, iwork, info )
530 x( i, j ) = s( i )*x( i, j )
534 ferr( j ) = ferr( j ) / scond
540 IF( rcond.LT.dlamch(
'Epsilon' ) )
subroutine dpbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, iwork, info)
DPBRFS
subroutine dpbsvx(fact, uplo, n, kd, nrhs, ab, ldab, afb, ldafb, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
DPBSVX computes the solution to system of linear equations A * X = B for OTHER matrices