mirror of
https://github.com/Steffo99/unimore-hpc-assignments.git
synced 2024-11-22 16:14:24 +00:00
init_array
: Leave a comment with my experiments on the second iteration
This commit is contained in:
parent
7fcff5d127
commit
18466da754
1 changed files with 3 additions and 2 deletions
|
@ -30,8 +30,9 @@ static void init_array(int nx, int ny,
|
|||
x[i] = i * M_PI;
|
||||
}
|
||||
|
||||
// Same here, but many times more
|
||||
// #pragma omp parallel for num_threads(SOMETHING) schedule(static)
|
||||
/// Initialize the `A` matrix with [something?]
|
||||
// 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;
|
||||
|
|
Loading…
Reference in a new issue