1
Fork 0
mirror of https://github.com/Steffo99/unimore-hpc-assignments.git synced 2025-02-16 17:13:57 +00:00

kernel_atax: Format for loops

This commit is contained in:
Steffo 2022-11-17 01:59:27 +01:00
parent 1850c42a9f
commit e49e89817d
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -76,13 +76,15 @@ static void kernel_atax(int nx, int ny,
/// Every iteration has its own tmp variable
DATA_TYPE tmp = 0;
for (j = 0; j < _PB_NY; j++)
for (j = 0; j < _PB_NY; j++) {
/// Which gets increased by a bit on every iteration
tmp += A[i][j] * x[j];
}
for (j = 0; j < _PB_NY; j++)
for (j = 0; j < _PB_NY; j++) {
/// Which is later used for [something else]
y[j] = y[j] + A[i][j] * tmp;
}
}
}