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.3 by jsr166, Thu Oct 29 23:16:47 2009 UTC vs.
Revision 1.10 by jsr166, Sat Feb 16 21:37:44 2013 UTC

# Line 1 | Line 1
1 < // Barrier version of Jacobi iteration
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/publicdomain/zero/1.0/
5 > */
6  
7   import java.util.concurrent.*;
4 //import jsr166y.*;
8  
9 + /** Barrier version of Jacobi iteration */
10   public class FJPhaserJacobi {
11  
12      static int dimGran;
# Line 20 | Line 24 | public class FJPhaserJacobi {
24          }
25  
26          catch (Exception e) {
27 <            System.out.println("Usage: java FJPhaserJacobi <matrix size> <max steps>");
27 >            System.out.println("Usage: java ThreadPhaserJacobi <matrix size> <max steps>");
28              return;
29          }
30  
31          ForkJoinPool fjp = new ForkJoinPool();
32 +        //        int granularity = (n * n / fjp.getParallelism()) / 2;
33          int granularity = n * n / fjp.getParallelism();
34          dimGran = (int)(Math.sqrt(granularity));
35  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines