29 using policy_t = Kokkos::RangePolicy<TEST_EXECUTION_SPACE>;
39 static_assert(stdexec::operation_state<op_state_t>);
42 static_assert(!std::move_constructible<op_state_t>);
43 static_assert(!std::is_move_assignable_v<op_state_t>);
45 static_assert(!std::copy_constructible<op_state_t>);
46 static_assert(!std::is_copy_assignable_v<op_state_t>);
58 stdexec::schedule(std::declval<typename OpStateTest::context_t>().get_scheduler()),
60 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>(0, 10),
63 static_assert(!std::is_const_v<sndr_t>);
66 using op_state_from_sndr_const_ref_t = stdexec::connect_result_t<const sndr_t&, Tests::Utils::SinkReceiver>;
68 static_assert(std::same_as<
69 op_state_from_sndr_const_ref_t,
76 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>
90template <stdexec::receiver Rcvr>
95 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>
100 using may_delegate_completion_with_event_t =
103 static_assert(std::derived_from<opstate_t, opstate_base_t>);
104 static_assert(std::derived_from<opstate_base_t, may_delegate_completion_with_event_t>);
108 static_assert(
sizeof(may_delegate_completion_with_event_t) >
sizeof(Rcvr));
109 static_assert(std::same_as<
110 typename may_delegate_completion_with_event_t::receiver_t,
113 static_assert(std::same_as<
114 typename may_delegate_completion_with_event_t::receiver_t::event_t,
118 static_assert(
sizeof(may_delegate_completion_with_event_t) ==
sizeof(Rcvr));
130 constexpr size_t size = 10;
132 const view_s_t witness(Kokkos::view_alloc(
exec,
"witness - shared space"));
148 ASSERT_EQ(witness(), size / 2 * (size - 1) - 1);
155 stdexec::schedule(std::declval<typename OpStateTest::context_t>().get_scheduler()),
157 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>(0, 10),
159 "hello again from pfor",
160 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>(0, 10),
163 using op_state_t = stdexec::connect_result_t<sndr_t&&, Tests::Utils::SinkReceiver>;
168 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>
173 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>
176 static_assert(std::same_as<
186 static_assert(!std::is_nothrow_constructible_v<op_state_t, sndr_t, Tests::Utils::SinkReceiver, clsr_0_t, clsr_1_t>);
188 static_assert(stdexec::__tuple_size_v<typename op_state_t::closures_t> == 2);
199 stdexec::schedule(std::declval<typename OpStateTest::context_t>().get_scheduler()),
201 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>(0, 10),
203 "hello again from pfor",
204 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>(0, 10),
206 "hello one more time from pfor",
207 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>(0, 10),
210 using op_state_t = stdexec::connect_result_t<sndr_t&&, Tests::Utils::SinkReceiver>;
215 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>
220 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>
225 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>
228 static_assert(std::same_as<
240 !std::is_nothrow_constructible_v<op_state_t, sndr_t, Tests::Utils::SinkReceiver, clsr_0_t, clsr_1_t, clsr_2_t>);
242 static_assert(stdexec::__tuple_size_v<typename op_state_t::closures_t> == 3);
250 using sndr_t =
decltype(stdexec::then(
253 stdexec::schedule(std::declval<typename OpStateTest::context_t>().get_scheduler()),
255 Kokkos::RangePolicy<TEST_EXECUTION_SPACE, Kokkos::IndexType<size_t>>(0, 10),
262 using op_state_t = stdexec::connect_result_t<sndr_t&&, Tests::Utils::SinkReceiver>;
267 Kokkos::RangePolicy<TEST_EXECUTION_SPACE, Kokkos::IndexType<size_t>>
272 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>
277 Kokkos::RangePolicy<TEST_EXECUTION_SPACE, Kokkos::LaunchBounds<1>>
280 static_assert(std::same_as<
292 !std::is_nothrow_constructible_v<op_state_t, sndr_t, Tests::Utils::SinkReceiver, clsr_0_t, clsr_1_t, clsr_2_t>);
294 static_assert(stdexec::__tuple_size_v<typename op_state_t::closures_t> == 3);
The execution space supports events and the receiver is queryable for a delegation scheduler.
constexpr get_exec_t get_exec
constexpr parallel_for_t parallel_for
consteval bool test_op_state_flattened_from_three()
consteval bool test_op_state_traits()
constexpr bool test_op_state_passed_by_const_ref()
consteval bool test_delegate_completion_with_event()
consteval bool test_op_state_flattened_from_two()
consteval bool test_op_state_flattened_from_three_mixed_tags()
auto get_scheduler() const noexcept -> ExecutionSpaceImpl::Scheduler< Exec >
Inspired by https://github.com/kokkos/kokkos/blob/69273c3a4e7b6adeb95066341ca201d62fe1e698/core/src/i...
An event that can be recorded on an execution space instance.
decltype(stdexec::schedule(std::declval< scheduler_t >())) schedule_sender_t
Kokkos::View< value_t, Kokkos::SharedSpace > view_s_t
Kokkos::Execution::ExecutionSpaceContext< Exec > context_t
A receiver that can handle all completions and does nothing with them.