150 REAL FUNCTION sla_gercond ( TRANS, N, A, LDA, AF, LDAF, IPIV,
151 $ cmode, c, info, work, iwork )
160 INTEGER N, LDA, LDAF, INFO, CMODE
163 INTEGER IPIV( * ), IWORK( * )
164 REAL A( lda, * ), AF( ldaf, * ), WORK( * ),
193 notrans = lsame( trans,
'N' )
194 IF ( .NOT. notrans .AND. .NOT. lsame(trans,
'T')
195 $ .AND. .NOT. lsame(trans,
'C') )
THEN
197 ELSE IF( n.LT.0 )
THEN
199 ELSE IF( lda.LT.max( 1, n ) )
THEN
201 ELSE IF( ldaf.LT.max( 1, n ) )
THEN
205 CALL xerbla(
'SLA_GERCOND', -info )
219 IF ( cmode .EQ. 1 )
THEN
221 tmp = tmp + abs( a( i, j ) * c( j ) )
223 ELSE IF ( cmode .EQ. 0 )
THEN
225 tmp = tmp + abs( a( i, j ) )
229 tmp = tmp + abs( a( i, j ) / c( j ) )
237 IF ( cmode .EQ. 1 )
THEN
239 tmp = tmp + abs( a( j, i ) * c( j ) )
241 ELSE IF ( cmode .EQ. 0 )
THEN
243 tmp = tmp + abs( a( j, i ) )
247 tmp = tmp + abs( a( j, i ) / c( j ) )
260 CALL slacn2( n, work( n+1 ), work, iwork, ainvnm, kase, isave )
267 work(i) = work(i) * work(2*n+i)
271 CALL sgetrs(
'No transpose', n, 1, af, ldaf, ipiv,
274 CALL sgetrs(
'Transpose', n, 1, af, ldaf, ipiv,
280 IF ( cmode .EQ. 1 )
THEN
282 work( i ) = work( i ) / c( i )
284 ELSE IF ( cmode .EQ. -1 )
THEN
286 work( i ) = work( i ) * c( i )
293 IF ( cmode .EQ. 1 )
THEN
295 work( i ) = work( i ) / c( i )
297 ELSE IF ( cmode .EQ. -1 )
THEN
299 work( i ) = work( i ) * c( i )
304 CALL sgetrs(
'Transpose', n, 1, af, ldaf, ipiv,
307 CALL sgetrs(
'No transpose', n, 1, af, ldaf, ipiv,
314 work( i ) = work( i ) * work( 2*n+i )
322 IF( ainvnm .NE. 0.0 )
subroutine sgetrs(TRANS, N, NRHS, A, LDA, IPIV, B, LDB, INFO)
SGETRS
subroutine xerbla(SRNAME, INFO)
XERBLA
real function sla_gercond(TRANS, N, A, LDA, AF, LDAF, IPIV, CMODE, C, INFO, WORK, IWORK)
SLA_GERCOND estimates the Skeel condition number for a general 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...