--- jsr166/src/test/loops/FJPhaserJacobi.java 2010/09/20 20:42:37 1.8 +++ jsr166/src/test/loops/FJPhaserJacobi.java 2015/08/10 03:13:33 1.12 @@ -1,7 +1,12 @@ -// Barrier version of Jacobi iteration +/* + * Written by Doug Lea with assistance from members of JCP JSR-166 + * Expert Group and released to the public domain, as explained at + * http://creativecommons.org/publicdomain/zero/1.0/ + */ import java.util.concurrent.*; +/** Barrier version of Jacobi iteration */ public class FJPhaserJacobi { static int dimGran; @@ -57,9 +62,7 @@ public class FJPhaserJacobi { System.out.println("Compute Time: " + secs); System.out.println(fjp); - } - } static class Segment extends CyclicAction { @@ -137,8 +140,8 @@ public class FJPhaserJacobi { public void compute() { int rows = hiRow - loRow + 1; int cols = hiCol - loCol + 1; - int rblocks = (int)(Math.round((float)rows / dimGran)); - int cblocks = (int)(Math.round((float)cols / dimGran)); + int rblocks = Math.round((float)rows / dimGran); + int cblocks = Math.round((float)cols / dimGran); int n = rblocks * cblocks; @@ -171,4 +174,3 @@ public class FJPhaserJacobi { } } } -