30 |
|
System.out.println("Usage: java FJSums threads n reps"); |
31 |
|
return; |
32 |
|
} |
33 |
< |
ForkJoinPool g = procs == 0? new ForkJoinPool() : |
33 |
> |
ForkJoinPool g = (procs == 0) ? new ForkJoinPool() : |
34 |
|
new ForkJoinPool(procs); |
35 |
|
System.out.println("Number of procs=" + g.getParallelism()); |
36 |
|
// for now hardwire Cumulate threshold to 8 * #CPUs leaf tasks |
255 |
|
par.out = par.left.out + par.right.out; |
256 |
|
int refork = |
257 |
|
((pb & CUMULATE) == 0 && |
258 |
< |
par.lo == 0)? CUMULATE : 0; |
258 |
> |
par.lo == 0) ? CUMULATE : 0; |
259 |
|
int nextPhase = pb|cb|refork; |
260 |
|
if (pb == nextPhase || |
261 |
|
phaseUpdater.compareAndSet(par, pb, nextPhase)) { |