283 SUBROUTINE ssysvx( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
284 $ ldb, x, ldx, rcond, ferr, berr, work, lwork,
294 INTEGER info, lda, ldaf, ldb, ldx, lwork, n, nrhs
298 INTEGER ipiv( * ), iwork( * )
299 REAL a( lda, * ), af( ldaf, * ),
b( ldb, * ),
300 $ berr( * ), ferr( * ), work( * ), x( ldx, * )
307 parameter( zero = 0.0e+0 )
310 LOGICAL lquery, nofact
331 nofact =
lsame( fact,
'N' )
332 lquery = ( lwork.EQ.-1 )
333 IF( .NOT.nofact .AND. .NOT.
lsame( fact,
'F' ) )
THEN
335 ELSE IF( .NOT.
lsame( uplo,
'U' ) .AND. .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, 3*n ) .AND. .NOT.lquery )
THEN
355 lwkopt = max( 1, 3*n )
357 nb =
ilaenv( 1,
'SSYTRF', uplo, n, -1, -1, -1 )
358 lwkopt = max( lwkopt, n*nb )
364 CALL
xerbla(
'SSYSVX', -info )
366 ELSE IF( lquery )
THEN
374 CALL
slacpy( uplo, n, n, a, lda, af, ldaf )
375 CALL
ssytrf( uplo, n, af, ldaf, ipiv, work, lwork, info )
387 anorm =
slansy(
'I', uplo, n, a, lda, work )
391 CALL
ssycon( uplo, n, af, ldaf, ipiv, anorm, rcond, work, iwork,
396 CALL
slacpy(
'Full', n, nrhs,
b, ldb, x, ldx )
397 CALL
ssytrs( uplo, n, nrhs, af, ldaf, ipiv, x, ldx, info )
402 CALL
ssyrfs( uplo, n, nrhs, a, lda, af, ldaf, ipiv,
b, ldb, x,
403 $ ldx, ferr, berr, work, iwork, info )
407 IF( rcond.LT.
slamch(
'Epsilon' ) )
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine ssysvx(FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK, IWORK, INFO)
SSYSVX computes the solution to system of linear equations A * X = B for SY matrices ...
set ue cd $ADTTMP cat<< EOF > tmp f Program LinearEquations Implicit none Real b(3) integer i
logical function lsame(CA, CB)
LSAME
subroutine ssyrfs(UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, X, LDX, FERR, BERR, WORK, IWORK, INFO)
SSYRFS
subroutine slacpy(UPLO, M, N, A, LDA, B, LDB)
SLACPY copies all or part of one two-dimensional array to another.
subroutine ssytrf(UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO)
SSYTRF
subroutine ssytrs(UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO)
SSYTRS
real function slamch(CMACH)
SLAMCH
real function slansy(NORM, UPLO, N, A, LDA, WORK)
SLANSY returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real symmetric matrix.
integer function ilaenv(ISPEC, NAME, OPTS, N1, N2, N3, N4)
subroutine ssycon(UPLO, N, A, LDA, IPIV, ANORM, RCOND, WORK, IWORK, INFO)
SSYCON