kokkos-execution 0.0.1
Loading...
Searching...
No Matches
get_graph.hpp
Go to the documentation of this file.
1#ifndef KOKKOS_EXECUTION_GRAPH_GET_GRAPH_HPP
2#define KOKKOS_EXECUTION_GRAPH_GET_GRAPH_HPP
3
5
7
9
15struct get_graph_t : public stdexec::__query<get_graph_t> { };
16
17inline constexpr get_graph_t get_graph{};
18
22 struct Attach { };
23
25 struct Create { };
26
28 template <typename Queryable>
29 using policy_t = std::conditional_t<stdexec::__queryable_with<Queryable, get_node_t>, Attach, Create>;
30
31 template <typename Exec, typename Queryable>
33
34 template <typename Exec, typename Queryable>
35 requires(std::same_as<policy_t<Queryable>, Create>)
37 using type = typename Kokkos::Experimental::Graph<Exec>::root_t;
38 };
39
40 template <typename Exec, typename Queryable>
41 requires(std::same_as<policy_t<Queryable>, Attach>)
43 using type = stdexec::__query_result_t<Queryable, get_node_t>;
44 };
45
50 template <typename Exec, typename Queryable>
52};
53
54} // namespace Kokkos::Execution::GraphImpl
55
56#endif // KOKKOS_EXECUTION_GRAPH_GET_GRAPH_HPP
constexpr get_graph_t get_graph
Definition get_graph.hpp:17
Attach to the existing graph of the predecessor.
Definition get_graph.hpp:22
Create a new graph and attach after the root node.
Definition get_graph.hpp:25
typename Kokkos::Experimental::Graph< Exec >::root_t type
Definition get_graph.hpp:37
Inspired by https://github.com/NVIDIA/stdexec/blob/8c5eedd0fcf9a8ebcdb75d988f72f88efcf64a37/include/s...
Definition get_graph.hpp:20
typename node_helper_t< Exec, Queryable >::type node_t
Definition get_graph.hpp:51
std::conditional_t< stdexec::__queryable_with< Queryable, get_node_t >, Attach, Create > policy_t
Use the Attach policy if Queryable is queryable with get_node_t.
Definition get_graph.hpp:29