Hedgehog  3.1.0
A library to generate hybrid pipeline workflow systems
Loading...
Searching...
No Matches
execution_pipeline_node_abstraction.h
Go to the documentation of this file.
1// NIST-developed software is provided by NIST as a public service. You may use, copy and distribute copies of the
2// software in any medium, provided that you keep intact this entire notice. You may improve, modify and create
3// derivative works of the software or any portion of the software, and you may copy and distribute such modifications
4// or works. Modified works should carry a notice stating that you changed the software and should note the date and
5// nature of any such change. Please explicitly acknowledge the National Institute of Standards and Technology as the
6// source of the software. NIST-developed software is expressly provided "AS IS." NIST MAKES NO WARRANTY OF ANY KIND,
7// EXPRESS, IMPLIED, IN FACT OR ARISING BY OPERATION OF LAW, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
8// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT AND DATA ACCURACY. NIST NEITHER REPRESENTS NOR
9// WARRANTS THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT ANY DEFECTS WILL BE
10// CORRECTED. NIST DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF THE SOFTWARE OR THE RESULTS
11// THEREOF, INCLUDING BUT NOT LIMITED TO THE CORRECTNESS, ACCURACY, RELIABILITY, OR USEFULNESS OF THE SOFTWARE. You
12// are solely responsible for determining the appropriateness of using and distributing the software and you assume
13// all risks associated with its use, including but not limited to the risks and costs of program errors, compliance
14// with applicable laws, damage to or loss of data, programs or equipment, and the unavailability or interruption of
15// operation. This software is not intended to be used in any situation where a failure could cause risk of injury or
16// damage to property. The software developed by NIST employees is not subject to copyright protection within the
17// United States.
18
19#ifndef HEDGEHOG_EXECUTION_PIPELINE_NODE_ABSTRACTION_H_
20#define HEDGEHOG_EXECUTION_PIPELINE_NODE_ABSTRACTION_H_
21
23
25namespace hh {
27namespace core {
29namespace abstraction {
30
33 public:
39 this->printOptions().background({0xC0, 0xC0, 0xC0, 0xff});
40 }
41
44
47 [[nodiscard]] std::vector<std::pair<std::string const, std::string const>> ids() const override {
48 return {{this->id(), this->id()}};
49 }
50
53 [[nodiscard]] bool hasMemoryManagerAttached() const override { return false; }
54
57 [[nodiscard]] std::shared_ptr<AbstractMemoryManager> memoryManager() const override { return nullptr; }
58
61 virtual void launchGraphThreads(bool waitForInitialization) = 0;
62
65 [[nodiscard]] virtual std::pair<std::chrono::nanoseconds, std::chrono::nanoseconds> minMaxExecutionDuration() const = 0;
68 [[nodiscard]] virtual std::pair<std::chrono::nanoseconds, std::chrono::nanoseconds> minMaxWaitDuration() const = 0;
69};
70}
71}
72}
73#endif //HEDGEHOG_EXECUTION_PIPELINE_NODE_ABSTRACTION_H_
Hedgehog main namespace.
Behavior abstraction for the base node.
Definition: node.h:32
virtual std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > minMaxExecutionDuration() const =0
Getter to the min max execution duration from the nodes inside the graphs in the execution pipeline.
virtual std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > minMaxWaitDuration() const =0
Getter to the min max wait duration from the nodes inside the graphs in the execution pipeline.
virtual void launchGraphThreads(bool waitForInitialization)=0
Launch the graphs inside of the execution pipeline, called when the outer graph is executed.
std::vector< std::pair< std::string const, std::string const > > ids() const override
Node ids [nodeId, nodeGroupId] accessor.
ExecutionPipelineNodeAbstraction(std::string const &name, behavior::Node *node)
Constructor using the node name.
std::shared_ptr< AbstractMemoryManager > memoryManager() const override
Accessor to memory manager, an execution pipeline has no memory manager.
~ExecutionPipelineNodeAbstraction() override=default
Default destructor.
bool hasMemoryManagerAttached() const override
Test if a node has a memory attached, an execution pipeline can't have a memory manager.
virtual std::string id() const
Core's id ('x' + address of abstraction) as string.
std::string const & name() const
Accessor to the core's name.
Task core abstraction used to define some method for task-like behaving cores like CoreExecutionPipel...
behavior::Node * node() const override
Node accessor.
tool::PrintOptions const & printOptions() const
Print options const accessor.
Color background() const
Background color accessor.
Definition: print_options.h:44