Edited pragma
This commit is contained in:
parent
8ff3e6cf65
commit
054a659804
|
@ -40,7 +40,9 @@ double *compute_jacobi(int n, double init_value, double threshold, borders b, in
|
|||
*iterations = 0;
|
||||
do {
|
||||
max_diff = 0;
|
||||
#pragma omp parallel for schedule(static, 20) reduction (max:max_diff) private(new_value, j) firstprivate(n, nb) shared(x, new_x)
|
||||
#pragma omp parallel for schedule(static, 20) \
|
||||
reduction (max:max_diff) \
|
||||
default(none) private(new_value, j) firstprivate(n, nb) shared(x, new_x)
|
||||
for (i = 1; i <= n; i++) {
|
||||
for (j = 1; j <= n; j++) {
|
||||
new_value = 0.25 * (x[IDX(nb, i - 1, j)] + x[IDX(nb, i, j + 1)] + x[IDX(nb, i + 1, j)] + x[IDX(nb, i, j - 1)]);
|
||||
|
|
Loading…
Reference in New Issue
Block a user