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.9 by jsr166, Mon Sep 20 20:42:37 2010 UTC vs.
Revision 1.12 by jsr166, Mon Nov 29 20:58:06 2010 UTC

# Line 26 | Line 26 | public final class Integrate {
26      static String forkArg = "dynamic";
27  
28      // the function to integrate
29 <    static double computeFunction(double x)  {
29 >    static double computeFunction(double x) {
30          return (x * x + 1.0) * x;
31      }
32  
# 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