4#include "exec/static_thread_pool.hpp"
31using namespace Kokkos::utils::callbacks;
48 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
58 | stdexec::continues_on(stdexec::inline_scheduler{})
62 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
78 const view_s_t data(Kokkos::view_alloc(
"data - shared space"));
85 stdexec::schedule(stdexec::inline_scheduler{})
92 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
103 ASSERT_EQ(data(), 8);
108 const view_s_t data(Kokkos::view_alloc(
"data - shared space"));
115 stdexec::schedule(stdexec::inline_scheduler{})
121 | stdexec::continues_on(stdexec::inline_scheduler{})
125 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
132 testing::ElementsAre(
136 ASSERT_EQ(data(), 12);
141 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
145 experimental::execution::static_thread_pool pool{1};
153 | stdexec::continues_on(pool.get_scheduler())
157 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
164 testing::ElementsAre(
168 ASSERT_EQ(data(), 8);
173 const view_s_t data(Kokkos::view_alloc(
"data - shared space"));
177 experimental::execution::static_thread_pool pool{1};
182 stdexec::schedule(pool.get_scheduler())
189 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
198 testing::ElementsAre(
202 ASSERT_EQ(data(), 8);
207 const view_s_t data(Kokkos::view_alloc(
"data - shared space"));
211 experimental::execution::static_thread_pool pool{1};
216 stdexec::schedule(pool.get_scheduler())
222 | stdexec::continues_on(pool.get_scheduler())
226 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
235 testing::ElementsAre(
239 ASSERT_EQ(data(), 12);
244 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
248 experimental::execution::static_thread_pool pool{1};
256 | stdexec::continues_on(pool.get_scheduler())
263 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
272 testing::ElementsAre(
278 ASSERT_EQ(data(), 12);
constexpr std::string dispatch_label(const Exec &, Label &&label)
Get the dispatch label from Exec and label.
#define MATCHER_FOR_BEGIN_PFOR(_exec_, _label_)
#define MATCHER_FOR_BEGIN_FENCE(_exec_, _label_)
RecorderListener< EventDiscardMatcher< TEST_EXECUTION_SPACE >, BeginFenceEvent, BeginParallelForEvent, Kokkos::Execution::Impl::RecordEvent, Kokkos::Execution::Impl::WaitEvent > recorder_listener_t
#define KOKKOS_EXECUTION_THREADS_THROWS_ON_SYNC_WAIT_ASSERT_AND_SKIP(_sndr_)
#define KOKKOS_EXECUTION_STDEXEC_PRAGMA_DIAGNOSTIC_IGNORED
Basic list of ignored diagnostics when including anything from stdexec.
auto record_sync_wait(Sndr &&sndr)
void show_exec_space_id(const Exec &exec, std::string_view label="", std::ostream &out=std::cout)
Matcher to filter out events that are just noise for tests.
auto get_scheduler() const noexcept -> ExecutionSpaceImpl::Scheduler< Exec >
Event to be sent to Kokkos::utils::callbacks::dispatch when calling record.
Event to be sent to Kokkos::utils::callbacks::dispatch when calling wait.
Kokkos::View< value_t, Kokkos::SharedSpace > view_s_t
Kokkos::Execution::ExecutionSpaceContext< Exec > context_t
Load the value at data and check it is equal to prev. Then, add value to it.