Hedgehog  3.1.0
A library to generate hybrid pipeline workflow systems
Loading...
Searching...
No Matches
hh::core::abstraction::ExecutionPipelineNodeAbstraction Class Referenceabstract

Abstraction specialized for the execution pipeline. More...

#include "execution_pipeline_node_abstraction.h"

Inheritance diagram for hh::core::abstraction::ExecutionPipelineNodeAbstraction:
Inheritance graph
Collaboration diagram for hh::core::abstraction::ExecutionPipelineNodeAbstraction:
Collaboration graph

Public Member Functions

 ExecutionPipelineNodeAbstraction (std::string const &name, behavior::Node *node)
 Constructor using the node name.
 
 ~ExecutionPipelineNodeAbstraction () override=default
 Default destructor.
 
std::vector< std::pair< std::string const, std::string const > > ids () const override
 Node ids [nodeId, nodeGroupId] accessor.
 
bool hasMemoryManagerAttached () const override
 Test if a node has a memory attached, an execution pipeline can't have a memory manager.
 
std::shared_ptr< AbstractMemoryManagermemoryManager () const override
 Accessor to memory manager, an execution pipeline has no memory manager.
 
virtual void launchGraphThreads (bool waitForInitialization)=0
 Launch the graphs inside of the execution pipeline, called when the outer graph is executed.
 
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.
 
- Public Member Functions inherited from hh::core::abstraction::TaskNodeAbstraction
 TaskNodeAbstraction (std::string const &name, behavior::Node *node)
 Create the abstraction with the node's name.
 
 ~TaskNodeAbstraction () override=default
 Default destructor.
 
bool isActive () const
 Accessor to task status.
 
bool isInitialized () const
 Accessor to initialized flag.
 
size_t numberReceivedElements () const
 Accessor to the number of received elements.
 
std::chrono::nanoseconds const & waitDuration () const
 Accessor to the duration the node was in a wait state.
 
std::chrono::nanoseconds const & memoryWaitDuration () const
 Accessor to the duration the node was in a memory wait state.
 
std::shared_ptr< NvtxProfiler > const & nvtxProfiler () const
 Accessor to the NVTX profiler attached to the node.
 
std::chrono::nanoseconds perElementExecutionDuration () const
 Accessor to the duration the average duration of processing an input data.
 
void isActive (bool isActive)
 Setter to the task status.
 
void incrementNumberReceivedElements ()
 Increment the number of elements received.
 
void incrementWaitDuration (std::chrono::nanoseconds const &wait)
 Increment the wait duration.
 
void incrementMemoryWaitDuration (std::chrono::nanoseconds const &wait)
 Increase the memory wait duration.
 
void incrementPerElementExecutionDuration (std::chrono::nanoseconds const &exec)
 Increase the execution time per elements.
 
virtual void preRun ()=0
 Pre run method, called only once.
 
virtual void run ()=0
 Run method, called when thread is attached.
 
virtual void postRun ()=0
 Post run method, called only once.
 
virtual std::string extraPrintingInformation () const =0
 Abstraction to add user-defined message for the printers.
 
virtual bool hasMemoryManagerAttached () const =0
 Flag accessor to the presence of memory manager attached.
 
virtual std::shared_ptr< AbstractMemoryManagermemoryManager () const =0
 Accessor to the attached memory manager.
 
behavior::Nodenode () const override
 Node accessor.
 
- Public Member Functions inherited from hh::core::abstraction::NodeAbstraction
 NodeAbstraction (std::string name)
 Core node constructor using the core's name.
 
virtual ~NodeAbstraction ()=default
 DEfault destructor.
 
std::string const & name () const
 Accessor to the core's name.
 
virtual std::string id () const
 Core's id ('x' + address of abstraction) as string.
 
bool isRegistered () const
 Accessor to registration flag.
 
GraphNodeAbstractionbelongingGraph () const
 Belonging graph accessor.
 
virtual int deviceId () const
 Get the device identifier (got from belonging graph)
 
virtual size_t graphId () const
 Get the graph identifier (got from belonging graph)
 
std::chrono::nanoseconds const & executionDuration () const
 Execution duration.
 
std::chrono::time_point< std::chrono::system_clock > const & startExecutionTimeStamp () const
 Accessor to the starting execution timestamp.
 
void startExecutionTimeStamp (std::chrono::time_point< std::chrono::system_clock > const &startExecutionTimeStamp)
 Setter to the starting execution timestamp.
 
void incrementExecutionDuration (std::chrono::nanoseconds const &exec)
 Increment execution duration.
 
virtual void registerNode (GraphNodeAbstraction *belongingGraph)
 Register node to the given graph.
 
virtual std::vector< std::pair< std::string const, std::string const > > ids () const =0
 Node ids [nodeId, nodeGroupId] accessor.
 
virtual behavior::Nodenode () const =0
 Node accessor.
 
- Public Member Functions inherited from hh::core::abstraction::PrintableAbstraction
tool::PrintOptions const & printOptions () const
 Print options const accessor.
 
tool::PrintOptionsprintOptions ()
 Print options accessor.
 
virtual void visit (Printer *printer)=0
 Visitor method, used by the printer to visit all nodes in the graph.
 

Additional Inherited Members

- Protected Member Functions inherited from hh::core::abstraction::TaskNodeAbstraction
void setInitialized ()
 Set the task as initialized.
 

Detailed Description

Abstraction specialized for the execution pipeline.

Definition at line 32 of file execution_pipeline_node_abstraction.h.

Constructor & Destructor Documentation

◆ ExecutionPipelineNodeAbstraction()

hh::core::abstraction::ExecutionPipelineNodeAbstraction::ExecutionPipelineNodeAbstraction ( std::string const &  name,
behavior::Node node 
)
inlineexplicit

Constructor using the node name.

Parameters
nameNode's name
nodeNode attached to this core

Definition at line 37 of file execution_pipeline_node_abstraction.h.

Here is the call graph for this function:

◆ ~ExecutionPipelineNodeAbstraction()

hh::core::abstraction::ExecutionPipelineNodeAbstraction::~ExecutionPipelineNodeAbstraction ( )
overridedefault

Default destructor.

Member Function Documentation

◆ hasMemoryManagerAttached()

bool hh::core::abstraction::ExecutionPipelineNodeAbstraction::hasMemoryManagerAttached ( ) const
inlineoverridevirtual

Test if a node has a memory attached, an execution pipeline can't have a memory manager.

Returns
false

Implements hh::core::abstraction::TaskNodeAbstraction.

Definition at line 53 of file execution_pipeline_node_abstraction.h.

◆ ids()

std::vector< std::pair< std::string const, std::string const > > hh::core::abstraction::ExecutionPipelineNodeAbstraction::ids ( ) const
inlineoverridevirtual

Node ids [nodeId, nodeGroupId] accessor.

Returns
Node ids [nodeId, nodeGroupId] (this and this)

Implements hh::core::abstraction::NodeAbstraction.

Definition at line 47 of file execution_pipeline_node_abstraction.h.

Here is the call graph for this function:

◆ launchGraphThreads()

virtual void hh::core::abstraction::ExecutionPipelineNodeAbstraction::launchGraphThreads ( bool  waitForInitialization)
pure virtual

Launch the graphs inside of the execution pipeline, called when the outer graph is executed.

Parameters
waitForInitializationWait for internal nodes to be initialized flags

Implemented in hh::core::CoreExecutionPipeline< Separator, AllTypes >, and hh::core::CoreExecutionPipeline< Separator, AllTypes... >.

◆ memoryManager()

std::shared_ptr< AbstractMemoryManager > hh::core::abstraction::ExecutionPipelineNodeAbstraction::memoryManager ( ) const
inlineoverridevirtual

Accessor to memory manager, an execution pipeline has no memory manager.

Returns
nullptr

Implements hh::core::abstraction::TaskNodeAbstraction.

Definition at line 57 of file execution_pipeline_node_abstraction.h.

◆ minMaxExecutionDuration()

virtual std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > hh::core::abstraction::ExecutionPipelineNodeAbstraction::minMaxExecutionDuration ( ) const
pure virtual

Getter to the min max execution duration from the nodes inside the graphs in the execution pipeline.

Returns
Min max execution duration from the nodes inside the graphs in the execution pipeline

Implemented in hh::core::CoreExecutionPipeline< Separator, AllTypes >, and hh::core::CoreExecutionPipeline< Separator, AllTypes... >.

Here is the caller graph for this function:

◆ minMaxWaitDuration()

virtual std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > hh::core::abstraction::ExecutionPipelineNodeAbstraction::minMaxWaitDuration ( ) const
pure virtual

Getter to the min max wait duration from the nodes inside the graphs in the execution pipeline.

Returns
Min max wait duration from the nodes inside the graphs in the execution pipeline

Implemented in hh::core::CoreExecutionPipeline< Separator, AllTypes >, and hh::core::CoreExecutionPipeline< Separator, AllTypes... >.

Here is the caller graph for this function: