147 DOUBLE PRECISION FUNCTION dla_syrcond( UPLO, N, A, LDA, AF, LDAF,
148 $ ipiv, cmode, c, info, work,
158 INTEGER N, LDA, LDAF, INFO, CMODE
161 INTEGER IWORK( * ), IPIV( * )
162 DOUBLE PRECISION A( lda, * ), AF( ldaf, * ), WORK( * ), C( * )
170 DOUBLE PRECISION AINVNM, SMLNUM, TMP
178 DOUBLE PRECISION DLAMCH
179 EXTERNAL lsame, dlamch
194 ELSE IF( lda.LT.max( 1, n ) )
THEN
196 ELSE IF( ldaf.LT.max( 1, n ) )
THEN
200 CALL xerbla(
'DLA_SYRCOND', -info )
208 IF ( lsame( uplo,
'U' ) ) up = .true.
216 IF ( cmode .EQ. 1 )
THEN
218 tmp = tmp + abs( a( j, i ) * c( j ) )
221 tmp = tmp + abs( a( i, j ) * c( j ) )
223 ELSE IF ( cmode .EQ. 0 )
THEN
225 tmp = tmp + abs( a( j, i ) )
228 tmp = tmp + abs( a( i, j ) )
232 tmp = tmp + abs( a( j, i ) / c( j ) )
235 tmp = tmp + abs( a( i, j ) / c( j ) )
243 IF ( cmode .EQ. 1 )
THEN
245 tmp = tmp + abs( a( i, j ) * c( j ) )
248 tmp = tmp + abs( a( j, i ) * c( j ) )
250 ELSE IF ( cmode .EQ. 0 )
THEN
252 tmp = tmp + abs( a( i, j ) )
255 tmp = tmp + abs( a( j, i ) )
259 tmp = tmp + abs( a( i, j) / c( j ) )
262 tmp = tmp + abs( a( j, i) / c( j ) )
271 smlnum = dlamch(
'Safe minimum' )
277 CALL dlacn2( n, work( n+1 ), work, iwork, ainvnm, kase, isave )
284 work( i ) = work( i ) * work( 2*n+i )
288 CALL dsytrs(
'U', n, 1, af, ldaf, ipiv, work, n, info )
290 CALL dsytrs(
'L', n, 1, af, ldaf, ipiv, work, n, info )
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 )
308 IF ( cmode .EQ. 1 )
THEN
310 work( i ) = work( i ) / c( i )
312 ELSE IF ( cmode .EQ. -1 )
THEN
314 work( i ) = work( i ) * c( i )
319 CALL dsytrs(
'U', n, 1, af, ldaf, ipiv, work, n, info )
321 CALL dsytrs(
'L', n, 1, af, ldaf, ipiv, work, n, info )
327 work( i ) = work( i ) * work( 2*n+i )
336 IF( ainvnm .NE. 0.0d+0 )
double precision function dla_syrcond(UPLO, N, A, LDA, AF, LDAF, IPIV, CMODE, C, INFO, WORK, IWORK)
DLA_SYRCOND estimates the Skeel condition number for a symmetric indefinite matrix.
subroutine dlacn2(N, V, X, ISGN, EST, KASE, ISAVE)
DLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vec...
subroutine xerbla(SRNAME, INFO)
XERBLA
subroutine dsytrs(UPLO, N, NRHS, A, LDA, IPIV, B, LDB, INFO)
DSYTRS