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

Comparing jsr166/src/test/loops/FJPhaserJacobi.java (file contents):
Revision 1.12 by jsr166, Mon Aug 10 03:13:33 2015 UTC vs.
Revision 1.13 by dl, Sat Sep 12 18:37:19 2015 UTC

# Line 13 | Line 13 | public class FJPhaserJacobi {
13  
14      static final double EPSILON = 0.0001;  // convergence criterion
15  
16 <    public static void main(String[] args) {
16 >    public static void main(String[] args) throws Exception {
17          int n = 2048;
18          int steps = 1000;
19          try {
# Line 28 | Line 28 | public class FJPhaserJacobi {
28              return;
29          }
30  
31 <        ForkJoinPool fjp = new ForkJoinPool();
31 >        //        ForkJoinPool fjp = new ForkJoinPool();
32 >        ForkJoinPool fjp = ForkJoinPool.commonPool();
33 >
34          //        int granularity = (n * n / fjp.getParallelism()) / 2;
35          int granularity = n * n / fjp.getParallelism();
36          dimGran = (int)(Math.sqrt(granularity));
# Line 44 | Line 46 | public class FJPhaserJacobi {
46              for (int j = 1; j < dim-1; ++j)
47                  a[i][j] = smallVal;
48          }
49 <        int nreps = 3;
49 >        int nreps = 10;
50          for (int rep = 0; rep < nreps; ++rep) {
51              // Fill all edges with 1's.
52              for (int k = 0; k < dim; ++k) {
# Line 62 | Line 64 | public class FJPhaserJacobi {
64  
65              System.out.println("Compute Time: " + secs);
66              System.out.println(fjp);
67 +            Thread.sleep(1000);
68          }
69      }
70  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines