Skip to main content

Compiler.h File

Hybrid graph compiler: partitions pipeline segments and propagates OutputSpec. More...

Included Headers

#include "builder/NodeGroup.h" #include "builder/OutputSpec.h" #include "graph/Graph.h" #include "graph/nodes/StageNode.h" #include <cstddef> #include <memory> #include <string> #include <unordered_map> #include <vector>

Namespaces Index

namespacesimaai
namespaceneat
namespacegraph

Classes Index

structEdgeSpec
structCompiledPipelineSegment
structCompiledStageNode
structCompiledGraph
classCompiler

Description

Hybrid graph compiler: partitions pipeline segments and propagates OutputSpec.

File Listing

The file content with the documentation metadata removed is:

1
6#pragma once
7
8#include "builder/NodeGroup.h"
9#include "builder/OutputSpec.h"
10#include "graph/Graph.h"
12
13#include <cstddef>
14#include <memory>
15#include <string>
16#include <unordered_map>
17#include <vector>
18
20
21struct EdgeSpec {
22 OutputSpec spec;
23 bool complete = false;
24};
25
27 int id = -1;
28 std::vector<NodeId> node_ids;
29 simaai::neat::NodeGroup group;
30 std::vector<std::size_t> input_edges;
31 std::vector<std::size_t> output_edges;
32 bool source_like = false;
33 OutputSpec input_spec;
34 bool input_complete = false;
35 OutputSpec output_spec;
36 bool output_complete = false;
37};
38
40 NodeId node_id = kInvalidNode;
41 std::shared_ptr<graph::nodes::StageNode> node;
42};
43
45 std::vector<CompiledPipelineSegment> pipelines;
46 std::vector<CompiledStageNode> stages;
47 std::vector<Edge> edges;
48 std::vector<EdgeSpec> edge_specs;
49 std::vector<std::string> port_names;
50};
51
52class Compiler final {
53public:
54 CompiledGraph compile(const Graph& g) const;
55
56private:
57 static bool spec_complete_(const OutputSpec& spec);
58};
59
60} // namespace simaai::neat::graph

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.