From 66d91dc4c10d52a30f103aadf9f126b23db4eb08 Mon Sep 17 00:00:00 2001 From: Bernhard Manfred Gruber Date: Thu, 4 Jan 2024 22:59:56 +0100 Subject: [PATCH] Only run GM layout variations when running update --- examples/alpaka/nbody/nbody.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/alpaka/nbody/nbody.cpp b/examples/alpaka/nbody/nbody.cpp index 193d9263a8..d8ded82eca 100644 --- a/examples/alpaka/nbody/nbody.cpp +++ b/examples/alpaka/nbody/nbody.cpp @@ -412,20 +412,22 @@ set y2tics auto problemSize / 1024, alpaka::getAccName()); + constexpr auto runSMVariations = hasSharedMem && runUpdate; + run(plotFile); - if constexpr(hasSharedMem) + if constexpr(runSMVariations) run(plotFile); - if constexpr(hasSharedMem) + if constexpr(runSMVariations) run(plotFile); run(plotFile); - if constexpr(hasSharedMem) + if constexpr(runSMVariations) run(plotFile); - if constexpr(hasSharedMem) + if constexpr(runSMVariations) run(plotFile); run(plotFile); - if constexpr(hasSharedMem) + if constexpr(runSMVariations) run(plotFile); - if constexpr(hasSharedMem) + if constexpr(runSMVariations) run(plotFile); run(plotFile);