1
Fork 0
mirror of https://github.com/Steffo99/unimore-hpc-assignments.git synced 2024-11-22 08:04:25 +00:00

init_array: Format second for loop

This commit is contained in:
Steffo 2022-11-17 01:57:13 +01:00
parent ac1ec275d7
commit 0eb63cb684
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -32,9 +32,11 @@ static void init_array(int nx, int ny,
/// Initialize the `A` matrix with [something?]
#pragma omp parallel for num_threads(THREAD_COUNT) schedule(static)
for (i = 0; i < nx; i++)
for (j = 0; j < ny; j++)
for (i = 0; i < nx; i++) {
for (j = 0; j < ny; j++) {
A[i][j] = ((DATA_TYPE)i * (j + 1)) / nx;
}
}
}
/* DCE code. Must scan the entire live-out data.