From 976bf05c8dfbf9389f6c20e886dcfcbd1a89d514 Mon Sep 17 00:00:00 2001 From: jpekkila Date: Wed, 10 Jul 2019 14:37:32 +0300 Subject: [PATCH] Wrong scope for num_iterations in the last commit, fixed --- src/core/device.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/device.cu b/src/core/device.cu index 11a890d..61476c2 100644 --- a/src/core/device.cu +++ b/src/core/device.cu @@ -431,7 +431,8 @@ autoOptimize(const Device device) device->local_config.int_params[AC_nz]}; dim3 best_dims(0, 0, 0); - float best_time = INFINITY; + float best_time = INFINITY; + const int num_iterations = 10; for (int z = 1; z <= MAX_THREADS_PER_BLOCK; ++z) { for (int y = 1; y <= MAX_THREADS_PER_BLOCK; ++y) { @@ -466,7 +467,6 @@ autoOptimize(const Device device) cudaEventRecord(tstart); // ---------------------------------------- Timing start - const int num_iterations = 10; for (int i = 0; i < num_iterations; ++i) solve<2><<>>(start, end, device->vba, FLT_EPSILON);