303 SUBROUTINE cposvx( 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
317 REAL BERR( * ), FERR( * ), RWORK( * ), S( * )
318 COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
319 $ work( * ), x( ldx, * )
326 PARAMETER ( ZERO = 0.0e+0, one = 1.0e+0 )
329 LOGICAL EQUIL, NOFACT, RCEQU
331 REAL AMAX, ANORM, BIGNUM, SCOND, SMAX, SMIN, SMLNUM
336 EXTERNAL lsame, clanhe, slamch
348 nofact = lsame( fact,
'N' )
349 equil = lsame( fact,
'E' )
350 IF( nofact .OR. equil )
THEN
354 rcequ = lsame( equed,
'Y' )
355 smlnum = slamch(
'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(
'CPOSVX', -info )
412 CALL cpoequ( n, a, lda, s, scond, amax, infequ )
413 IF( infequ.EQ.0 )
THEN
417 CALL claqhe( 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 clacpy( uplo, n, n, a, lda, af, ldaf )
437 CALL cpotrf( uplo, n, af, ldaf, info )
449 anorm = clanhe(
'1', uplo, n, a, lda, rwork )
453 CALL cpocon( uplo, n, af, ldaf, anorm, rcond, work, rwork, info )
457 CALL clacpy(
'Full', n, nrhs, b, ldb, x, ldx )
458 CALL cpotrs( uplo, n, nrhs, af, ldaf, x, ldx, info )
463 CALL cporfs( 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.slamch(
'Epsilon' ) )
subroutine xerbla(srname, info)
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.
subroutine claqhe(uplo, n, a, lda, s, scond, amax, equed)
CLAQHE scales a Hermitian matrix.
subroutine cpocon(uplo, n, a, lda, anorm, rcond, work, rwork, info)
CPOCON
subroutine cpoequ(n, a, lda, s, scond, amax, info)
CPOEQU
subroutine cporfs(uplo, n, nrhs, a, lda, af, ldaf, b, ldb, x, ldx, ferr, berr, work, rwork, info)
CPORFS
subroutine cposvx(fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
CPOSVX computes the solution to system of linear equations A * X = B for PO matrices
subroutine cpotrf(uplo, n, a, lda, info)
CPOTRF
subroutine cpotrs(uplo, n, nrhs, a, lda, b, ldb, info)
CPOTRS