27using namespace Kokkos::utils::callbacks;
44 using bulk_sndr_t = stdexec::transform_sender_result_t<
45 decltype(stdexec::bulk(std::declval<schd_sndr_t>(), stdexec::par, 1, std::declval<functor_t>())),
49 static_assert(std::same_as<
55 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>
61 static_assert(std::same_as<Kokkos::Execution::ExecutionSpaceImpl::exec_of_t<bulk_sndr_t>, TEST_EXECUTION_SPACE>);
75 static_assert(stdexec::__detail::__has_nothrow_transform_sender<
82 using sndr_bulk_maythrow_on_move_t =
85 static_assert(!stdexec::__detail::__has_nothrow_transform_sender<
88 sndr_bulk_maythrow_on_move_t&&,
101 using sndr_t =
decltype(stdexec::bulk(
102 stdexec::schedule(std::declval<typename BulkTest::context_t>().get_scheduler()),
107 static_assert(!std::is_const_v<sndr_t>);
110 using op_state_from_sndr_const_ref_t = stdexec::connect_result_t<const sndr_t&, Tests::Utils::SinkReceiver>;
112 static_assert(std::same_as<
113 op_state_from_sndr_const_ref_t,
120 Kokkos::RangePolicy<TEST_EXECUTION_SPACE>
131 constexpr size_t size = 10;
133 const view_s_t data(Kokkos::view_alloc(
exec,
"data - shared space"));
139 using chain_t =
decltype(chain);
142 static_assert(std::same_as<stdexec::__domain_of_t<stdexec::env_of_t<chain_t>>, stdexec::default_domain>);
143 static_assert(std::same_as<
144 stdexec::__detail::__completing_domain_t<stdexec::set_value_t, chain_t>,
149 static_assert(std::same_as<
150 decltype(stdexec::get_completion_scheduler<stdexec::set_value_t>(stdexec::get_env(chain))),
154 ASSERT_EQ(data(), 0) <<
"Eager execution is not allowed.";
157 recorder_listener_t::record([chain = std::move(chain)]()
mutable { stdexec::sync_wait(std::move(chain)); }),
158 testing::ElementsAre(
162 ASSERT_EQ(data(), size / 2 * (size - 1));
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 > recorder_listener_t
Concept for a sender whose completion scheduler is Kokkos::Execution::ExecutionSpaceImpl::Scheduler.
Concept that constrains the type of a sender that dispatches a functor for execution.
constexpr bool test_op_state_passed_by_const_ref()
consteval bool test_sndr_no_throw_transformable()
consteval bool test_sndr_traits()
auto get_scheduler() const noexcept -> ExecutionSpaceImpl::Scheduler< Exec >
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::ExecutionSpaceContext< Exec > context_t
Count construction, move/copy construction, move/copy assignment and destruction atomically on host.
static std::atomic< unsigned int > move_assignments
static std::atomic< unsigned int > copy_constructions
static std::atomic< unsigned int > copy_assignments
A receiver that can handle all completions and does nothing with them.
#define BULK_SUM_INDICES(_size_, _data_)
Add a bulk using Tests::Utils::Functors::SumIndices. // NOLINTNEXTLINE(cppcoreguidelines-macro-usage)...