309 SUBROUTINE cppsvx( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, B, LDB,
310 $ X, LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
317 CHARACTER EQUED, FACT, UPLO
318 INTEGER INFO, LDB, LDX, N, NRHS
322 REAL BERR( * ), FERR( * ), RWORK( * ), S( * )
323 COMPLEX AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
331 parameter( zero = 0.0e+0, one = 1.0e+0 )
334 LOGICAL EQUIL, NOFACT, RCEQU
336 REAL AMAX, ANORM, BIGNUM, SCOND, SMAX, SMIN, SMLNUM
341 EXTERNAL lsame, clanhp, slamch
353 nofact = lsame( fact,
'N' )
354 equil = lsame( fact,
'E' )
355 IF( nofact .OR. equil )
THEN
359 rcequ = lsame( equed,
'Y' )
360 smlnum = slamch(
'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( lsame( fact,
'F' ) .AND. .NOT.
377 $ ( rcequ .OR. lsame( equed,
'N' ) ) )
THEN
384 smin = min( smin, s( j ) )
385 smax = max( smax, s( j ) )
387 IF( smin.LE.zero )
THEN
389 ELSE IF( n.GT.0 )
THEN
390 scond = max( smin, smlnum ) / min( smax, bignum )
396 IF( ldb.LT.max( 1, n ) )
THEN
398 ELSE IF( ldx.LT.max( 1, n ) )
THEN
405 CALL xerbla(
'CPPSVX', -info )
413 CALL cppequ( uplo, n, ap, s, scond, amax, infequ )
414 IF( infequ.EQ.0 )
THEN
418 CALL claqhp( uplo, n, ap, s, scond, amax, equed )
419 rcequ = lsame( equed,
'Y' )
428 b( i, j ) = s( i )*b( i, j )
433 IF( nofact .OR. equil )
THEN
437 CALL ccopy( n*( n+1 ) / 2, ap, 1, afp, 1 )
438 CALL cpptrf( uplo, n, afp, info )
450 anorm = clanhp(
'I', uplo, n, ap, rwork )
454 CALL cppcon( uplo, n, afp, anorm, rcond, work, rwork, info )
458 CALL clacpy(
'Full', n, nrhs, b, ldb, x, ldx )
459 CALL cpptrs( uplo, n, nrhs, afp, x, ldx, info )
464 CALL cpprfs( uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr,
465 $ work, rwork, info )
473 x( i, j ) = s( i )*x( i, j )
477 ferr( j ) = ferr( j ) / scond
483 IF( rcond.LT.slamch(
'Epsilon' ) )
subroutine xerbla(srname, info)
subroutine ccopy(n, cx, incx, cy, incy)
CCOPY
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.
subroutine claqhp(uplo, n, ap, s, scond, amax, equed)
CLAQHP scales a Hermitian matrix stored in packed form.
subroutine cppcon(uplo, n, ap, anorm, rcond, work, rwork, info)
CPPCON
subroutine cppequ(uplo, n, ap, s, scond, amax, info)
CPPEQU
subroutine cpprfs(uplo, n, nrhs, ap, afp, b, ldb, x, ldx, ferr, berr, work, rwork, info)
CPPRFS
subroutine cppsvx(fact, uplo, n, nrhs, ap, afp, equed, s, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
CPPSVX computes the solution to system of linear equations A * X = B for OTHER matrices
subroutine cpptrf(uplo, n, ap, info)
CPPTRF
subroutine cpptrs(uplo, n, nrhs, ap, b, ldb, info)
CPPTRS