119 INTEGER FUNCTION dlaneg( N, D, LLD, SIGMA, PIVMIN, R )
128 DOUBLE PRECISION PIVMIN, SIGMA
131 DOUBLE PRECISION D( * ), LLD( * )
137 DOUBLE PRECISION ZERO, ONE
138 parameter ( zero = 0.0d0, one = 1.0d0 )
145 parameter( blklen = 128 )
148 INTEGER BJ, J, NEG1, NEG2, NEGCNT
149 DOUBLE PRECISION BSAV, DMINUS, DPLUS, GAMMA, P, T, TMP
165 DO 210 bj = 1, r-1, blklen
168 DO 21 j = bj, min(bj+blklen-1, r-1)
170 IF( dplus.LT.zero ) neg1 = neg1 + 1
172 t = tmp * lld( j ) - sigma
182 DO 22 j = bj, min(bj+blklen-1, r-1)
184 IF( dplus.LT.zero ) neg1 = neg1 + 1
186 IF (disnan(tmp)) tmp = one
187 t = tmp * lld(j) - sigma
190 negcnt = negcnt + neg1
195 DO 230 bj = n-1, r, -blklen
198 DO 23 j = bj, max(bj-blklen+1, r), -1
199 dminus = lld( j ) + p
200 IF( dminus.LT.zero ) neg2 = neg2 + 1
202 p = tmp * d( j ) - sigma
210 DO 24 j = bj, max(bj-blklen+1, r), -1
211 dminus = lld( j ) + p
212 IF( dminus.LT.zero ) neg2 = neg2 + 1
214 IF (disnan(tmp)) tmp = one
215 p = tmp * d(j) - sigma
218 negcnt = negcnt + neg2
223 gamma = (t + sigma) + p
224 IF( gamma.LT.zero ) negcnt = negcnt+1
integer function dlaneg(N, D, LLD, SIGMA, PIVMIN, R)
DLANEG computes the Sturm count.