3 #include <momemta/config.h> 4 #include <momemta/Configuration.h> 5 #include <momemta/Module.h> 7 #include <ExecutionPath.h> 13 #include <boost/config.hpp> 14 #include <boost/functional/hash.hpp> 15 #include <boost/graph/adjacency_list.hpp> 30 momemta::ModuleList::value_type def;
36 std::string description;
41 typedef boost::adjacency_list<boost::listS, boost::listS, boost::bidirectionalS, Vertex, Edge> Graph;
42 typedef boost::graph_traits<Graph>::vertex_descriptor vertex_t;
43 typedef boost::graph_traits<Graph>::edge_descriptor edge_t;
65 void initialize(PoolPtr pool);
71 void beginIntegration();
73 Module::Status execute();
75 void endIntegration();
80 void logTimings()
const;
88 void setNDimensions(
size_t n);
91 size_t getNDimensions()
const;
96 const std::vector<boost::uuids::uuid>& getPaths()
const;
98 const std::vector<Configuration::ModuleDecl>& getDecls(
const boost::uuids::uuid& path)
const;
101 std::vector<boost::uuids::uuid> sorted_execution_paths;
104 std::vector<Configuration::ModuleDecl>,
105 boost::hash<boost::uuids::uuid>
108 std::vector<ModulePtr> modules;
113 std::unordered_map<Module *, std::chrono::high_resolution_clock::duration> module_timings;
143 const momemta::ModuleList& available_modules,
156 std::shared_ptr<ComputationGraph> build();
165 void exportGraph(
const std::string& output)
const;
172 const momemta::ModuleList& available_modules;
176 std::unordered_map<std::string, vertex_t> vertices;
178 std::list<vertex_t> sorted_vertices;
180 bool graph_exportable =
false;
A vertex of the graph, symbolizing a module.
An edge of the graph, symbolizing the connection between two modules (an InputTag) ...
bool virt
If true, this edge is virtual and represent an additional constrain to the graph. ...
A frozen snapshot of the configuration file.
A module declaration, defined from the configuration file.
InputTag tag
InputTag of the connection.