303 SUBROUTINE zposvx( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
304 $ S, B, LDB, X, LDX, RCOND, FERR, BERR, WORK,
312 CHARACTER EQUED, FACT, UPLO
313 INTEGER INFO, LDA, LDAF, LDB, LDX, N, NRHS
314 DOUBLE PRECISION RCOND
317 DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * ), S( * )
318 COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
319 $ work( * ), x( ldx, * )
325 DOUBLE PRECISION ZERO, ONE
326 PARAMETER ( ZERO = 0.0d+0, one = 1.0d+0 )
329 LOGICAL EQUIL, NOFACT, RCEQU
331 DOUBLE PRECISION AMAX, ANORM, BIGNUM, SCOND, SMAX, SMIN, SMLNUM
335 DOUBLE PRECISION DLAMCH, ZLANHE
336 EXTERNAL lsame, dlamch, zlanhe
348 nofact = lsame( fact,
'N' )
349 equil = lsame( fact,
'E' )
350 IF( nofact .OR. equil )
THEN
354 rcequ = lsame( equed,
'Y' )
355 smlnum = dlamch(
'Safe minimum' )
356 bignum = one / smlnum
361 IF( .NOT.nofact .AND. .NOT.equil .AND. .NOT.lsame( fact,
'F' ) )
364 ELSE IF( .NOT.lsame( uplo,
'U' ) .AND. .NOT.lsame( uplo,
'L' ) )
367 ELSE IF( n.LT.0 )
THEN
369 ELSE IF( nrhs.LT.0 )
THEN
371 ELSE IF( lda.LT.max( 1, n ) )
THEN
373 ELSE IF( ldaf.LT.max( 1, n ) )
THEN
375 ELSE IF( lsame( fact,
'F' ) .AND. .NOT.
376 $ ( rcequ .OR. lsame( equed,
'N' ) ) )
THEN
383 smin = min( smin, s( j ) )
384 smax = max( smax, s( j ) )
386 IF( smin.LE.zero )
THEN
388 ELSE IF( n.GT.0 )
THEN
389 scond = max( smin, smlnum ) / min( smax, bignum )
395 IF( ldb.LT.max( 1, n ) )
THEN
397 ELSE IF( ldx.LT.max( 1, n ) )
THEN
404 CALL xerbla(
'ZPOSVX', -info )
412 CALL zpoequ( n, a, lda, s, scond, amax, infequ )
413 IF( infequ.EQ.0 )
THEN
417 CALL zlaqhe( uplo, n, a, lda, s, scond, amax, equed )
418 rcequ = lsame( equed,
'Y' )
427 b( i, j ) = s( i )*b( i, j )
432 IF( nofact .OR. equil )
THEN
436 CALL zlacpy( uplo, n, n, a, lda, af, ldaf )
437 CALL zpotrf( uplo, n, af, ldaf, info )
449 anorm = zlanhe(
'1', uplo, n, a, lda, rwork )
453 CALL zpocon( uplo, n, af, ldaf, anorm, rcond, work, rwork, info )
457 CALL zlacpy(
'Full', n, nrhs, b, ldb, x, ldx )
458 CALL zpotrs( uplo, n, nrhs, af, ldaf, x, ldx, info )
463 CALL zporfs( uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx,
464 $ ferr, berr, work, rwork, info )
472 x( i, j ) = s( i )*x( i, j )
476 ferr( j ) = ferr( j ) / scond
482 IF( rcond.LT.dlamch(
'Epsilon' ) )
subroutine xerbla(srname, info)
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zlaqhe(uplo, n, a, lda, s, scond, amax, equed)
ZLAQHE scales a Hermitian matrix.
subroutine zpocon(uplo, n, a, lda, anorm, rcond, work, rwork, info)
ZPOCON
subroutine zpoequ(n, a, lda, s, scond, amax, info)
ZPOEQU
subroutine zporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, rwork, info)
ZPORFS
subroutine zposvx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
ZPOSVX computes the solution to system of linear equations A * X = B for PO matrices
subroutine zpotrf(uplo, n, a, lda, info)
ZPOTRF
subroutine zpotrs(uplo, n, nrhs, a, lda, b, ldb, info)
ZPOTRS