1
Fork 0
mirror of https://github.com/Steffo99/unimore-hpc-assignments.git synced 2024-11-25 17:44:23 +00:00

kernel_atax: Remove nested parallelization

Seems to improve the execution time on my PC

0.0340s → 0.0317s
This commit is contained in:
Steffo 2022-11-17 01:59:09 +01:00
parent a16813dc01
commit 1850c42a9f
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -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];