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

Per-edge spec captured by the compiler — the propagated OutputSpec and a completeness flag. More...

structCompiledPipelineSegment

Compiled view of a contiguous pipeline-backend segment in the runtime graph. More...

structCompiledStageNode

Compiled record for a single stage-backend node in the runtime graph. More...

structCompiledGraph

Result produced by Compiler::compile: pipelines, stages, edges, specs, and port names. More...

classCompiler

Runtime-graph compiler that partitions a Graph into pipeline segments and stages. More...

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
19namespace simaai::neat::graph {
20
27struct EdgeSpec {
28 OutputSpec spec;
29 bool complete = false;
30};
31
41 int id = -1;
42 std::vector<NodeId> node_ids;
43 simaai::neat::NodeGroup group;
44 std::vector<std::size_t>
46 std::vector<std::size_t>
48 bool source_like = false;
49 OutputSpec input_spec;
50 bool input_complete = false;
51 OutputSpec output_spec;
52 bool output_complete = false;
53};
54
61 NodeId node_id = kInvalidNode;
62 std::shared_ptr<graph::nodes::StageNode> node;
63};
64
75 std::vector<CompiledPipelineSegment> pipelines;
76 std::vector<CompiledStageNode> stages;
77 std::vector<Edge> edges;
78 std::vector<EdgeSpec> edge_specs;
79 std::vector<std::string> port_names;
80};
81
92class Compiler final {
93public:
95 CompiledGraph compile(const Graph& g) const;
96
97private:
98 static bool spec_complete_(const OutputSpec& spec);
99};
100
101} // namespace simaai::neat::graph

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.