140 REAL FUNCTION sla_porcond( UPLO, N, A, LDA, AF, LDAF, CMODE, C,
141 $ info, work, iwork )
150 INTEGER N, LDA, LDAF, INFO, CMODE
151 REAL A( lda, * ), AF( ldaf, * ), WORK( * ),
171 EXTERNAL lsame, isamax
188 CALL xerbla(
'SLA_PORCOND', -info )
197 IF ( lsame( uplo,
'U' ) ) up = .true.
205 IF ( cmode .EQ. 1 )
THEN
207 tmp = tmp + abs( a( j, i ) * c( j ) )
210 tmp = tmp + abs( a( i, j ) * c( j ) )
212 ELSE IF ( cmode .EQ. 0 )
THEN
214 tmp = tmp + abs( a( j, i ) )
217 tmp = tmp + abs( a( i, j ) )
221 tmp = tmp + abs( a( j ,i ) / c( j ) )
224 tmp = tmp + abs( a( i, j ) / c( j ) )
232 IF ( cmode .EQ. 1 )
THEN
234 tmp = tmp + abs( a( i, j ) * c( j ) )
237 tmp = tmp + abs( a( j, i ) * c( j ) )
239 ELSE IF ( cmode .EQ. 0 )
THEN
241 tmp = tmp + abs( a( i, j ) )
244 tmp = tmp + abs( a( j, i ) )
248 tmp = tmp + abs( a( i, j ) / c( j ) )
251 tmp = tmp + abs( a( j, i ) / c( j ) )
264 CALL slacn2( n, work( n+1 ), work, iwork, ainvnm, kase, isave )
271 work( i ) = work( i ) * work( 2*n+i )
275 CALL spotrs(
'Upper', n, 1, af, ldaf, work, n, info )
277 CALL spotrs(
'Lower', n, 1, af, ldaf, work, n, info )
282 IF ( cmode .EQ. 1 )
THEN
284 work( i ) = work( i ) / c( i )
286 ELSE IF ( cmode .EQ. -1 )
THEN
288 work( i ) = work( i ) * c( i )
295 IF ( cmode .EQ. 1 )
THEN
297 work( i ) = work( i ) / c( i )
299 ELSE IF ( cmode .EQ. -1 )
THEN
301 work( i ) = work( i ) * c( i )
306 CALL spotrs(
'Upper', n, 1, af, ldaf, work, n, info )
308 CALL spotrs(
'Lower', n, 1, af, ldaf, work, n, info )
314 work( i ) = work( i ) * work( 2*n+i )
322 IF( ainvnm .NE. 0.0 )
real function sla_porcond(UPLO, N, A, LDA, AF, LDAF, CMODE, C, INFO, WORK, IWORK)
SLA_PORCOND estimates the Skeel condition number for a symmetric positive-definite matrix...
subroutine xerbla(SRNAME, INFO)
XERBLA
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...
subroutine spotrs(UPLO, N, NRHS, A, LDA, B, LDB, INFO)
SPOTRS