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

Comparing jsr166/src/test/loops/FJJacobi.java (file contents):
Revision 1.10 by jsr166, Tue Mar 15 19:47:05 2011 UTC vs.
Revision 1.14 by dl, Sat Sep 12 18:34:50 2015 UTC

# Line 10 | Line 10 | import java.util.concurrent.*;
10  
11   public class FJJacobi {
12  
13 <    static final int DEFAULT_GRANULARITY = 4096; // 1024;
13 >    //    static final int DEFAULT_GRANULARITY = 4096;
14 >    static final int DEFAULT_GRANULARITY = 256;
15  
16      /**
17       * The maximum number of matrix cells
# Line 37 | Line 38 | public class FJJacobi {
38              return;
39          }
40  
41 <        ForkJoinPool fjp = new ForkJoinPool();
41 >        //        ForkJoinPool fjp = new ForkJoinPool(1);
42 >        ForkJoinPool fjp = ForkJoinPool.commonPool();
43  
44          // allocate enough space for edges
45          int dim = n+2;
# Line 73 | Line 75 | public class FJJacobi {
75  
76              System.out.println("Compute Time: " + secs);
77              System.out.println(fjp);
78 +            Thread.sleep(1000);
79          }
80      }
81  
79
82      abstract static class MatrixTree extends RecursiveAction {
83          // maximum difference between old and new values
84          double maxDiff;
# Line 94 | Line 96 | public class FJJacobi {
96              double m = maxDiff;
97              return (md > m) ? md : m;
98          }
97
99      }
100  
100
101      static final class LeafNode extends MatrixTree {
102          final double[][] A; // matrix to get old values from
103          final double[][] B; // matrix to put new values into
# Line 161 | Line 161 | public class FJJacobi {
161          }
162      }
163  
164
164      static final class TwoNode extends MatrixTree {
165          final MatrixTree q1;
166          final MatrixTree q2;
# Line 177 | Line 176 | public class FJJacobi {
176  
177      }
178  
180
179      static final class Driver extends RecursiveAction {
180          MatrixTree mat;
181          double[][] A; double[][] B;
# Line 249 | Line 247 | public class FJJacobi {
247              System.out.println("max diff after " + steps + " steps = " + md);
248          }
249      }
252
253
250   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines