kokkos-execution
0.0.1
Toggle main menu visibility
Loading...
Searching...
No Matches
test_diagnostics.failure.cpp
Go to the documentation of this file.
1
#include "
kokkos-execution/utils/ignore_warnings.hpp
"
2
PRAGMA_DIAGNOSTIC_PUSH
3
KOKKOS_EXECUTION_STDEXEC_PRAGMA_DIAGNOSTIC_IGNORED
4
#include "exec/single_thread_context.hpp"
5
PRAGMA_DIAGNOSTIC_POP
6
7
#include "
kokkos-execution/graph.hpp
"
8
9
#include "
tests/utils/functors/no_op.hpp
"
10
12
int
main
() {
13
const
Kokkos::ScopeGuard guard{};
14
15
const
TEST_EXECUTION_SPACE exec{};
16
17
const
Kokkos::Execution::GraphContext<TEST_EXECUTION_SPACE>
gctx{exec};
18
exec::single_thread_context stc{};
19
20
using
functor_t =
Tests::Utils::Functors::NoOp<false, false, false>
;
21
using
rcvr_t =
Kokkos::Execution::Impl::SyncWait::Receiver<TEST_EXECUTION_SPACE, std::true_type>
;
22
23
stdexec::sender
auto
sndr = stdexec::when_all(
// NOLINT(misc-const-correctness)
24
stdexec::schedule(stc.get_scheduler()) | stdexec::continues_on(gctx.
get_scheduler
())
25
| stdexec::then(functor_t{}),
26
stdexec::schedule(gctx.
get_scheduler
()) | stdexec::then(functor_t{}));
27
28
using
op_state_t = stdexec::connect_result_t<
decltype
(sndr), rcvr_t>;
29
31
static_assert
(
Kokkos::Execution::Impl::mandate_or_explain
<
32
Kokkos::Execution::GraphImpl::RemainsOnGraphFor<op_state_t, TEST_EXECUTION_SPACE>
33
>());
34
}
graph.hpp
ignore_warnings.hpp
KOKKOS_EXECUTION_STDEXEC_PRAGMA_DIAGNOSTIC_IGNORED
#define KOKKOS_EXECUTION_STDEXEC_PRAGMA_DIAGNOSTIC_IGNORED
Basic list of ignored diagnostics when including anything from stdexec.
Definition
ignore_warnings.hpp:44
main
int main(int argc, char **argv)
Kokkos::Execution::Impl::mandate_or_explain
constexpr bool mandate_or_explain() noexcept
If T::value is false, diagnose.
Definition
diagnostics.hpp:135
no_op.hpp
Kokkos::Execution::GraphContext
Execution context using Kokkos::Experimental::Graph under the hood.
Definition
graph.hpp:123
Kokkos::Execution::GraphContext::get_scheduler
auto get_scheduler() const noexcept -> GraphImpl::Scheduler< execution_space >
Definition
graph.hpp:134
Kokkos::Execution::GraphImpl::RemainsOnGraphFor
Definition
graph_fwd.hpp:44
Kokkos::Execution::Impl::SyncWait::Receiver
Receiver for stdexec::sync_wait.
Definition
sync_wait.hpp:45
Tests::Utils::Functors::NoOp
Does nothing.
Definition
no_op.hpp:15
tests
graph
test_diagnostics.failure.cpp
Generated on
for kokkos-execution by
1.18.0