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

Comparing jsr166/src/test/loops/Integrate.java (file contents):
Revision 1.10 by jsr166, Sat Oct 16 16:22:56 2010 UTC vs.
Revision 1.13 by jsr166, Tue Mar 15 19:47:05 2011 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7   import java.util.concurrent.*;
# Line 63 | Line 63 | public final class Integrate {
63      }
64  
65      static void oneTest(int procs) {
66 <        ForkJoinPool g = procs == 0? new ForkJoinPool() :
66 >        ForkJoinPool g = (procs == 0) ? new ForkJoinPool() :
67              new ForkJoinPool(procs);
68          System.out.println("Number of procs=" + g.getParallelism());
69          System.out.println("Integrating from " + start + " to " + end +
# Line 169 | Line 169 | public final class Integrate {
169              q.fork();
170              ar = recEval(c, r, fc, fr, ar);
171              if (!q.tryUnfork()) {
172                //                q.quietlyHelpJoin();
172                  q.quietlyJoin();
173                  return ar + q.area;
174              }
# Line 218 | Line 217 | public final class Integrate {
217                  (q = new DQuad(l, c, al)).fork();
218              ar = recEval(c, r, fc, fr, ar);
219              if (q != null && !q.tryUnfork()) {
221                //                q.quietlyHelpJoin();
220                  q.quietlyJoin();
221                  return ar + q.area;
222              }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines