From 443d9ee2b6e2f282f515ed6bcf247cbbb57d092b Mon Sep 17 00:00:00 2001 From: Vivek Kale <11766050+vlkale@users.noreply.github.com> Date: Thu, 11 Apr 2024 12:54:13 -0700 Subject: [PATCH] parscan.hpp: put in code for scan --- tests/sampler/parscan.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/sampler/parscan.hpp b/tests/sampler/parscan.hpp index 8b1378917..082191edf 100644 --- a/tests/sampler/parscan.hpp +++ b/tests/sampler/parscan.hpp @@ -1 +1,21 @@ +#pragma once +struct Tester { + template + explicit Tester(const execution_space& space) { + //! Explicitly launch a kernel with a name, and run it 15 times with kernel + //! logger. Use a periodic sampling with skip rate 5. This should print + //! out 2 invocations, and there is a single matcher with a regular + //! expression to check this. + + long int N = 1024; + long int result; + + for (int iter = 0; iter < 15; iter++) { + result = 0; + Kokkos::parallel_scan("named kernel scan", N, *this, result); + } + } + + KOKKOS_FUNCTION void operator()(const int, long int&, bool) const {} +};