280 SUBROUTINE zsysvx( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
282 $ LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
291 INTEGER INFO, LDA, LDAF, LDB, LDX, LWORK, N, NRHS
292 DOUBLE PRECISION RCOND
296 DOUBLE PRECISION BERR( * ), FERR( * ), RWORK( * )
297 COMPLEX*16 A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
298 $ work( * ), x( ldx, * )
304 DOUBLE PRECISION ZERO
305 PARAMETER ( ZERO = 0.0d+0 )
308 LOGICAL LQUERY, NOFACT
310 DOUBLE PRECISION ANORM
315 DOUBLE PRECISION DLAMCH, ZLANSY
316 EXTERNAL lsame, ilaenv, dlamch, zlansy
330 nofact = lsame( fact,
'N' )
331 lquery = ( lwork.EQ.-1 )
332 IF( .NOT.nofact .AND. .NOT.lsame( fact,
'F' ) )
THEN
334 ELSE IF( .NOT.lsame( uplo,
'U' ) .AND.
335 $ .NOT.lsame( uplo,
'L' ) )
338 ELSE IF( n.LT.0 )
THEN
340 ELSE IF( nrhs.LT.0 )
THEN
342 ELSE IF( lda.LT.max( 1, n ) )
THEN
344 ELSE IF( ldaf.LT.max( 1, n ) )
THEN
346 ELSE IF( ldb.LT.max( 1, n ) )
THEN
348 ELSE IF( ldx.LT.max( 1, n ) )
THEN
350 ELSE IF( lwork.LT.max( 1, 2*n ) .AND. .NOT.lquery )
THEN
355 lwkopt = max( 1, 2*n )
357 nb = ilaenv( 1,
'ZSYTRF', uplo, n, -1, -1, -1 )
358 lwkopt = max( lwkopt, n*nb )
364 CALL xerbla(
'ZSYSVX', -info )
366 ELSE IF( lquery )
THEN
374 CALL zlacpy( uplo, n, n, a, lda, af, ldaf )
375 CALL zsytrf( uplo, n, af, ldaf, ipiv, work, lwork, info )
387 anorm = zlansy(
'I', uplo, n, a, lda, rwork )
391 CALL zsycon( uplo, n, af, ldaf, ipiv, anorm, rcond, work,
396 CALL zlacpy(
'Full', n, nrhs, b, ldb, x, ldx )
397 CALL zsytrs( uplo, n, nrhs, af, ldaf, ipiv, x, ldx, info )
402 CALL zsyrfs( uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x,
403 $ ldx, ferr, berr, work, rwork, info )
407 IF( rcond.LT.dlamch(
'Epsilon' ) )
subroutine zsyrfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
ZSYRFS
subroutine zsysvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, rwork, info)
ZSYSVX computes the solution to system of linear equations A * X = B for SY matrices
subroutine zlacpy(uplo, m, n, a, lda, b, ldb)
ZLACPY copies all or part of one two-dimensional array to another.