306 SUBROUTINE dposvx( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
307 $ s, b, ldb, x, ldx, rcond, ferr, berr, work,
316 CHARACTER EQUED, FACT, UPLO
317 INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
318 DOUBLE PRECISION RCOND
322 DOUBLE PRECISION A( lda, * ), AF( ldaf, * ), B( ldb, * ),
323 $ berr( * ), ferr( * ), s( * ), work( * ),
330 DOUBLE PRECISION ZERO, ONE
331 parameter ( zero = 0.0d+0, one = 1.0d+0 )
334 LOGICAL EQUIL, NOFACT, RCEQU
336 DOUBLE PRECISION AMAX, ANORM, BIGNUM, SCOND, SMAX, SMIN, SMLNUM
340 DOUBLE PRECISION DLAMCH, DLANSY
341 EXTERNAL lsame, dlamch, dlansy
353 nofact = lsame( fact,
'N' )
354 equil = lsame( fact,
'E' )
355 IF( nofact .OR. equil )
THEN
359 rcequ = lsame( equed,
'Y' )
360 smlnum = dlamch(
'Safe minimum' )
361 bignum = one / smlnum
366 IF( .NOT.nofact .AND. .NOT.equil .AND. .NOT.lsame( fact,
'F' ) )
369 ELSE IF( .NOT.lsame( uplo,
'U' ) .AND. .NOT.lsame( uplo,
'L' ) )
372 ELSE IF( n.LT.0 )
THEN
374 ELSE IF( nrhs.LT.0 )
THEN
376 ELSE IF( lda.LT.max( 1, n ) )
THEN
378 ELSE IF( ldaf.LT.max( 1, n ) )
THEN
380 ELSE IF( lsame( fact,
'F' ) .AND. .NOT.
381 $ ( rcequ .OR. lsame( equed,
'N' ) ) )
THEN
388 smin = min( smin, s( j ) )
389 smax = max( smax, s( j ) )
391 IF( smin.LE.zero )
THEN
393 ELSE IF( n.GT.0 )
THEN
394 scond = max( smin, smlnum ) / min( smax, bignum )
400 IF( ldb.LT.max( 1, n ) )
THEN
402 ELSE IF( ldx.LT.max( 1, n ) )
THEN
409 CALL xerbla(
'DPOSVX', -info )
417 CALL dpoequ( n, a, lda, s, scond, amax, infequ )
418 IF( infequ.EQ.0 )
THEN
422 CALL dlaqsy( uplo, n, a, lda, s, scond, amax, equed )
423 rcequ = lsame( equed,
'Y' )
432 b( i, j ) = s( i )*b( i, j )
437 IF( nofact .OR. equil )
THEN
441 CALL dlacpy( uplo, n, n, a, lda, af, ldaf )
442 CALL dpotrf( uplo, n, af, ldaf, info )
454 anorm = dlansy(
'1', uplo, n, a, lda, work )
458 CALL dpocon( uplo, n, af, ldaf, anorm, rcond, work, iwork, info )
462 CALL dlacpy(
'Full', n, nrhs, b, ldb, x, ldx )
463 CALL dpotrs( uplo, n, nrhs, af, ldaf, x, ldx, info )
468 CALL dporfs( uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx,
469 $ ferr, berr, work, iwork, info )
477 x( i, j ) = s( i )*x( i, j )
481 ferr( j ) = ferr( j ) / scond
487 IF( rcond.LT.dlamch(
'Epsilon' ) )
subroutine dpotrf(UPLO, N, A, LDA, INFO)
DPOTRF
subroutine dpocon(UPLO, N, A, LDA, ANORM, RCOND, WORK, IWORK, INFO)
DPOCON
subroutine dlacpy(UPLO, M, N, A, LDA, B, LDB)
DLACPY copies all or part of one two-dimensional array to another.
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dlaqsy(UPLO, N, A, LDA, S, SCOND, AMAX, EQUED)
DLAQSY scales a symmetric/Hermitian matrix, using scaling factors computed by spoequ.
subroutine dpotrs(UPLO, N, NRHS, A, LDA, B, LDB, INFO)
DPOTRS
subroutine dposvx(FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED, S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK, IWORK, INFO)
DPOSVX computes the solution to system of linear equations A * X = B for PO matrices ...
subroutine dporfs(UPLO, N, NRHS, A, LDA, AF, LDAF, B, LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO)
DPORFS
subroutine dpoequ(N, A, LDA, S, SCOND, AMAX, INFO)
DPOEQU