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; |
142 |
|
public void compute() { |
143 |
|
int rows = hiRow - loRow + 1; |
144 |
|
int cols = hiCol - loCol + 1; |
145 |
< |
int rblocks = (int)(Math.round((float)rows / dimGran)); |
146 |
< |
int cblocks = (int)(Math.round((float)cols / dimGran)); |
145 |
> |
int rblocks = Math.round((float)rows / dimGran); |
146 |
> |
int cblocks = Math.round((float)cols / dimGran); |
147 |
|
|
148 |
|
int n = rblocks * cblocks; |
149 |
|
|