304 SUBROUTINE dposvx( 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
315 DOUBLE PRECISION RCOND
319 DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
320 $ berr( * ), ferr( * ), s( * ), work( * ),
327 DOUBLE PRECISION ZERO, ONE
328 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
331 LOGICAL EQUIL, NOFACT, RCEQU
333 DOUBLE PRECISION AMAX, ANORM, BIGNUM, SCOND, SMAX, SMIN, SMLNUM
337 DOUBLE PRECISION DLAMCH, DLANSY
338 EXTERNAL lsame, dlamch, dlansy
350 nofact = lsame( fact,
'N' )
351 equil = lsame( fact,
'E' )
352 IF( nofact .OR. equil )
THEN
356 rcequ = lsame( equed,
'Y' )
357 smlnum = dlamch(
'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(
'DPOSVX', -info )
414 CALL dpoequ( n, a, lda, s, scond, amax, infequ )
415 IF( infequ.EQ.0 )
THEN
419 CALL dlaqsy( 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 dlacpy( uplo, n, n, a, lda, af, ldaf )
439 CALL dpotrf( uplo, n, af, ldaf, info )
451 anorm = dlansy(
'1', uplo, n, a, lda, work )
455 CALL dpocon( uplo, n, af, ldaf, anorm, rcond, work, iwork, info )
459 CALL dlacpy(
'Full', n, nrhs, b, ldb, x, ldx )
460 CALL dpotrs( uplo, n, nrhs, af, ldaf, x, ldx, info )
465 CALL dporfs( 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.dlamch(
'Epsilon' ) )
subroutine xerbla(srname, info)
subroutine dlacpy(uplo, m, n, a, lda, b, ldb)
DLACPY copies all or part of one two-dimensional array to another.
subroutine dlaqsy(uplo, n, a, lda, s, scond, amax, equed)
DLAQSY scales a symmetric/Hermitian matrix, using scaling factors computed by spoequ.
subroutine dpocon(uplo, n, a, lda, anorm, rcond, work, iwork, info)
DPOCON
subroutine dpoequ(n, a, lda, s, scond, amax, info)
DPOEQU
subroutine dporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, iwork, info)
DPORFS
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 dpotrf(uplo, n, a, lda, info)
DPOTRF
subroutine dpotrs(uplo, n, nrhs, a, lda, b, ldb, info)
DPOTRS