279 SUBROUTINE dsysvx( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV,
281 $ LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
290 INTEGER INFO, LDA, LDAF, LDB, LDX, LWORK, N, NRHS
291 DOUBLE PRECISION RCOND
294 INTEGER IPIV( * ), IWORK( * )
295 DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
296 $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
302 DOUBLE PRECISION ZERO
303 PARAMETER ( ZERO = 0.0d+0 )
306 LOGICAL LQUERY, NOFACT
307 INTEGER LWKMIN, LWKOPT, NB
308 DOUBLE PRECISION ANORM
313 DOUBLE PRECISION DLAMCH, DLANSY
314 EXTERNAL lsame, ilaenv, dlamch, dlansy
328 nofact = lsame( fact,
'N' )
329 lquery = ( lwork.EQ.-1 )
330 lwkmin = max( 1, 3*n )
331 IF( .NOT.nofact .AND. .NOT.lsame( fact,
'F' ) )
THEN
333 ELSE IF( .NOT.lsame( uplo,
'U' ) .AND.
334 $ .NOT.lsame( uplo,
'L' ) )
337 ELSE IF( n.LT.0 )
THEN
339 ELSE IF( nrhs.LT.0 )
THEN
341 ELSE IF( lda.LT.max( 1, n ) )
THEN
343 ELSE IF( ldaf.LT.max( 1, n ) )
THEN
345 ELSE IF( ldb.LT.max( 1, n ) )
THEN
347 ELSE IF( ldx.LT.max( 1, n ) )
THEN
349 ELSE IF( lwork.LT.lwkmin .AND. .NOT.lquery )
THEN
356 nb = ilaenv( 1,
'DSYTRF', uplo, n, -1, -1, -1 )
357 lwkopt = max( lwkopt, n*nb )
363 CALL xerbla(
'DSYSVX', -info )
365 ELSE IF( lquery )
THEN
373 CALL dlacpy( uplo, n, n, a, lda, af, ldaf )
374 CALL dsytrf( uplo, n, af, ldaf, ipiv, work, lwork, info )
386 anorm = dlansy(
'I', uplo, n, a, lda, work )
390 CALL dsycon( uplo, n, af, ldaf, ipiv, anorm, rcond, work,
396 CALL dlacpy(
'Full', n, nrhs, b, ldb, x, ldx )
397 CALL dsytrs( uplo, n, nrhs, af, ldaf, ipiv, x, ldx, info )
402 CALL dsyrfs( uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x,
403 $ ldx, ferr, berr, work, iwork, info )
407 IF( rcond.LT.dlamch(
'Epsilon' ) )
subroutine dsyrfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
DSYRFS
subroutine dsysvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, iwork, info)
DSYSVX computes the solution to system of linear equations A * X = B for SY matrices