Hedgehog  0.0.0
A library to generate hybrid pipeline workflow systems
abstract_scheduler.h
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 
20 #ifndef HEDGEHOG_ABSTRACT_SCHEDULER_H
21 #define HEDGEHOG_ABSTRACT_SCHEDULER_H
22 
23 #include <map>
24 #include <memory>
25 #include "../../behavior/node.h"
26 #include "../../core/node/core_node.h"
27 
29 namespace hh {
32  public:
34  AbstractScheduler() = default;
36  virtual ~AbstractScheduler() = default;
39  [[nodiscard]] virtual std::unique_ptr<AbstractScheduler> create() const = 0;
40 
42  virtual void spawnThreads(std::vector<std::shared_ptr<core::CoreNode>> &) = 0;
43 
45  virtual void joinAll() = 0;
46 };
47 }
48 #endif //HEDGEHOG_ABSTRACT_SCHEDULER_H
Hedgehog main namespace.
virtual void joinAll()=0
Join all the graph&#39;s thread.
AbstractScheduler()=default
Default constructor.
Abstract Hedgehog Scheduler interface, define per graph how the threads are bound to the nodes...
virtual std::unique_ptr< AbstractScheduler > create() const =0
Virtual constructor interface.
virtual void spawnThreads(std::vector< std::shared_ptr< core::CoreNode >> &)=0
Spawn the threads for the specific graph.
virtual ~AbstractScheduler()=default
Default destructor.