493 SUBROUTINE sposvxx( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
494 $ S, B, LDB, X, LDX, RCOND, RPVGRW, BERR,
495 $ N_ERR_BNDS, ERR_BNDS_NORM, ERR_BNDS_COMP,
496 $ NPARAMS, PARAMS, WORK, IWORK, INFO )
503 CHARACTER EQUED, FACT, UPLO
504 INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS, NPARAMS,
510 REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
511 $ X( LDX, * ), WORK( * )
512 REAL S( * ), PARAMS( * ), BERR( * ),
513 $ err_bnds_norm( nrhs, * ),
514 $ err_bnds_comp( nrhs, * )
521 PARAMETER ( ZERO = 0.0e+0, one = 1.0e+0 )
522 INTEGER FINAL_NRM_ERR_I, FINAL_CMP_ERR_I, BERR_I
523 INTEGER RCOND_I, NRM_RCOND_I, NRM_ERR_I, CMP_RCOND_I
524 INTEGER CMP_ERR_I, PIV_GROWTH_I
525 parameter( final_nrm_err_i = 1, final_cmp_err_i = 2,
527 parameter( rcond_i = 4, nrm_rcond_i = 5, nrm_err_i = 6 )
528 parameter( cmp_rcond_i = 7, cmp_err_i = 8,
532 LOGICAL EQUIL, NOFACT, RCEQU
534 REAL AMAX, BIGNUM, SMIN, SMAX,
540 REAL SLAMCH, SLA_PORPVGRW
552 nofact = lsame( fact,
'N' )
553 equil = lsame( fact,
'E' )
554 smlnum = slamch(
'Safe minimum' )
555 bignum = one / smlnum
556 IF( nofact .OR. equil )
THEN
560 rcequ = lsame( equed,
'Y' )
571 IF( .NOT.nofact .AND. .NOT.equil .AND. .NOT.
572 $ lsame( fact,
'F' ) )
THEN
574 ELSE IF( .NOT.lsame( uplo,
'U' ) .AND.
575 $ .NOT.lsame( uplo,
'L' ) )
THEN
577 ELSE IF( n.LT.0 )
THEN
579 ELSE IF( nrhs.LT.0 )
THEN
581 ELSE IF( lda.LT.max( 1, n ) )
THEN
583 ELSE IF( ldaf.LT.max( 1, n ) )
THEN
585 ELSE IF( lsame( fact,
'F' ) .AND. .NOT.
586 $ ( rcequ .OR. lsame( equed,
'N' ) ) )
THEN
593 smin = min( smin, s( j ) )
594 smax = max( smax, s( j ) )
596 IF( smin.LE.zero )
THEN
598 ELSE IF( n.GT.0 )
THEN
599 scond = max( smin, smlnum ) / min( smax, bignum )
605 IF( ldb.LT.max( 1, n ) )
THEN
607 ELSE IF( ldx.LT.max( 1, n ) )
THEN
614 CALL xerbla(
'SPOSVXX', -info )
622 CALL spoequb( n, a, lda, s, scond, amax, infequ )
623 IF( infequ.EQ.0 )
THEN
627 CALL slaqsy( uplo, n, a, lda, s, scond, amax, equed )
628 rcequ = lsame( equed,
'Y' )
634 IF( rcequ )
CALL slascl2( n, nrhs, s, b, ldb )
636 IF( nofact .OR. equil )
THEN
640 CALL slacpy( uplo, n, n, a, lda, af, ldaf )
641 CALL spotrf( uplo, n, af, ldaf, info )
651 rpvgrw = sla_porpvgrw( uplo, info, a, lda, af, ldaf, work )
658 rpvgrw = sla_porpvgrw( uplo, n, a, lda, af, ldaf, work )
662 CALL slacpy(
'Full', n, nrhs, b, ldb, x, ldx )
663 CALL spotrs( uplo, n, nrhs, af, ldaf, x, ldx, info )
668 CALL sporfsx( uplo, equed, n, nrhs, a, lda, af, ldaf,
669 $ s, b, ldb, x, ldx, rcond, berr, n_err_bnds, err_bnds_norm,
670 $ err_bnds_comp, nparams, params, work, iwork, info )
676 CALL slascl2 ( n, nrhs, s, x, ldx )
subroutine xerbla(srname, info)
real function sla_porpvgrw(uplo, ncols, a, lda, af, ldaf, work)
SLA_PORPVGRW computes the reciprocal pivot growth factor norm(A)/norm(U) for a symmetric or Hermitian...
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
real function slamch(cmach)
SLAMCH
subroutine slaqsy(uplo, n, a, lda, s, scond, amax, equed)
SLAQSY scales a symmetric/Hermitian matrix, using scaling factors computed by spoequ.
subroutine slascl2(m, n, d, x, ldx)
SLASCL2 performs diagonal scaling on a matrix.
logical function lsame(ca, cb)
LSAME
subroutine spoequb(n, a, lda, s, scond, amax, info)
SPOEQUB
subroutine sporfsx(uplo, equed, n, nrhs, a, lda, af, ldaf, s, b, ldb, x, ldx, rcond, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, iwork, info)
SPORFSX
subroutine sposvxx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, rpvgrw, berr, n_err_bnds, err_bnds_norm, err_bnds_comp, nparams, params, work, iwork, info)
SPOSVXX computes the solution to system of linear equations A * X = B for PO matrices
subroutine spotrf(uplo, n, a, lda, info)
SPOTRF
subroutine spotrs(uplo, n, nrhs, a, lda, b, ldb, info)
SPOTRS