304 SUBROUTINE sposvx( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
305 $ S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK,
313 CHARACTER EQUED, FACT, UPLO
314 INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
319 REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
320 $ berr( * ), ferr( * ), s( * ), work( * ),
328 PARAMETER ( ZERO = 0.0e+0, one = 1.0e+0 )
331 LOGICAL EQUIL, NOFACT, RCEQU
333 REAL AMAX, ANORM, BIGNUM, SCOND, SMAX, SMIN, SMLNUM
338 EXTERNAL lsame, slamch, slansy
350 nofact = lsame( fact,
'N' )
351 equil = lsame( fact,
'E' )
352 IF( nofact .OR. equil )
THEN
356 rcequ = lsame( equed,
'Y' )
357 smlnum = slamch(
'Safe minimum' )
358 bignum = one / smlnum
363 IF( .NOT.nofact .AND. .NOT.equil .AND. .NOT.lsame( fact,
'F' ) )
366 ELSE IF( .NOT.lsame( uplo,
'U' ) .AND. .NOT.lsame( uplo,
'L' ) )
369 ELSE IF( n.LT.0 )
THEN
371 ELSE IF( nrhs.LT.0 )
THEN
373 ELSE IF( lda.LT.max( 1, n ) )
THEN
375 ELSE IF( ldaf.LT.max( 1, n ) )
THEN
377 ELSE IF( lsame( fact,
'F' ) .AND. .NOT.
378 $ ( rcequ .OR. lsame( equed,
'N' ) ) )
THEN
385 smin = min( smin, s( j ) )
386 smax = max( smax, s( j ) )
388 IF( smin.LE.zero )
THEN
390 ELSE IF( n.GT.0 )
THEN
391 scond = max( smin, smlnum ) / min( smax, bignum )
397 IF( ldb.LT.max( 1, n ) )
THEN
399 ELSE IF( ldx.LT.max( 1, n ) )
THEN
406 CALL xerbla(
'SPOSVX', -info )
414 CALL spoequ( n, a, lda, s, scond, amax, infequ )
415 IF( infequ.EQ.0 )
THEN
419 CALL slaqsy( uplo, n, a, lda, s, scond, amax, equed )
420 rcequ = lsame( equed,
'Y' )
429 b( i, j ) = s( i )*b( i, j )
434 IF( nofact .OR. equil )
THEN
438 CALL slacpy( uplo, n, n, a, lda, af, ldaf )
439 CALL spotrf( uplo, n, af, ldaf, info )
451 anorm = slansy(
'1', uplo, n, a, lda, work )
455 CALL spocon( uplo, n, af, ldaf, anorm, rcond, work, iwork, info )
459 CALL slacpy(
'Full', n, nrhs, b, ldb, x, ldx )
460 CALL spotrs( uplo, n, nrhs, af, ldaf, x, ldx, info )
465 CALL sporfs( uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx,
466 $ ferr, berr, work, iwork, info )
474 x( i, j ) = s( i )*x( i, j )
478 ferr( j ) = ferr( j ) / scond
484 IF( rcond.LT.slamch(
'Epsilon' ) )
subroutine xerbla(srname, info)
subroutine slacpy(uplo, m, n, a, lda, b, ldb)
SLACPY copies all or part of one two-dimensional array to another.
subroutine slaqsy(uplo, n, a, lda, s, scond, amax, equed)
SLAQSY scales a symmetric/Hermitian matrix, using scaling factors computed by spoequ.
subroutine spocon(uplo, n, a, lda, anorm, rcond, work, iwork, info)
SPOCON
subroutine spoequ(n, a, lda, s, scond, amax, info)
SPOEQU
subroutine sporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, iwork, info)
SPORFS
subroutine sposvx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
SPOSVX 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