29 |
|
|
30 |
|
|
31 |
|
for (int reps = 0; reps < 2; ++reps) { |
32 |
< |
ForkJoinPool g = procs == 0? new ForkJoinPool() : |
32 |
> |
ForkJoinPool g = (procs == 0) ? |
33 |
> |
new ForkJoinPool() : |
34 |
|
new ForkJoinPool(procs); |
35 |
|
lastStealCount = g.getStealCount(); |
36 |
|
for (int i = 0; i < 10; ++i) { |
47 |
|
DynamicLeftSpineFib f = new DynamicLeftSpineFib(num, null); |
48 |
|
g.invoke(f); |
49 |
|
long time = System.currentTimeMillis() - start; |
50 |
< |
double secs = ((double)time) / 1000.0; |
50 |
> |
double secs = (double) time / 1000.0; |
51 |
|
long result = f.getAnswer(); |
52 |
|
System.out.print("DynamicLeftSpineFib " + num + " = " + result); |
53 |
|
System.out.printf("\tTime: %7.3f", secs); |