From 2bcfb17f7d6090b14916b28d6860449010853113 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 28 Nov 2022 16:59:10 +0100 Subject: [PATCH] Inline `i` in `print_array` --- OpenMP/linear-algebra/kernels/atax/atax.cu | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/OpenMP/linear-algebra/kernels/atax/atax.cu b/OpenMP/linear-algebra/kernels/atax/atax.cu index bb4bed6..f6e9957 100644 --- a/OpenMP/linear-algebra/kernels/atax/atax.cu +++ b/OpenMP/linear-algebra/kernels/atax/atax.cu @@ -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)) { - int i; - - for (i = 0; i < nx; i++) { + for (int i = 0; i < nx; i++) { fprintf(stderr, DATA_PRINTF_MODIFIER, y[i]); } fprintf(stderr, "\n");