From 4330681ffcdee2d188fc987b70dad50df79bd018 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Thu, 16 Jan 2025 08:31:11 +0100 Subject: TRNS baseline: Add valgrind-ws support --- TRNS/baselines/cpu/main.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'TRNS/baselines/cpu/main.cpp') diff --git a/TRNS/baselines/cpu/main.cpp b/TRNS/baselines/cpu/main.cpp index c8cccaf..b4cd149 100644 --- a/TRNS/baselines/cpu/main.cpp +++ b/TRNS/baselines/cpu/main.cpp @@ -36,9 +36,18 @@ #include "support/setup.h" #include "kernel.h" #include "support/common.h" -#include "support/timer.h" #include "support/verify.h" +#if WITH_BENCHMARK +#include "support/timer.h" +#else +#include +struct Timer { + inline void start(std::string name) {(void)name;} + inline void stop(std::string name) {(void)name;} +}; +#endif + #include #include #include @@ -362,6 +371,7 @@ int main(int argc, char **argv) { timer.stop("free"); #endif +#if WITH_BENCHMARK if (rep >= p.n_warmup) { #if NUMA_MEMCPY printf("[::] TRNS-CPU-MEMCPY | n_threads=%d e_type=%s n_elements=%d" @@ -396,10 +406,8 @@ int main(int argc, char **argv) { timer.get("Step 1") + timer.get("Step 2") + timer.get("Step 3")); #endif // NUMA_MEMCPY } +#endif // WITH_BENCHMARK } - //timer.print("Step 1", p.n_reps); - //timer.print("Step 2", p.n_reps); - //timer.print("Step 3", p.n_reps); // Verify answer //verify(h_local, h_in_backup, M_ * m, N_ * n, 1); -- cgit v1.2.3