1#ifndef KOKKOS_EXECUTION_TESTS_UTILS_CHECK_SCHEDULER_TYPE_HPP
2#define KOKKOS_EXECUTION_TESTS_UTILS_CHECK_SCHEDULER_TYPE_HPP
21template <stdexec::sender Sndr,
typename Tag, stdexec::scheduler Schd>
24template <
typename Tag, stdexec::scheduler Schd>
28 return stdexec::__closure(*
this);
31 template <stdexec::sender Sndr>
38template <stdexec::sender Sndr,
typename Tag, stdexec::scheduler Schd>
46 template <stdexec::receiver Rcvr>
47 constexpr auto connect(Rcvr rcvr) &&
noexcept(stdexec::__nothrow_connectable<Sndr&&, Rcvr&&>) {
49 return stdexec::connect(std::forward<Sndr>(
sndr), std::move(rcvr));
52 template <stdexec::receiver Rcvr>
53 constexpr auto connect(Rcvr rcvr)
const &
noexcept(stdexec::__nothrow_connectable<const Sndr&, Rcvr&&>) {
55 return stdexec::connect(
sndr, std::move(rcvr));
58 template <stdexec::receiver Rcvr>
64 std::same_as<std::remove_cvref_t<schd_t>, Schd>,
65 "Scheduler type mismatch: completion scheduler doesn't match expected type.");
69 else if constexpr (stdexec::__queryable_with<stdexec::env_of_t<Rcvr>, stdexec::get_scheduler_t>) {
70 using schd_t = stdexec::__query_result_t<stdexec::env_of_t<Rcvr>, stdexec::get_scheduler_t>;
72 std::same_as<std::remove_cvref_t<schd_t>, Schd>,
73 "Scheduler type mismatch: receiver scheduler doesn't match expected type.");
76 static_assert(
sizeof(Rcvr) == 0,
"No scheduler found.");
84template <
typename Tag, stdexec::scheduler Schd>
#define KOKKOS_EXECUTION_IMPL_FORWARDING_ATTRIBUTES_GET_ENV(_type_, _obj_)
#define KOKKOS_EXECUTION_COMPL_SIGS_KEEP(_sndr_type_)
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.
constexpr check_scheduler_type_t< Tag, Schd > check_scheduler_type
static consteval bool check_scheduler_type()
constexpr auto connect(Rcvr rcvr) &&noexcept(stdexec::__nothrow_connectable< Sndr &&, Rcvr && >)
constexpr auto connect(Rcvr rcvr) const &noexcept(stdexec::__nothrow_connectable< const Sndr &, Rcvr && >)
stdexec::sender_tag sender_concept
constexpr auto operator()(Sndr &&sndr) const
constexpr auto operator()() const noexcept