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

Inline i in print_array

This commit is contained in:
Steffo 2022-11-28 16:59:10 +01:00
parent 4435d8325f
commit 2bcfb17f7d
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -47,9 +47,7 @@ __host__ static void init_array(int nx, int ny, DATA_TYPE POLYBENCH_2D(A, NX, NY
*/ */
__host__ static void print_array(int nx, DATA_TYPE POLYBENCH_1D(y, NX, nx)) __host__ static void print_array(int nx, DATA_TYPE POLYBENCH_1D(y, NX, nx))
{ {
int i; for (int i = 0; i < nx; i++) {
for (i = 0; i < nx; i++) {
fprintf(stderr, DATA_PRINTF_MODIFIER, y[i]); fprintf(stderr, DATA_PRINTF_MODIFIER, y[i]);
} }
fprintf(stderr, "\n"); fprintf(stderr, "\n");