275 SUBROUTINE zhpsvx( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
276 $ LDX, RCOND, FERR, BERR, WORK, RWORK, INFO )
284 INTEGER INFO, LDB, LDX, N, NRHS
285 DOUBLE PRECISION RCOND
289 DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
290 COMPLEX*16 AFP( * ), AP( * ), B( LDB, * ), WORK( * ),
297 DOUBLE PRECISION ZERO
298 parameter( zero = 0.0d+0 )
302 DOUBLE PRECISION ANORM
306 DOUBLE PRECISION DLAMCH, ZLANHP
307 EXTERNAL lsame, dlamch, zlanhp
321 nofact = lsame( fact,
'N' )
322 IF( .NOT.nofact .AND. .NOT.lsame( fact,
'F' ) )
THEN
324 ELSE IF( .NOT.lsame( uplo,
'U' ) .AND. .NOT.lsame( uplo,
'L' ) )
327 ELSE IF( n.LT.0 )
THEN
329 ELSE IF( nrhs.LT.0 )
THEN
331 ELSE IF( ldb.LT.max( 1, n ) )
THEN
333 ELSE IF( ldx.LT.max( 1, n ) )
THEN
337 CALL xerbla(
'ZHPSVX', -info )
345 CALL zcopy( n*( n+1 ) / 2, ap, 1, afp, 1 )
346 CALL zhptrf( uplo, n, afp, ipiv, info )
358 anorm = zlanhp(
'I', uplo, n, ap, rwork )
362 CALL zhpcon( uplo, n, afp, ipiv, anorm, rcond, work, info )
366 CALL zlacpy(
'Full', n, nrhs, b, ldb, x, ldx )
367 CALL zhptrs( uplo, n, nrhs, afp, ipiv, x, ldx, info )
372 CALL zhprfs( uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr,
373 $ berr, work, rwork, info )
377 IF( rcond.LT.dlamch(
'Epsilon' ) )
subroutine xerbla(srname, info)
subroutine zcopy(n, zx, incx, zy, incy)
ZCOPY
subroutine zhpcon(uplo, n, ap, ipiv, anorm, rcond, work, info)
ZHPCON
subroutine zhprfs(uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
ZHPRFS
subroutine zhpsvx(fact, uplo, n, nrhs, ap, afp, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
ZHPSVX computes the solution to system of linear equations A * X = B for OTHER matrices
subroutine zhptrf(uplo, n, ap, ipiv, info)
ZHPTRF
subroutine zhptrs(uplo, n, nrhs, ap, ipiv, b, ldb, info)
ZHPTRS
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.