35using namespace Kokkos::utils::callbacks;
63 using bulk_sndr_t = stdexec::transform_sender_result_t<
64 decltype(stdexec::bulk(std::declval<schd_sndr_t>(), stdexec::par, 42, std::declval<functor_t>())),
70 static_assert(std::same_as<Kokkos::Execution::Impl::exec_of_t<bulk_sndr_t>, TEST_EXECUTION_SPACE>);
83 stdexec::parallel_policy,
93 static_assert(std::same_as<
94 stdexec::__demangle_t<sndr_bulk_t>,
97 stdexec::__data_of<sndr_bulk_t>,
102 static_assert(stdexec::__detail::__has_nothrow_transform_sender<
104 stdexec::set_value_t,
109 using sndr_bulk_maythrow_on_move_t =
112 static_assert(!stdexec::__detail::__has_nothrow_transform_sender<
114 stdexec::set_value_t,
115 sndr_bulk_maythrow_on_move_t&&,
126 static_assert(!std::is_nothrow_constructible_v<Kokkos::Experimental::Graph<TEST_EXECUTION_SPACE>>);
131 static_assert(!stdexec::__nothrow_connectable<sndr_bulk_t, Tests::Utils::SinkReceiver>);
142 decltype(stdexec::schedule(std::declval<typename BulkTest::scheduler_t>()) | stdexec::bulk(stdexec::par, 42, functor_t{}) | stdexec::bulk(stdexec::par, 42, functor_t{}));
143 using connect_result_t = stdexec::connect_result_t<sndr_t, Tests::Utils::SinkReceiver>;
145 static_assert(stdexec::__is_instance_of<connect_result_t, Kokkos::Execution::GraphImpl::OpState>);
147 using root_t =
typename BulkTest::graph_t::root_t;
148 using range_policy_t = Kokkos::RangePolicy<TEST_EXECUTION_SPACE, Kokkos::Impl::IsGraphKernelTag>;
149 using bulk_A_t = Kokkos::Experimental::GraphNodeRef<
150 TEST_EXECUTION_SPACE,
151 Kokkos::Impl::GraphNodeKernelImpl<TEST_EXECUTION_SPACE, range_policy_t, functor_t, Kokkos::ParallelForTag>,
154 using bulk_B_t = Kokkos::Experimental::GraphNodeRef<
155 TEST_EXECUTION_SPACE,
156 Kokkos::Impl::GraphNodeKernelImpl<TEST_EXECUTION_SPACE, range_policy_t, functor_t, Kokkos::ParallelForTag>,
160 static_assert(std::same_as<typename connect_result_t::predecessor_t, root_t>);
161 static_assert(std::same_as<typename connect_result_t::node_t, bulk_B_t>);
172 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
180 | stdexec::then(load_check_add_t{.prev = 6, .value = 3, .data = data.data()}) |
BULK_SUM_INDICES(4, data);
182 using sndr_t =
decltype(sndr);
184 using bulk_data_t = stdexec::__data_of<sndr_t>;
188 stdexec::__demangle_t<stdexec::transform_sender_result_t<sndr_t, stdexec::env<>>>,
197 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>
202 static_assert(std::same_as<stdexec::__domain_of_t<stdexec::env_of_t<sndr_t>>, stdexec::default_domain>);
203 static_assert(std::same_as<
204 stdexec::__detail::__completing_domain_t<stdexec::set_value_t, sndr_t>,
209 static_assert(std::same_as<
214 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
221 testing::ElementsAre(
231 ASSERT_EQ(data(), 15);
239 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
248 using work_t =
decltype(work);
253 stdexec::__mset<stdexec::set_error_t(std::exception_ptr), stdexec::set_value_t()>
256 std::same_as<stdexec::__completion_domain_of_t<stdexec::set_value_t, work_t>, stdexec::indeterminate_domain<>>);
259 auto sndr = stdexec::starts_on(gctx.
get_scheduler(), std::move(work));
261 using sndr_t =
decltype(sndr);
264 static_assert(stdexec::dependent_sender<sndr_t>);
266 static_assert(std::same_as<
272 stdexec::__mset<stdexec::set_value_t(), stdexec::set_error_t(std::exception_ptr)>,
277 static_assert(std::same_as<
278 stdexec::__completion_domain_of_t<stdexec::set_value_t, sndr_t, stdexec::env<>>,
282 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
288 testing::ElementsAre(
294 ASSERT_EQ(data(), 10);
constexpr std::string dispatch_label(const Exec &, Label &&label)
Get the dispatch label from Exec and label.
#define MATCHER_FOR_BEGIN_FENCE(_exec_, _label_)
RecorderListener< ConjunctionMatcher< EventDiscardMatcher< TEST_EXECUTION_SPACE >, GraphEventDiscardMatcher< TEST_EXECUTION_SPACE > >, BeginFenceEvent, BeginParallelForEvent, AllocateDataEvent, DeallocateDataEvent, Kokkos::Execution::Impl::RecordEvent, Kokkos::Execution::Impl::WaitEvent, Kokkos::Execution::GraphImpl::GraphAddNodeEvent, Kokkos::Execution::GraphImpl::GraphCreateEvent, Kokkos::Execution::GraphImpl::GraphInstantiateEvent, Kokkos::Execution::GraphImpl::GraphSubmitEvent > recorder_listener_t
Concept for a sender whose completion scheduler is Kokkos::Execution::GraphImpl::Scheduler.
Concept that constrains the type of a sender that dispatches a functor for execution.
std::invoke_result_t< stdexec::get_completion_scheduler_t< Tag >, stdexec::env_of_t< Sndr >, Env... > completion_scheduler_of_t
Retrieve the completion scheduler for a given completion tag.
consteval bool test_sndr_nothrow_transformable()
consteval bool test_bulk_opstate_traits()
consteval bool test_sndr_traits()
consteval bool test_sndr_nothrow_connectable()
typename stdexec::__basic_sender< Args... >::type basic_sender_t
See https://github.com/NVIDIA/stdexec/pull/1873#discussion_r2834863237.
auto record_sync_wait(Sndr &&sndr)
consteval bool check_continues_on_after_just_stopped()
auto get_scheduler() const noexcept -> GraphImpl::Scheduler< Exec >
Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph node is added.
Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph is created.
Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph is instantiated.
Event to be sent to Kokkos::utils::callbacks::dispatch when a Kokkos graph is submitted.
Event to be sent to Kokkos::utils::callbacks::dispatch when calling record.
Event to be sent to Kokkos::utils::callbacks::dispatch when calling wait.
Similar to EventDiscardMatcher, for graph-related events.
decltype(std::declval< const context_t >().get_scheduler()) scheduler_t
decltype(stdexec::schedule(std::declval< scheduler_t >())) schedule_sender_t
Kokkos::View< value_t, Kokkos::SharedSpace > view_s_t
Kokkos::Execution::GraphContext< Exec > context_t
Load the value at data and check it is equal to prev. Then, add value to it.
device_handle_t device_handle
#define BULK_SUM_INDICES(_size_, _data_)
Add a bulk using Tests::Utils::Functors::SumIndices. // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)...
#define MATCHER_FOR_GRAPH_CREATE(_device_handle_)
#define MATCHER_FOR_GRAPH_SUBMIT(_exec_, _graph_create_event_variant_)
#define MATCHER_FOR_GRAPH_ADDNODE(_graph_create_event_variant_, _device_handle_, _predecessor_)
#define MATCHER_FOR_GRAPH_NODE_OF(_graph_add_node_event_)