282 SUBROUTINE csysvx( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, IPIV, B,
283 $ LDB, X, LDX, RCOND, FERR, BERR, WORK, LWORK,
292 INTEGER INFO, LDA, LDAF, LDB, LDX, LWORK, N, NRHS
297 REAL BERR( * ), FERR( * ), RWORK( * )
298 COMPLEX A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
299 $ work( * ), x( ldx, * )
306 PARAMETER ( ZERO = 0.0e+0 )
309 LOGICAL LQUERY, NOFACT
316 REAL CLANSY, SLAMCH, SROUNDUP_LWORK
317 EXTERNAL ilaenv, lsame, clansy, slamch, sroundup_lwork
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. .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.max( 1, 2*n ) .AND. .NOT.lquery )
THEN
354 lwkopt = max( 1, 2*n )
356 nb = ilaenv( 1,
'CSYTRF', uplo, n, -1, -1, -1 )
357 lwkopt = max( lwkopt, n*nb )
359 work( 1 ) = sroundup_lwork(lwkopt)
363 CALL xerbla(
'CSYSVX', -info )
365 ELSE IF( lquery )
THEN
373 CALL clacpy( uplo, n, n, a, lda, af, ldaf )
374 CALL csytrf( uplo, n, af, ldaf, ipiv, work, lwork, info )
386 anorm = clansy(
'I', uplo, n, a, lda, rwork )
390 CALL csycon( uplo, n, af, ldaf, ipiv, anorm, rcond, work, info )
394 CALL clacpy(
'Full', n, nrhs, b, ldb, x, ldx )
395 CALL csytrs( uplo, n, nrhs, af, ldaf, ipiv, x, ldx, info )
400 CALL csyrfs( uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x,
401 $ ldx, ferr, berr, work, rwork, info )
405 IF( rcond.LT.slamch(
'Epsilon' ) )
408 work( 1 ) = sroundup_lwork(lwkopt)
subroutine xerbla(srname, info)
subroutine csycon(uplo, n, a, lda, ipiv, anorm, rcond, work, info)
CSYCON
subroutine csyrfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, rwork, info)
CSYRFS
subroutine csysvx(fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, lwork, rwork, info)
CSYSVX computes the solution to system of linear equations A * X = B for SY matrices
subroutine csytrf(uplo, n, a, lda, ipiv, work, lwork, info)
CSYTRF
subroutine csytrs(uplo, n, nrhs, a, lda, ipiv, b, ldb, info)
CSYTRS
subroutine clacpy(uplo, m, n, a, lda, b, ldb)
CLACPY copies all or part of one two-dimensional array to another.