kokkos-execution
0.0.1
Toggle main menu visibility
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
4
#include "
kokkos-execution/stdexec.hpp
"
5
6
#include "
tests/utils/functors/no_op.hpp
"
7
8
namespace
Tests::Utils
{
9
10
struct
DomainInheritingFromDefault
:
public
stdexec::default_domain { };
11
13
template
<
typename
DomainType>
14
consteval
bool
check_if_common_domain_is_default
() {
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
20
template
<
typename
DomainType,
typename
Tag, stdexec::sender ScheduleSenderType,
typename
... Args>
21
consteval
bool
check_if_domain_has_transform_sender_for
() {
22
using
functor_t =
Tests::Utils::Functors::NoOp<false, false, false>
;
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
33
template
<
typename
DomainType,
typename
Tag, stdexec::sender ScheduleSenderType,
typename
... Args>
34
consteval
bool
check_if_default_domain_like_for
() {
35
using
functor_t =
Tests::Utils::Functors::NoOp<false, false, false>
;
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
stdexec.hpp
Tests::Utils
Definition
atomic.hpp:59
Tests::Utils::check_if_domain_has_transform_sender_for
consteval bool check_if_domain_has_transform_sender_for()
Check if the domain has a transform of a Tag sender.
Definition
domain.hpp:21
Tests::Utils::check_if_default_domain_like_for
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
Tests::Utils::check_if_common_domain_is_default
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
no_op.hpp
Tests::Utils::DomainInheritingFromDefault
Definition
domain.hpp:10
Tests::Utils::Functors::NoOp
Does nothing.
Definition
no_op.hpp:10
tests
utils
domain.hpp
Generated on
for kokkos-execution by
1.18.0