From 1850c42a9ffd011a68a995bf71279319f73ce057 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 17 Nov 2022 01:59:09 +0100 Subject: [PATCH] `kernel_atax`: Remove nested parallelization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seems to improve the execution time on my PC 0.0340s → 0.0317s --- OpenMP/linear-algebra/kernels/atax/atax.c | 1 - 1 file changed, 1 deletion(-) diff --git a/OpenMP/linear-algebra/kernels/atax/atax.c b/OpenMP/linear-algebra/kernels/atax/atax.c index 814b220..610b3c9 100644 --- a/OpenMP/linear-algebra/kernels/atax/atax.c +++ b/OpenMP/linear-algebra/kernels/atax/atax.c @@ -76,7 +76,6 @@ static void kernel_atax(int nx, int ny, /// Every iteration has its own tmp variable DATA_TYPE tmp = 0; - #pragma omp parallel for num_threads(THREAD_COUNT) reduction(+:tmp) for (j = 0; j < _PB_NY; j++) /// Which gets increased by a bit on every iteration tmp += A[i][j] * x[j];