4#include "exec/fork_join.hpp"
5#include "exec/static_thread_pool.hpp"
33using namespace Kokkos::utils::callbacks;
47 const view_s_t data(Kokkos::view_alloc(
"data - shared space"));
49 experimental::execution::static_thread_pool pool{4};
53 stdexec::schedule(pool.get_scheduler())
55 | experimental::execution::fork_join(
62 | stdexec::continues_on(stdexec::inline_scheduler{})
65 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
68 recorder_listener_t::record([chain = std::move(chain)]()
mutable { stdexec::sync_wait(std::move(chain)); }),
74 ASSERT_EQ(data(), 14);
83 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
89 | experimental::execution::fork_join(
94 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
97 recorder_listener_t::record([sndr = std::move(sndr)]()
mutable {
98 stdexec::sync_wait(std::move(sndr));
100 testing::ElementsAre(
104 ASSERT_EQ(data(), 3);
113 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
119 | experimental::execution::fork_join(
124 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
127 recorder_listener_t::record([sndr = std::move(sndr)]()
mutable {
128 stdexec::sync_wait(std::move(sndr));
130 testing::ElementsAre(
135 ASSERT_EQ(data(), 3);
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_)
static constexpr bool on_device
RecorderListener< EventDiscardMatcher< TEST_EXECUTION_SPACE >, BeginFenceEvent, BeginParallelForEvent > recorder_listener_t
#define KOKKOS_EXECUTION_STDEXEC_PRAGMA_DIAGNOSTIC_IGNORED
Basic list of ignored diagnostics when including anything from stdexec.
#define THEN_INCREMENT_ATOMIC(_data_)
Same as THEN_INCREMENT, using Tests::Utils::atomic_add. // NOLINTNEXTLINE(cppcoreguidelines-macro-usa...
constexpr check_scheduler_type_t< Tag, Schd > check_scheduler_type
constexpr bool on_device()
auto get_scheduler() const noexcept -> ExecutionSpaceImpl::Scheduler< Exec >
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.
#define BULK_SUM_INDICES(_size_, _data_)
Add a bulk using Tests::Utils::Functors::SumIndices. // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)...