53 |
|
} |
54 |
|
|
55 |
|
static void oneTest(int nthreads, int iters) throws Exception { |
56 |
< |
int fairIters = (nthreads <= 1)? iters : iters/20; |
56 |
> |
int fairIters = (nthreads <= 1) ? iters : iters/20; |
57 |
|
int v = rng.next(); |
58 |
|
|
59 |
|
if (print) |
155 |
|
if (print) { |
156 |
|
long tpi = time / (iters * nthreads); |
157 |
|
System.out.print("\t" + LoopHelpers.rightJustify(tpi) + " ns per update"); |
158 |
< |
// double secs = (double)(time) / 1000000000.0; |
158 |
> |
// double secs = (double) time / 1000000000.0; |
159 |
|
// System.out.print("\t " + secs + "s run time"); |
160 |
|
System.out.println(); |
161 |
|
} |
201 |
|
int sum = 0; |
202 |
|
int x = 0; |
203 |
|
while (n-- > 0) { |
204 |
< |
synchronized(this) { |
204 |
> |
synchronized (this) { |
205 |
|
x = setValue(LoopHelpers.compute1(getValue())); |
206 |
|
} |
207 |
|
sum += LoopHelpers.compute2(x); |