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.9 by jsr166, Fri Oct 22 05:18:31 2010 UTC vs.
Revision 1.13 by jsr166, Mon Aug 10 03:13:33 2015 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 76 | Line 77 | public class FJJacobi {
77          }
78      }
79  
79
80      abstract static class MatrixTree extends RecursiveAction {
81          // maximum difference between old and new values
82          double maxDiff;
# Line 94 | Line 94 | public class FJJacobi {
94              double m = maxDiff;
95              return (md > m) ? md : m;
96          }
97
97      }
98  
100
99      static final class LeafNode extends MatrixTree {
100          final double[][] A; // matrix to get old values from
101          final double[][] B; // matrix to put new values into
# Line 161 | Line 159 | public class FJJacobi {
159          }
160      }
161  
164
162      static final class TwoNode extends MatrixTree {
163          final MatrixTree q1;
164          final MatrixTree q2;
# Line 177 | Line 174 | public class FJJacobi {
174  
175      }
176  
180
177      static final class Driver extends RecursiveAction {
178          MatrixTree mat;
179          double[][] A; double[][] B;
# Line 249 | Line 245 | public class FJJacobi {
245              System.out.println("max diff after " + steps + " steps = " + md);
246          }
247      }
252
253
248   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines