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.9 by jsr166, Wed Jul 4 20:07:01 2012 UTC vs.
Revision 1.12 by jsr166, Mon Aug 10 03:13:33 2015 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.*;
8  
9 + /** Barrier version of Jacobi iteration */
10   public class FJPhaserJacobi {
11  
12      static int dimGran;
# Line 57 | Line 62 | public class FJPhaserJacobi {
62  
63              System.out.println("Compute Time: " + secs);
64              System.out.println(fjp);
60
65          }
62
66      }
67  
68      static class Segment extends CyclicAction {
# Line 137 | Line 140 | public class FJPhaserJacobi {
140          public void compute() {
141              int rows = hiRow - loRow + 1;
142              int cols = hiCol - loCol + 1;
143 <            int rblocks = (int)(Math.round((float)rows / dimGran));
144 <            int cblocks = (int)(Math.round((float)cols / dimGran));
143 >            int rblocks = Math.round((float)rows / dimGran);
144 >            int cblocks = Math.round((float)cols / dimGran);
145  
146              int n = rblocks * cblocks;
147  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines