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.8 by jsr166, Sat Oct 16 16:22:56 2010 UTC vs.
Revision 1.11 by dl, Mon Apr 9 13:18:06 2012 UTC

# Line 1 | Line 1
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/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7   // Jacobi iteration on a mesh. Based loosely on a Filaments demo
# 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 92 | Line 93 | public class FJJacobi {
93                  reinitialize();
94              }
95              double m = maxDiff;
96 <            return (md > m)? md : m;
96 >            return (md > m) ? md : m;
97          }
98  
99      }
# Line 118 | Line 119 | public class FJJacobi {
119  
120          public void compute() {
121              boolean AtoB = (steps++ & 1) == 0;
122 <            double[][] a = (AtoB)? A : B;
123 <            double[][] b = (AtoB)? B : A;
122 >            double[][] a = AtoB ? A : B;
123 >            double[][] b = AtoB ? B : A;
124  
125              double md = 0.0; // local for computing max diff
126  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines