144 $ c, info, work, iwork )
152 INTEGER n, lda, ldaf, info, cmode
155 INTEGER iwork( * ), ipiv( * )
156 REAL a( lda, * ), af( ldaf, * ), work( * ), c( * )
164 REAL ainvnm, smlnum, tmp
188 ELSE IF( lda.LT.max( 1, n ) )
THEN
190 ELSE IF( ldaf.LT.max( 1, n ) )
THEN
194 CALL xerbla(
'SLA_SYRCOND', -info )
202 IF (
lsame( uplo,
'U' ) ) up = .true.
210 IF ( cmode .EQ. 1 )
THEN
212 tmp = tmp + abs( a( j, i ) * c( j ) )
215 tmp = tmp + abs( a( i, j ) * c( j ) )
217 ELSE IF ( cmode .EQ. 0 )
THEN
219 tmp = tmp + abs( a( j, i ) )
222 tmp = tmp + abs( a( i, j ) )
226 tmp = tmp + abs( a( j, i ) / c( j ) )
229 tmp = tmp + abs( a( i, j ) / c( j ) )
237 IF ( cmode .EQ. 1 )
THEN
239 tmp = tmp + abs( a( i, j ) * c( j ) )
242 tmp = tmp + abs( a( j, i ) * c( j ) )
244 ELSE IF ( cmode .EQ. 0 )
THEN
246 tmp = tmp + abs( a( i, j ) )
249 tmp = tmp + abs( a( j, i ) )
253 tmp = tmp + abs( a( i, j) / c( j ) )
256 tmp = tmp + abs( a( j, i) / c( j ) )
265 smlnum =
slamch(
'Safe minimum' )
271 CALL slacn2( n, work( n+1 ), work, iwork, ainvnm, kase, isave )
278 work( i ) = work( i ) * work( 2*n+i )
282 CALL ssytrs(
'U', n, 1, af, ldaf, ipiv, work, n,
285 CALL ssytrs(
'L', n, 1, af, ldaf, ipiv, work, n,
291 IF ( cmode .EQ. 1 )
THEN
293 work( i ) = work( i ) / c( i )
295 ELSE IF ( cmode .EQ. -1 )
THEN
297 work( i ) = work( i ) * c( i )
304 IF ( cmode .EQ. 1 )
THEN
306 work( i ) = work( i ) / c( i )
308 ELSE IF ( cmode .EQ. -1 )
THEN
310 work( i ) = work( i ) * c( i )
315 CALL ssytrs(
'U', n, 1, af, ldaf, ipiv, work, n,
318 CALL ssytrs(
'L', n, 1, af, ldaf, ipiv, work, n,
325 work( i ) = work( i ) * work( 2*n+i )
334 IF( ainvnm .NE. 0.0 )
real function sla_syrcond(uplo, n, a, lda, af, ldaf, ipiv, cmode, c, info, work, iwork)
SLA_SYRCOND estimates the Skeel condition number for a symmetric indefinite matrix.
subroutine slacn2(n, v, x, isgn, est, kase, isave)
SLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...