StageNode.h File
Stage-backed graph node wrapper. More...
Included Headers
#include "graph/GraphTypes.h"
#include "graph/Node.h"
#include <cstddef>
#include <functional>
#include <memory>
#include <string>
#include <utility>
#include <vector>
Namespaces Index
| namespace | simaai |
| namespace | neat |
| namespace | graph |
| namespace | nodes |
Classes Index
| struct | StageNodeOptions |
|
Options controlling how a StageNode is instantiated and scheduled by the runtime. More... | |
| class | StageNode |
|
Generic runtime-graph node that adapts a StageExecutor factory into a Node. More... | |
Description
Stage-backed graph node wrapper.
File Listing
The file content with the documentation metadata removed is:
8#include "graph/GraphTypes.h"
9#include "graph/Node.h"
18namespace simaai::neat::graph {
22namespace simaai::neat::graph::nodes {
32enum class StageKeyBy {
33 None = 0,
34 StreamId,
42struct StageNodeOptions {
45 std::size_t max_inflight =
61class StageNode final : public simaai::neat::graph::Node {
64 using StageExecutorFactory = std::function<std::unique_ptr<simaai::neat::graph::StageExecutor>()>;
66 using OutputSpecFn = std::function<OutputSpec(const std::vector<OutputSpec>&, PortId)>;
69 StageNode(std::string kind, StageExecutorFactory factory, std::vector<PortDesc> inputs,
70 std::vector<PortDesc> outputs, std::string label = {}, OutputSpecFn out_fn = {},
71 StageNodeOptions options = {})
72 : kind_(std::move(kind)), label_(std::move(label)), inputs_(std::move(inputs)),
73 outputs_(std::move(outputs)), factory_(std::move(factory)),
74 output_spec_fn_(std::move(out_fn)), options_(std::move(options)) {}
78 return Backend::Stage;
87 std::string user_label() const override {
92 std::vector<PortDesc> input_ports() const override {
97 std::vector<PortDesc> output_ports() const override {
103 OutputSpec output_spec(const std::vector<OutputSpec>& inputs, PortId out_port) const override {
112 const StageExecutorFactory& factory() const {
116 const StageNodeOptions& options() const {
125 StageExecutorFactory factory_;
126 OutputSpecFn output_spec_fn_;
127 StageNodeOptions options_;
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.