kokkos-execution 0.0.1
Loading...
Searching...
No Matches
domain.hpp
Go to the documentation of this file.
1#ifndef KOKKOS_EXECUTION_TESTS_UTILS_DOMAIN_HPP
2#define KOKKOS_EXECUTION_TESTS_UTILS_DOMAIN_HPP
3
5
7
8namespace Tests::Utils {
9
10struct DomainInheritingFromDefault : public stdexec::default_domain { };
11
13template <typename DomainType>
15 return std::same_as<stdexec::__common_domain_t<DomainType, stdexec::default_domain>, stdexec::default_domain>
16 && std::same_as<stdexec::__common_domain_t<DomainType, DomainInheritingFromDefault>, stdexec::default_domain>;
17}
18
20template <typename DomainType, typename Tag, stdexec::sender ScheduleSenderType, typename... Args>
23 using sndr_t = std::invoke_result_t<Tag, ScheduleSenderType, Args..., functor_t>;
24
25 return stdexec::__detail::__has_transform_sender<DomainType, stdexec::set_value_t, sndr_t, stdexec::env<>>;
26}
27
33template <typename DomainType, typename Tag, stdexec::sender ScheduleSenderType, typename... Args>
36 using sndr_t = std::invoke_result_t<Tag, ScheduleSenderType, Args..., functor_t>;
37
38 return stdexec::__default_domain_like<DomainType, stdexec::set_value_t, sndr_t, stdexec::env<>>;
39}
40
41} // namespace Tests::Utils
42
43#endif // KOKKOS_EXECUTION_TESTS_UTILS_DOMAIN_HPP
consteval bool check_if_domain_has_transform_sender_for()
Check if the domain has a transform of a Tag sender.
Definition domain.hpp:21
consteval bool check_if_default_domain_like_for()
Check if the domain's transform of a Tag sender is "default-like".
Definition domain.hpp:34
consteval bool check_if_common_domain_is_default()
Check if a domain has the stdexec::default_domain as common domain with a few other domains.
Definition domain.hpp:14