340 SUBROUTINE spbsvx( FACT, UPLO, N, KD, NRHS, AB, LDAB, AFB, LDAFB,
341 $ EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR,
342 $ WORK, IWORK, INFO )
349 CHARACTER EQUED, FACT, UPLO
350 INTEGER INFO, KD, LDAB, LDAFB, LDB, LDX, N, NRHS
355 REAL AB( LDAB, * ), AFB( LDAFB, * ), B( LDB, * ),
356 $ berr( * ), ferr( * ), s( * ), work( * ),
364 PARAMETER ( ZERO = 0.0e+0, one = 1.0e+0 )
367 LOGICAL EQUIL, NOFACT, RCEQU, UPPER
368 INTEGER I, INFEQU, J, J1, J2
369 REAL AMAX, ANORM, BIGNUM, SCOND, SMAX, SMIN, SMLNUM
374 EXTERNAL lsame, slamch, slansb
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 = slamch(
'Safe minimum' )
395 bignum = one / smlnum
400 IF( .NOT.nofact .AND. .NOT.equil .AND. .NOT.lsame( fact,
'F' ) )
403 ELSE IF( .NOT.upper .AND. .NOT.lsame( uplo,
'L' ) )
THEN
405 ELSE IF( n.LT.0 )
THEN
407 ELSE IF( kd.LT.0 )
THEN
409 ELSE IF( nrhs.LT.0 )
THEN
411 ELSE IF( ldab.LT.kd+1 )
THEN
413 ELSE IF( ldafb.LT.kd+1 )
THEN
415 ELSE IF( lsame( fact,
'F' ) .AND. .NOT.
416 $ ( rcequ .OR. lsame( equed,
'N' ) ) )
THEN
423 smin = min( smin, s( j ) )
424 smax = max( smax, s( j ) )
426 IF( smin.LE.zero )
THEN
428 ELSE IF( n.GT.0 )
THEN
429 scond = max( smin, smlnum ) / min( smax, bignum )
435 IF( ldb.LT.max( 1, n ) )
THEN
437 ELSE IF( ldx.LT.max( 1, n ) )
THEN
444 CALL xerbla(
'SPBSVX', -info )
452 CALL spbequ( uplo, n, kd, ab, ldab, s, scond, amax, infequ )
453 IF( infequ.EQ.0 )
THEN
457 CALL slaqsb( uplo, n, kd, ab, ldab, s, scond, amax, equed )
458 rcequ = lsame( equed,
'Y' )
467 b( i, j ) = s( i )*b( i, j )
472 IF( nofact .OR. equil )
THEN
479 CALL scopy( j-j1+1, ab( kd+1-j+j1, j ), 1,
480 $ afb( kd+1-j+j1, j ), 1 )
485 CALL scopy( j2-j+1, ab( 1, j ), 1, afb( 1, j ), 1 )
489 CALL spbtrf( uplo, n, kd, afb, ldafb, info )
501 anorm = slansb(
'1', uplo, n, kd, ab, ldab, work )
505 CALL spbcon( uplo, n, kd, afb, ldafb, anorm, rcond, work, iwork,
510 CALL slacpy(
'Full', n, nrhs, b, ldb, x, ldx )
511 CALL spbtrs( uplo, n, kd, nrhs, afb, ldafb, x, ldx, info )
516 CALL spbrfs( uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x,
517 $ ldx, ferr, berr, work, iwork, info )
525 x( i, j ) = s( i )*x( i, j )
529 ferr( j ) = ferr( j ) / scond
535 IF( rcond.LT.slamch(
'Epsilon' ) )
subroutine xerbla(srname, info)
subroutine scopy(n, sx, incx, sy, incy)
SCOPY
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
subroutine slaqsb(uplo, n, kd, ab, ldab, s, scond, amax, equed)
SLAQSB scales a symmetric/Hermitian band matrix, using scaling factors computed by spbequ.
subroutine spbcon(uplo, n, kd, ab, ldab, anorm, rcond, work, iwork, info)
SPBCON
subroutine spbequ(uplo, n, kd, ab, ldab, s, scond, amax, info)
SPBEQU
subroutine spbrfs(uplo, n, kd, nrhs, ab, ldab, afb, ldafb, b, ldb, x, ldx, ferr, berr, work, iwork, info)
SPBRFS
subroutine spbsvx(fact, uplo, n, kd, nrhs, ab, ldab, afb, ldafb, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
SPBSVX computes the solution to system of linear equations A * X = B for OTHER matrices
subroutine spbtrf(uplo, n, kd, ab, ldab, info)
SPBTRF
subroutine spbtrs(uplo, n, kd, nrhs, ab, ldab, b, ldb, info)
SPBTRS