4#include "exec/single_thread_context.hpp"
31using namespace Kokkos::utils::callbacks;
48 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
50 const auto [exec_A, exec_B] = Kokkos::Experimental::partition_space(
exec, 1, 1);
52 const context_t esc_A{exec_A}, esc_B{exec_B};
54 auto w_a = stdexec::transfer_when_all(
59 static_assert(std::same_as<
60 decltype(stdexec::get_completion_domain<stdexec::set_value_t>(stdexec::get_env(w_a))),
65 static_assert(std::same_as<
66 decltype(stdexec::get_completion_scheduler<stdexec::set_value_t>(stdexec::get_env(w_a))),
73 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
75 const auto recorded_events = recorder_listener_t::record(
76 [sndr = std::move(sndr)]()
mutable { stdexec::sync_wait(std::move(sndr)); });
87 ASSERT_EQ(recorded_events.size(), 6);
105 ASSERT_EQ(data(), 3);
constexpr std::string dispatch_label(const Exec &, Label &&label)
Get the dispatch label from Exec and label.
#define MATCHER_FOR_WAIT_EVENT(_record_event_variant_)
#define MATCHER_FOR_BEGIN_PFOR(_exec_, _label_)
#define MATCHER_FOR_RECORD_EVENT(_exec_)
#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
Concept for a sender whose completion scheduler is Kokkos::Execution::ExecutionSpaceImpl::Scheduler.
#define KOKKOS_EXECUTION_STDEXEC_PRAGMA_DIAGNOSTIC_IGNORED
Basic list of ignored diagnostics when including anything from stdexec.
#define THEN_INCREMENT(_data_)
Add a then using Tests::Utils::Functors::Increment that may throw. // NOLINTNEXTLINE(cppcoreguideline...
#define THEN_INCREMENT_ATOMIC(_data_)
Same as THEN_INCREMENT, using Tests::Utils::atomic_add. // NOLINTNEXTLINE(cppcoreguidelines-macro-usa...
bool are_same_instances(const Exec &exec, const OtherExec &other_exec)
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 an event is recorded on an execution spac...
Event to be sent to Kokkos::utils::callbacks::dispatch when an event is being waited for.
decltype(std::declval< const context_t >().get_scheduler()) scheduler_t
Kokkos::View< value_t, Kokkos::SharedSpace > view_s_t
Kokkos::Execution::ExecutionSpaceContext< Exec > context_t