From 518040a414dcf617ccf17940bcb7901983f344ab Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 28 Nov 2022 15:44:40 +0100 Subject: [PATCH] Allow including or excluding `init_array` via the `POLYBENCH_INCLUDE_INIT` macro --- OpenMP/linear-algebra/kernels/atax/atax.cu | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenMP/linear-algebra/kernels/atax/atax.cu b/OpenMP/linear-algebra/kernels/atax/atax.cu index cc6d9cb..ecef048 100644 --- a/OpenMP/linear-algebra/kernels/atax/atax.cu +++ b/OpenMP/linear-algebra/kernels/atax/atax.cu @@ -96,9 +96,15 @@ __host__ int main(int argc, char **argv) POLYBENCH_1D_ARRAY_DECL(x, DATA_TYPE, NY, ny); POLYBENCH_1D_ARRAY_DECL(y, DATA_TYPE, NY, ny); - init_array(nx, ny, POLYBENCH_ARRAY(A), POLYBENCH_ARRAY(x)); - + #ifdef POLYBENCH_INCLUDE_INIT polybench_start_instruments; + #endif + + init_array(nx, ny, POLYBENCH_ARRAY(A), POLYBENCH_ARRAY(x)); + + #ifndef POLYBENCH_INCLUDE_INIT + polybench_start_instruments; + #endif kernel_atax(nx, ny, POLYBENCH_ARRAY(A), POLYBENCH_ARRAY(x), POLYBENCH_ARRAY(y));