29using namespace Kokkos::utils::callbacks;
49TEST_F(
OnTest, on_same_execution_space_instance) {
64 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
83TEST_F(
OnTest, on_another_execution_space_instance_same_type) {
86 const auto [exec_A, exec_B] = Kokkos::Experimental::partition_space(
exec, 1, 1);
97 static_assert(stdexec::dependent_sender<
decltype(chain)>);
100 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
107 testing::ElementsAre(
120 testing::ElementsAre(
128 testing::ElementsAre(
138 ASSERT_EQ(data(), 3) <<
"A synchronization is missing.";
147TEST_F(
OnTest, many_execution_space_instances_of_different_type) {
148 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
161 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
168 testing::ElementsAre(
173 }
else if constexpr (
175 && std::same_as<host_execution_space, TEST_EXECUTION_SPACE>) {
178 testing::ElementsAre(
190 testing::ElementsAre(
199 ASSERT_EQ(data(), 3) <<
"A synchronization is missing.";
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_WAIT_EXEC_EVENT(_exec_, _record_event_variant_)
#define MATCHER_FOR_RECORD_EVENT(_exec_)
#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
Determine if the Kokkos backend can enqueue a wait for an event into an execution space instance.
Kokkos::DefaultHostExecutionSpace host_execution_space
#define THEN_INCREMENT(_data_)
Add a then using Tests::Utils::Functors::Increment that may throw. // NOLINTNEXTLINE(cppcoreguideline...
auto record_sync_wait(Sndr &&sndr)
void show_exec_space_id(const Exec &exec, std::string_view label="", std::ostream &out=std::cout)
bool are_same_instances(const Exec &exec, const OtherExec &other_exec)
constexpr check_completion_scheduler_type_t< Tag, Schd > check_completion_scheduler_type
Matcher to filter out events that are just noise for tests.
Execution context using a Kokkos execution space under the hood.
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