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:
parent
1850c42a9f
commit
e49e89817d
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue