From 054a659804476234f40027183fc1e67188797fd0 Mon Sep 17 00:00:00 2001 From: Fabio Salvini Date: Wed, 23 Nov 2016 11:42:22 +0100 Subject: [PATCH] Edited pragma --- src/impl/omp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/impl/omp.c b/src/impl/omp.c index 3a5a51f..79b240b 100644 --- a/src/impl/omp.c +++ b/src/impl/omp.c @@ -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)]);