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

Comparing jsr166/src/test/loops/Heat.java (file contents):
Revision 1.8 by jsr166, Mon Aug 10 03:13:33 2015 UTC vs.
Revision 1.9 by jsr166, Sat Sep 12 19:09:00 2015 UTC

# Line 95 | Line 95 | public class Heat {
95      static final double dtdxsq = dt / (dx * dx);
96      static final double dtdysq = dt / (dy * dy);
97  
98 <
99 <    // the function being applied across the cells
98 >    /** the function being applied across the cells */
99      static final double f(double x, double y) {
100          return Math.sin(x) * Math.sin(y);
101      }
# Line 119 | Line 118 | public class Heat {
118          return Math.exp(-2*t) * Math.sin(x) * Math.sin(y);
119      }
120  
122
123
124
121      static final class Compute extends RecursiveAction {
122          final int lb;
123          final int ub;
# Line 149 | Line 145 | public class Heat {
145                  compstripe(oldm, newm);
146          }
147  
152
148          /** Updates all cells. */
149          final void compstripe(double[][] newMat, double[][] oldMat) {
150  
# Line 190 | Line 185 | public class Heat {
185              edges(newMat, llb, lub, tu + time * dt);
186          }
187  
188 <
194 <        // the original version from cilk
188 >        /** the original version from cilk */
189          final void origcompstripe(double[][] newMat, double[][] oldMat) {
190  
191              final int llb = (lb == 0)  ? 1 : lb;
# Line 210 | Line 204 | public class Heat {
204              edges(newMat, llb, lub,  tu + time * dt);
205          }
206  
213
207          /** Initializes all cells. */
208          final void init() {
209              final int llb = (lb == 0) ? 1 : lb;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines