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.";
80 const view_s_t data(Kokkos::view_alloc(
"data - shared space"));
87 stdexec::schedule(stdexec::inline_scheduler{})
94 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
101 testing::ElementsAre(
105 ASSERT_EQ(data(), 8);
110 const view_s_t data(Kokkos::view_alloc(
"data - shared space"));
117 stdexec::schedule(stdexec::inline_scheduler{})
123 | stdexec::continues_on(stdexec::inline_scheduler{})
127 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
134 testing::ElementsAre(
140 ASSERT_EQ(data(), 12);
145 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
149 experimental::execution::static_thread_pool pool{1};
157 | stdexec::continues_on(pool.get_scheduler())
161 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
168 testing::ElementsAre(
172 ASSERT_EQ(data(), 8);
177 const view_s_t data(Kokkos::view_alloc(
"data - shared space"));
181 experimental::execution::static_thread_pool pool{1};
186 stdexec::schedule(pool.get_scheduler())
193 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
202 testing::ElementsAre(
206 ASSERT_EQ(data(), 8);
211 const view_s_t data(Kokkos::view_alloc(
"data - shared space"));
215 experimental::execution::static_thread_pool pool{1};
220 stdexec::schedule(pool.get_scheduler())
226 | stdexec::continues_on(pool.get_scheduler())
230 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
239 testing::ElementsAre(
243 ASSERT_EQ(data(), 12);
248 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
252 experimental::execution::static_thread_pool pool{1};
260 | stdexec::continues_on(pool.get_scheduler())
267 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
276 testing::ElementsAre(
282 ASSERT_EQ(data(), 12);
constexpr std::string dispatch_label(const Exec &, const std::string_view label)
Get the dispatch label from Exec and label.
#define MATCHER_FOR_BEGIN_SINGLE(_exec_, _label_)
#define MATCHER_FOR_BEGIN_FENCE(_exec_, _label_)
RecorderListener< EventDiscardMatcher< TEST_EXECUTION_SPACE >, BeginFenceEvent, BeginSingleEvent, 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< execution_space >
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.