ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/FJSums.java
(Generate patch)

Comparing jsr166/src/test/loops/FJSums.java (file contents):
Revision 1.2 by jsr166, Mon Sep 20 20:42:37 2010 UTC vs.
Revision 1.3 by jsr166, Fri Oct 22 05:18:31 2010 UTC

# Line 30 | Line 30 | public class FJSums {
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
# Line 255 | Line 255 | public class FJSums {
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)) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines