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 |
| class | StageNode |
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 {
24enum class StageKeyBy {
25 None = 0,
26 StreamId,
29struct StageNodeOptions {
32 std::size_t max_inflight = 0; // 0 => use GraphRunOptions.edge_queue
35class StageNode final : public simaai::neat::graph::Node {
37 using StageExecutorFactory = std::function<std::unique_ptr<simaai::neat::graph::StageExecutor>()>;
38 using OutputSpecFn = std::function<OutputSpec(const std::vector<OutputSpec>&, PortId)>;
40 StageNode(std::string kind, StageExecutorFactory factory, std::vector<PortDesc> inputs,
41 std::vector<PortDesc> outputs, std::string label = {}, OutputSpecFn out_fn = {},
42 StageNodeOptions options = {})
43 : kind_(std::move(kind)), label_(std::move(label)), inputs_(std::move(inputs)),
44 outputs_(std::move(outputs)), factory_(std::move(factory)),
45 output_spec_fn_(std::move(out_fn)), options_(std::move(options)) {}
48 return Backend::Stage;
55 std::string user_label() const override {
59 std::vector<PortDesc> input_ports() const override {
63 std::vector<PortDesc> output_ports() const override {
67 OutputSpec output_spec(const std::vector<OutputSpec>& inputs, PortId out_port) const override {
75 const StageExecutorFactory& factory() const {
78 const StageNodeOptions& options() const {
87 StageExecutorFactory factory_;
88 OutputSpecFn output_spec_fn_;
89 StageNodeOptions options_;
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.