Skip to main content

FanOut.h File

Stage executor that fans out a sample to multiple output ports. More...

Included Headers

#include "graph/StageExecutor.h" #include "graph/nodes/StageNode.h" #include <memory> #include <string> #include <utility> #include <vector>

Namespaces Index

namespacesimaai
namespaceneat
namespacegraph
namespacenodes

Classes Index

structFanOutOptions
classFanOut

Description

Stage executor that fans out a sample to multiple output ports.

File Listing

The file content with the documentation metadata removed is:

1
6#pragma once
7
10
11#include <memory>
12#include <string>
13#include <utility>
14#include <vector>
15
17
19 std::vector<std::string> outputs;
20};
21
23public:
24 explicit FanOut(FanOutOptions opt);
25
26 void set_ports(const StagePorts& ports) override;
27 void on_input(StageMsg&& msg, std::vector<StageOutMsg>& out) override;
28
29private:
30 void validate_outputs_(const StagePorts& ports);
31
32 FanOutOptions opt_;
33 std::vector<PortId> out_ports_;
34 bool validated_ = false;
35};
36
37// Convenience: wrap FanOut in a StageNode.
38std::shared_ptr<simaai::neat::graph::Node>
39FanOutNode(std::vector<std::string> outputs, std::string label = {}, std::string input = "in");
40
41} // namespace simaai::neat::graph::nodes

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.1.