Template Class GraphRuntime#
Defined in File graph_runtime.h
Class Documentation#
-
template<typename DB>
class GraphRuntime# Converts a graph into a flat sequence of operators, sorted by depth, and runs them. Proxy nodes are expanded recursively: their operators are inlined at their position. Unlinked inputs are parsed from the value of their socket.
Public Types
-
using operator_ptr_t = std::unique_ptr<operator_t>#
-
using bindings_t = std::map<socket_id_t, data_id_t>#
Public Functions
-
explicit GraphRuntime(const Graph &graph)#
- Throws:
std::runtime_error – if an operator is missing, a proxy can’t be read or the graph contains a cycle.
-
explicit GraphRuntime(graph_id_t gid)#
Builds the runtime of a graph owned by the GraphManager.
-
inline const std::vector<operator_ptr_t> &get_operators() const#
-
inline const bindings_t &get_results() const#
-
inline bool is_executed(std::size_t index) const#
-
template<typename T>
inline std::optional<T> get_result(const socket_id_t &alias) const# - Returns:
The value of a result of the graph, if it has been computed with this type.
-
bool run()#
Runs all the operators in order. Stops at the first operator failing to pull, poll, process or push.
- Returns:
true if all the operators were executed.
-
using operator_ptr_t = std::unique_ptr<operator_t>#