From aefa038d44d5496bae2b857107b1254decef27e5 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 16 Nov 2022 14:15:09 +0100 Subject: [PATCH] Revert "Aggiunge due for parallelizzati" This reverts commit 5b8b4f84b2e373d4ee28e191b7aee60132265d02. --- OpenMP/linear-algebra/kernels/atax/atax.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenMP/linear-algebra/kernels/atax/atax.c b/OpenMP/linear-algebra/kernels/atax/atax.c index 271d2b3..4d37d54 100644 --- a/OpenMP/linear-algebra/kernels/atax/atax.c +++ b/OpenMP/linear-algebra/kernels/atax/atax.c @@ -31,8 +31,8 @@ static void init_array(int nx, int ny, } /// Initialize the `A` matrix with [something?] - // Using 3-4 threads slow down the app - #pragma omp parallel for num_threads(2) schedule(static) + // Using 4 threads here slows everything down: why? + // #pragma omp parallel for num_threads(4) schedule(static) for (i = 0; i < nx; i++) for (j = 0; j < ny; j++) A[i][j] = ((DATA_TYPE)i * (j + 1)) / nx; @@ -70,7 +70,7 @@ static void kernel_atax(int nx, int ny, y[i] = 0; /// This computes... something? I guess whatever ATAX is? - #pragma omp parallel for num_threads(4) schedule(static) + // Trying to parallelize this only seems to increase the time required for (i = 0; i < _PB_NX; i++) { /// Every iteration has its own tmp variable