27using namespace Kokkos::utils::callbacks;
47TEST_F(
OnTest, on_same_execution_space_instance) {
59 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
78TEST_F(
OnTest, on_another_execution_space_instance_same_type) {
81 const auto [exec_A, exec_B] = Kokkos::Experimental::partition_space(
exec, 1, 1);
92 static_assert(stdexec::dependent_sender<
decltype(chain)>);
95 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
102 testing::ElementsAre(
110 testing::ElementsAre(
119 ASSERT_EQ(data(), 3) <<
"A synchronization is missing.";
128TEST_F(
OnTest, many_execution_space_instances_of_different_type) {
129 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
142 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
149 testing::ElementsAre(
157 testing::ElementsAre(
166 ASSERT_EQ(data(), 3) <<
"A synchronization is missing.";
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 THEN_INCREMENT(_data_)
Add a then using Tests::Utils::Functors::Increment that may throw. // NOLINTNEXTLINE(cppcoreguideline...
constexpr check_scheduler_type_t< Tag, Schd > check_scheduler_type
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)
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< 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
Kokkos::DefaultHostExecutionSpace host_execution_space