279 SUBROUTINE ssysvx( 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
294 INTEGER IPIV( * ), IWORK( * )
295 REAL A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
296 $ BERR( * ), FERR( * ), WORK( * ), X( LDX, * )
303 PARAMETER ( ZERO = 0.0e+0 )
306 LOGICAL LQUERY, NOFACT
307 INTEGER LWKMIN, LWKOPT, NB
313 REAL SLAMCH, SLANSY, SROUNDUP_LWORK
314 EXTERNAL ilaenv, lsame, slamch,
315 $ slansy, sroundup_lwork
329 nofact = lsame( fact,
'N' )
330 lquery = ( lwork.EQ.-1 )
331 lwkmin = max( 1, 3*n )
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.lwkmin .AND. .NOT.lquery )
THEN
357 nb = ilaenv( 1,
'SSYTRF', uplo, n, -1, -1, -1 )
358 lwkopt = max( lwkopt, n*nb )
360 work( 1 ) = sroundup_lwork(lwkopt)
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,
397 CALL slacpy(
'Full', n, nrhs, b, ldb, x, ldx )
398 CALL ssytrs( uplo, n, nrhs, af, ldaf, ipiv, x, ldx, info )
403 CALL ssyrfs( uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x,
404 $ ldx, ferr, berr, work, iwork, info )
408 IF( rcond.LT.slamch(
'Epsilon' ) )
411 work( 1 ) = sroundup_lwork(lwkopt)
subroutine ssyrfs(uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb, x, ldx, ferr, berr, work, iwork, info)
SSYRFS
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