|
|
| StateManager ()=delete |
| | Deleted default constructor.
|
| |
| template<class StateType , class IsCompatibleState = typename std::enable_if_t< std::is_base_of_v<AbstractState<StateOutput, StateInputs...>, StateType> >> |
| | StateManager (std::shared_ptr< StateType > const state) |
| | Constructor for a StateManager with state as mandatory parameter. More...
|
| |
| template<class StateType , class IsCompatibleState = typename std::enable_if_t< std::is_base_of_v<AbstractState<StateOutput, StateInputs...>, StateType> >> |
| | StateManager (std::shared_ptr< StateType > const state, bool automaticStart) |
| | Constructor for an StateManager with state and automatic start as mandatory parameter. More...
|
| |
| template<class StateType , class IsCompatibleState = typename std::enable_if_t< std::is_base_of_v<AbstractState<StateOutput, StateInputs...>, StateType> >> |
| | StateManager (std::string_view const name, std::shared_ptr< StateType > const state, bool automaticStart=false) |
| | Constructor for a StateManager with name and state as mandatory parameter, and automatic start as optional parameter. More...
|
| |
| std::shared_ptr< AbstractTask< StateOutput, StateInputs... > > | copy () override |
| | Default override of the copy method, copy the name, the state and the automatic start. More...
|
| |
|
| StateManagerExecuteDefinition ()=delete |
| | Deleted default constructor.
|
| |
| | StateManagerExecuteDefinition (std::shared_ptr< AbstractState< StateOutput, StateInputs... >> const &state) |
| | Constructor for an AbstractStateManager with name, state, and automaticStart as mandatory parameters. More...
|
| |
|
virtual | ~StateManagerExecuteDefinition ()=default |
| | Default StateManagerExecute destructor.
|
| |
| void | execute (std::shared_ptr< StateInputs > input) final |
| | Default execute method definition. More...
|
| |
|
| BaseStateManager () |
| | DEfault constructor, set the base property for a state manager.
|
| |
| | AbstractTask () |
| | AbstractTask default constructor. More...
|
| |
| | AbstractTask (std::string_view const &name) |
| | Create a task with a custom name. More...
|
| |
| | AbstractTask (std::string_view const &name, size_t numberThreads) |
| | Create a task with a custom name and the task's cluster size. More...
|
| |
| | AbstractTask (std::string_view const &name, size_t numberThreads, bool automaticStart) |
| | Create a task with a custom name, the task's cluster size, and the automatic start. More...
|
| |
| | AbstractTask (std::string_view const name, size_t numberThreads, core::NodeType nodeType, bool automaticStart) |
| | Internal constructor needed to create nodes that derive from AbstractTask. More...
|
| |
| | AbstractTask (AbstractTask< StateOutput, TaskInputs ... > *rhs) |
| | Copy constructor. More...
|
| |
|
virtual | ~AbstractTask ()=default |
| | Default destructor.
|
| |
| void | addResult (std::shared_ptr< StateOutput > output) |
| | Add an output data. More...
|
| |
| std::string_view | name () |
| | Task's name accessor. More...
|
| |
| size_t | numberThreads () |
| | Task's number of threads accessor. More...
|
| |
| bool | automaticStart () |
| | Task's automatic start accessor. More...
|
| |
| core::NodeType | nodeType () |
| | Task's node type accessor. More...
|
| |
| int | deviceId () |
| | Task's device ID accessor. More...
|
| |
| int | graphId () |
| | Task's graph ID accessor. More...
|
| |
| std::shared_ptr< core::CoreNode > | core () final |
| | Task's core accessor. More...
|
| |
| std::shared_ptr< AbstractMemoryManager< StateOutput > > const & | memoryManager () const |
| | Task's memory manager accessor. More...
|
| |
|
virtual void | initialize () |
| | Initialize method called before AbstractTask::Execute loop.
|
| |
|
virtual void | shutdown () |
| | Shutdown method called after AbstractTask::Execute loop, when AbstractTask::canTerminate evaluates to true.
|
| |
| void | connectMemoryManager (std::shared_ptr< AbstractMemoryManager< StateOutput >> mm) |
| | Connect a memory manager to the task. More...
|
| |
| std::shared_ptr< StateOutput > | getManagedMemory () |
| | Memory manager accessor. More...
|
| |
| bool | canTerminate () override |
| | Method called to test the task;s termination, by default, the test is: no input nodes connected and, no data waiting to be treated. More...
|
| |
| virtual std::string | extraPrintingInformation () const |
| | Adds node information to print in the dot file. More...
|
| |
|
virtual void | execute (std::shared_ptr< TaskInputs >)=0 |
| | Virtual declaration of execute function for a data of type Input.
|
| |
template<class StateOutput, class ... StateInputs>
class hh::StateManager< StateOutput, StateInputs >
Hedgehog graph's node, used to manage an AbstractState.
To locally manage a computation, an AbstractStateManager with an AbstractState is used. An AbstractStateManager is a Hedgehog graphs's node so it can be linked to any other nodes in a graph. The default order of execution is:
- The StateManager will acquire a data,
- The StateManager will lock the AbstractState (with AbstractState::stateMutex_),
- The StateManager will send the data to the possessed AbstractState,
- The compatible Execute::execute is called with the data,
- During the call of Execute::execute, if the method AbstractState::push is invoked the "result data" is stored in a ready list AbstractState::readyList_,
- When the Execute::execute has returned, the waiting list is emptied as output of the AbstractStateManager,
- The StateManager will unlock the AbstractState (with AbstractState::stateMutex_).
- Virtual functions
- AbstractTask::copy (only used if the AbstractStateManager is in an ExecutionPipeline)
AbstractTask::initialize
AbstractTask::shutdown
Node::canTerminate
Node::extraPrintingInformation
- Template Parameters
-
| StateOutput | State output type |
| StateInputs | State input types |
Definition at line 117 of file state_manager.h.