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

Comparing jsr166/src/test/loops/LeftSpineFib.java (file contents):
Revision 1.1 by dl, Sun Sep 19 12:55:37 2010 UTC vs.
Revision 1.4 by jsr166, Wed Jul 4 20:07:02 2012 UTC

# Line 1 | Line 1
1
1   import java.util.*;
2   import java.util.concurrent.*;
3  
# Line 7 | Line 6 | public final class LeftSpineFib extends
6      // Performance-tuning constant:
7      static int sequentialThreshold;
8      static long lastStealCount;
9 <  
9 >
10      public static void main(String[] args) throws Exception {
11          int procs = 0;
12          int num = 45;
# Line 17 | Line 16 | public final class LeftSpineFib extends
16                  procs = Integer.parseInt(args[0]);
17              if (args.length > 1)
18                  num = Integer.parseInt(args[1]);
19 <            if (args.length > 2)
19 >            if (args.length > 2)
20                  sequentialThreshold = Integer.parseInt(args[2]);
21          }
22          catch (Exception e) {
# Line 25 | Line 24 | public final class LeftSpineFib extends
24              return;
25          }
26  
27 <        
27 >
28          for (int reps = 0; reps < 2; ++reps) {
29 <            ForkJoinPool g = procs == 0? new ForkJoinPool() :
29 >            ForkJoinPool g = (procs == 0) ? new ForkJoinPool() :
30                  new ForkJoinPool(procs);
31              //            g.setMaintainsParallelism(false);
32              lastStealCount = g.getStealCount();
# Line 121 | Line 120 | public final class LeftSpineFib extends
120      }
121  
122   }
124

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines