kokkos-execution
0.0.1
Toggle main menu visibility
Loading...
Searching...
No Matches
check_continues_on.hpp
Go to the documentation of this file.
1
#ifndef KOKKOS_EXECUTION_TESTS_UTILS_CHECK_CONTINUES_ON_HPP
2
#define KOKKOS_EXECUTION_TESTS_UTILS_CHECK_CONTINUES_ON_HPP
3
4
#include <concepts>
5
6
#include "
kokkos-execution/stdexec.hpp
"
7
8
#include "
kokkos-execution/impl/sender_introspection.hpp
"
9
10
#include "
tests/utils/stdexec.hpp
"
11
12
namespace
Tests::Utils
{
13
19
template
<stdexec::scheduler Schd>
20
consteval
bool
check_continues_on
() {
21
using
sndr_t =
decltype
(stdexec::just() | stdexec::continues_on(std::declval<Schd>()));
22
24
static_assert
(std::same_as<
25
stdexec::__demangle_t<sndr_t>,
26
basic_sender_t
<
27
stdexec::continues_on_t,
28
Schd,
29
basic_sender_t
<
30
stdexec::schedule_from_t,
31
stdexec::__,
32
basic_sender_t<stdexec::just_t, stdexec::__tup::__tuple<>
>
33
>
34
>
35
>);
36
38
if
constexpr
(stdexec::sender_in<sndr_t>) {
39
stdexec::__diagnose_sender_concept_failure<sndr_t>();
40
}
else
{
41
stdexec::__diagnose_sender_concept_failure<sndr_t, stdexec::env<>>();
42
}
43
45
static_assert
(std::same_as<stdexec::__domain_of_t<stdexec::env_of_t<sndr_t>>, stdexec::default_domain>);
46
static_assert
(std::same_as<
47
stdexec::__detail::__completing_domain_t<stdexec::set_value_t, sndr_t>,
48
std::invoke_result_t<stdexec::get_completion_domain_t<stdexec::set_value_t>, Schd>
49
>);
50
52
if
constexpr
(
53
stdexec::__minvocable_q<Kokkos::Execution::Impl::completion_scheduler_of_t, stdexec::set_value_t, sndr_t>) {
54
static_assert
(
55
std::same_as<Kokkos::Execution::Impl::completion_scheduler_of_t<stdexec::set_value_t, sndr_t>, Schd>);
57
}
else
{
58
static_assert
(stdexec::dependent_sender<sndr_t>);
59
static_assert
(std::same_as<
60
Kokkos::Execution::Impl::completion_scheduler_of_t<stdexec::set_value_t, sndr_t, stdexec::env<>
>,
61
Schd
62
>);
63
}
64
65
return
true
;
66
}
67
68
}
// namespace Tests::Utils
69
70
#endif
// KOKKOS_EXECUTION_TESTS_UTILS_CHECK_CONTINUES_ON_HPP
stdexec.hpp
Kokkos::Execution::Impl::completion_scheduler_of_t
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.
Definition
sender_introspection.hpp:18
Tests::Utils
Definition
atomic.hpp:59
Tests::Utils::basic_sender_t
typename stdexec::__basic_sender< Args... >::type basic_sender_t
See https://github.com/NVIDIA/stdexec/pull/1873#discussion_r2834863237.
Definition
stdexec.hpp:12
Tests::Utils::check_continues_on
consteval bool check_continues_on()
Check how the scheduler customizes stdexec::continues_on.
Definition
check_continues_on.hpp:20
sender_introspection.hpp
stdexec.hpp
tests
utils
check_continues_on.hpp
Generated on
for kokkos-execution by
1.18.0