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 |
|
// Barrier version of Jacobi iteration |
99 |
|
barrier.register(); |
100 |
|
} |
101 |
|
|
102 |
– |
|
102 |
|
public void run() { |
103 |
|
try { |
104 |
|
double[][] a = A; |
137 |
|
|
138 |
|
} |
139 |
|
|
141 |
– |
|
140 |
|
static class Driver { |
141 |
|
double[][] A; // matrix to get old values from |
142 |
|
double[][] B; // matrix to put new values into |
204 |
|
System.out.println("Max diff after " + steps + " steps = " + maxd); |
205 |
|
} |
206 |
|
} |
209 |
– |
|
210 |
– |
|
207 |
|
} |