284 SUBROUTINE zhesvx( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
285 $ ldb, x, ldx, rcond, ferr, berr, work, lwork,
295 INTEGER INFO, LDA, LDAF, LDB, LDX, LWORK, N, NRHS
296 DOUBLE PRECISION RCOND
300 DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
301 COMPLEX*16 A( lda, * ), AF( ldaf, * ), B( ldb, * ),
302 $ work( * ), x( ldx, * )
308 DOUBLE PRECISION ZERO
309 parameter ( zero = 0.0d+0 )
312 LOGICAL LQUERY, NOFACT
314 DOUBLE PRECISION ANORM
319 DOUBLE PRECISION DLAMCH, ZLANHE
320 EXTERNAL lsame, ilaenv, dlamch, zlanhe
333 nofact = lsame( fact,
'N' )
334 lquery = ( lwork.EQ.-1 )
335 IF( .NOT.nofact .AND. .NOT.lsame( fact,
'F' ) )
THEN
337 ELSE IF( .NOT.lsame( uplo,
'U' ) .AND. .NOT.lsame( uplo,
'L' ) )
340 ELSE IF( n.LT.0 )
THEN
342 ELSE IF( nrhs.LT.0 )
THEN
344 ELSE IF( lda.LT.max( 1, n ) )
THEN
346 ELSE IF( ldaf.LT.max( 1, n ) )
THEN
348 ELSE IF( ldb.LT.max( 1, n ) )
THEN
350 ELSE IF( ldx.LT.max( 1, n ) )
THEN
352 ELSE IF( lwork.LT.max( 1, 2*n ) .AND. .NOT.lquery )
THEN
357 lwkopt = max( 1, 2*n )
359 nb = ilaenv( 1,
'ZHETRF', uplo, n, -1, -1, -1 )
360 lwkopt = max( lwkopt, n*nb )
366 CALL xerbla(
'ZHESVX', -info )
368 ELSE IF( lquery )
THEN
376 CALL zlacpy( uplo, n, n, a, lda, af, ldaf )
377 CALL zhetrf( uplo, n, af, ldaf, ipiv, work, lwork, info )
389 anorm = zlanhe(
'I', uplo, n, a, lda, rwork )
393 CALL zhecon( uplo, n, af, ldaf, ipiv, anorm, rcond, work, info )
397 CALL zlacpy(
'Full', n, nrhs, b, ldb, x, ldx )
398 CALL zhetrs( uplo, n, nrhs, af, ldaf, ipiv, x, ldx, info )
403 CALL zherfs( uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x,
404 $ ldx, ferr, berr, work, rwork, info )
408 IF( rcond.LT.dlamch(
'Epsilon' ) )
subroutine zlacpy(UPLO, M, N, A, LDA, B, LDB)
ZLACPY copies all or part of one two-dimensional array to another.
subroutine zherfs(UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, X, LDX, FERR, BERR, WORK, RWORK, INFO)
ZHERFS
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine zhetrf(UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
ZHETRF
subroutine zhesvx(FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK, RWORK, INFO)
ZHESVX computes the solution to system of linear equations A * X = B for HE matrices ...
subroutine zhetrs(UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO)
ZHETRS
subroutine zhecon(UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK, INFO)
ZHECON