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

Abstraction for cores/nodes that can form groups. More...

#include "any_groupable_abstraction.h"

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

Public Member Functions

 AnyGroupableAbstraction (size_t const numberThreads)
 Constructor using the number of threads.
 
virtual ~AnyGroupableAbstraction ()=default
 Default destructor.
 
size_t numberThreads () const
 Accessor to the number of threads.
 
bool isInGroup () const
 Test if a group is needed.
 
std::string nodeId () const
 Accessor to the node id (redirection to NodeAbstraction::nodeId)
 
std::shared_ptr< std::set< AnyGroupableAbstraction * > > const & group () const
 Group of cores accessor.
 
std::shared_ptr< std::set< NodeAbstraction * > > groupAsNodes () const
 Create a set of the NodeAbstraction constituting the group.
 
AnyGroupableAbstractiongroupRepresentative () const
 Group representative accessor.
 
std::string groupRepresentativeId () const
 Group id representative accessor.
 
void groupRepresentative (AnyGroupableAbstraction *groupRepresentative)
 Group representative setter.
 
void group (std::shared_ptr< std::set< AnyGroupableAbstraction * > > const &group)
 Group setter.
 
size_t numberActiveThreadInGroup () const
 Accessor to the number of nodes alive in the group.
 
std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > minmaxWaitDurationGroup () const
 Accessor to the min / max wait duration of the nodes in the group.
 
std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > meanSDWaitDurationGroup () const
 Accessor to the mean / standard deviation wait duration of the nodes in the group.
 
std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > minmaxExecutionDurationGroup () const
 Accessor to the min / max execution duration of the nodes in the group.
 
std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > meanSDExecutionDurationGroup () const
 Accessor to the mean / standard deviation execution duration of the nodes in the group.
 
std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > minmaxExecTimePerElementGroup () const
 Accessor to the min / max execution per elements duration of the nodes in the group.
 
std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > meanSDExecTimePerElementGroup () const
 Accessor to the mean / standard deviation execution per elements duration of the nodes in the group.
 
std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > minmaxMemoryWaitTimeGroup () const
 Accessor to the min / max wait time duration of the nodes in the group.
 
std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > meanSDMemoryWaitTimePerElementGroup () const
 Accessor to the mean / standard deviation wait time duration of the nodes in the group.
 
std::pair< size_t, size_tminmaxNumberElementsReceivedGroup () const
 Accessor to the min / max number of elements received in the group.
 
std::pair< double, double > meanSDNumberElementsReceivedGroup () const
 Accessor to the mean / standard deviation number of elements received in the group.
 
virtual void createGroup (std::map< NodeAbstraction *, std::vector< NodeAbstraction * > > &)=0
 Create a group to insert in the map.
 

Private Attributes

size_t const numberThreads_ = 0
 Number of threads.
 
AnyGroupableAbstractiongroupRepresentative_ = nullptr
 Group representative.
 
std::shared_ptr< std::set< AnyGroupableAbstraction * > > group_ = nullptr
 Node's group.
 

Detailed Description

Abstraction for cores/nodes that can form groups.

Definition at line 39 of file any_groupable_abstraction.h.

Constructor & Destructor Documentation

◆ AnyGroupableAbstraction()

hh::core::abstraction::AnyGroupableAbstraction::AnyGroupableAbstraction ( size_t const  numberThreads)
inlineexplicit

Constructor using the number of threads.

Parameters
numberThreadsNumber of threads (cores) in the group

Definition at line 48 of file any_groupable_abstraction.h.

◆ ~AnyGroupableAbstraction()

virtual hh::core::abstraction::AnyGroupableAbstraction::~AnyGroupableAbstraction ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ createGroup()

virtual void hh::core::abstraction::AnyGroupableAbstraction::createGroup ( std::map< NodeAbstraction *, std::vector< NodeAbstraction * > > &  )
pure virtual

Create a group to insert in the map.

◆ group() [1/2]

std::shared_ptr< std::set< AnyGroupableAbstraction * > > const & hh::core::abstraction::AnyGroupableAbstraction::group ( ) const
inline

Group of cores accessor.

Returns
Group of cores

Definition at line 78 of file any_groupable_abstraction.h.

Here is the caller graph for this function:

◆ group() [2/2]

void hh::core::abstraction::AnyGroupableAbstraction::group ( std::shared_ptr< std::set< AnyGroupableAbstraction * > > const &  group)
inline

Group setter.

Parameters
groupGroup to set

Definition at line 113 of file any_groupable_abstraction.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ groupAsNodes()

std::shared_ptr< std::set< NodeAbstraction * > > hh::core::abstraction::AnyGroupableAbstraction::groupAsNodes ( ) const
inline

Create a set of the NodeAbstraction constituting the group.

Returns
Set of the NodeAbstraction constituting the group

Definition at line 84 of file any_groupable_abstraction.h.

◆ groupRepresentative() [1/2]

AnyGroupableAbstraction * hh::core::abstraction::AnyGroupableAbstraction::groupRepresentative ( ) const
inline

Group representative accessor.

Returns
Group representative

Definition at line 94 of file any_groupable_abstraction.h.

Here is the caller graph for this function:

◆ groupRepresentative() [2/2]

void hh::core::abstraction::AnyGroupableAbstraction::groupRepresentative ( AnyGroupableAbstraction groupRepresentative)
inline

Group representative setter.

Parameters
groupRepresentativeGroup representative to set

Definition at line 109 of file any_groupable_abstraction.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ groupRepresentativeId()

std::string hh::core::abstraction::AnyGroupableAbstraction::groupRepresentativeId ( ) const
inline

Group id representative accessor.

Returns
Group id representative
Exceptions
std::runtime_errorA group representative is not a NodeAbstraction

Definition at line 99 of file any_groupable_abstraction.h.

Here is the caller graph for this function:

◆ isInGroup()

bool hh::core::abstraction::AnyGroupableAbstraction::isInGroup ( ) const
inline

Test if a group is needed.

Returns
True if numberThreads != 1, else false

Definition at line 64 of file any_groupable_abstraction.h.

◆ meanSDExecTimePerElementGroup()

std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > hh::core::abstraction::AnyGroupableAbstraction::meanSDExecTimePerElementGroup ( ) const
inline

Accessor to the mean / standard deviation execution per elements duration of the nodes in the group.

Returns
>ean / standard deviation execution per elements duration in nanoseconds of the nodes in the group
Exceptions
std::runtime_errorAll the nodes in a group are not of the same types

Definition at line 292 of file any_groupable_abstraction.h.

Here is the call graph for this function:

◆ meanSDExecutionDurationGroup()

std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > hh::core::abstraction::AnyGroupableAbstraction::meanSDExecutionDurationGroup ( ) const
inline

Accessor to the mean / standard deviation execution duration of the nodes in the group.

Returns
Mean / standard deviation execution duration in nanoseconds of the nodes in the group

Definition at line 229 of file any_groupable_abstraction.h.

◆ meanSDMemoryWaitTimePerElementGroup()

std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > hh::core::abstraction::AnyGroupableAbstraction::meanSDMemoryWaitTimePerElementGroup ( ) const
inline

Accessor to the mean / standard deviation wait time duration of the nodes in the group.

Returns
Mean / standard deviation wait time duration in nanoseconds of the nodes in the group
Exceptions
std::runtime_errorAll the nodes in a group are not of the same types

Definition at line 363 of file any_groupable_abstraction.h.

Here is the call graph for this function:

◆ meanSDNumberElementsReceivedGroup()

std::pair< double, double > hh::core::abstraction::AnyGroupableAbstraction::meanSDNumberElementsReceivedGroup ( ) const
inline

Accessor to the mean / standard deviation number of elements received in the group.

Returns
Mean / standard deviation number of elements received in the group
Exceptions
std::runtime_errorAll the nodes in a group are not of the same types

Definition at line 435 of file any_groupable_abstraction.h.

Here is the call graph for this function:

◆ meanSDWaitDurationGroup()

std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > hh::core::abstraction::AnyGroupableAbstraction::meanSDWaitDurationGroup ( ) const
inline

Accessor to the mean / standard deviation wait duration of the nodes in the group.

Returns
mean / standard deviation wait duration in nanoseconds of the nodes in the group
Exceptions
std::runtime_errorAll the nodes in a group are not of the same types

Definition at line 175 of file any_groupable_abstraction.h.

Here is the call graph for this function:

◆ minmaxExecTimePerElementGroup()

std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > hh::core::abstraction::AnyGroupableAbstraction::minmaxExecTimePerElementGroup ( ) const
inline

Accessor to the min / max execution per elements duration of the nodes in the group.

Returns
Min / max execution per elements duration in nanoseconds of the nodes in the group
Exceptions
std::runtime_errorAll the nodes in a group are not of the same types

Definition at line 258 of file any_groupable_abstraction.h.

Here is the call graph for this function:

◆ minmaxExecutionDurationGroup()

std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > hh::core::abstraction::AnyGroupableAbstraction::minmaxExecutionDurationGroup ( ) const
inline

Accessor to the min / max execution duration of the nodes in the group.

Returns
Min / max execution duration in nanoseconds of the nodes in the group

Definition at line 215 of file any_groupable_abstraction.h.

◆ minmaxMemoryWaitTimeGroup()

std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > hh::core::abstraction::AnyGroupableAbstraction::minmaxMemoryWaitTimeGroup ( ) const
inline

Accessor to the min / max wait time duration of the nodes in the group.

Returns
Min / max wait time duration in nanoseconds of the nodes in the group
Exceptions
std::runtime_errorAll the nodes in a group are not of the same types

Definition at line 331 of file any_groupable_abstraction.h.

Here is the call graph for this function:

◆ minmaxNumberElementsReceivedGroup()

std::pair< size_t, size_t > hh::core::abstraction::AnyGroupableAbstraction::minmaxNumberElementsReceivedGroup ( ) const
inline

Accessor to the min / max number of elements received in the group.

Returns
Min / max number of elements received in the group
Exceptions
std::runtime_errorAll the nodes in a group are not of the same types

Definition at line 402 of file any_groupable_abstraction.h.

Here is the call graph for this function:

◆ minmaxWaitDurationGroup()

std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > hh::core::abstraction::AnyGroupableAbstraction::minmaxWaitDurationGroup ( ) const
inline

Accessor to the min / max wait duration of the nodes in the group.

Returns
Min / max wait duration in nanoseconds of the nodes in the group
Exceptions
std::runtime_errorAll the nodes in a group are not of the same types

Definition at line 140 of file any_groupable_abstraction.h.

Here is the call graph for this function:

◆ nodeId()

std::string hh::core::abstraction::AnyGroupableAbstraction::nodeId ( ) const
inline

Accessor to the node id (redirection to NodeAbstraction::nodeId)

Returns
Node id

Definition at line 68 of file any_groupable_abstraction.h.

◆ numberActiveThreadInGroup()

size_t hh::core::abstraction::AnyGroupableAbstraction::numberActiveThreadInGroup ( ) const
inline

Accessor to the number of nodes alive in the group.

Returns
Number of nodes alive in the group
Exceptions
std::runtime_errorThe cores in the groups are not of the same type

Definition at line 118 of file any_groupable_abstraction.h.

◆ numberThreads()

size_t hh::core::abstraction::AnyGroupableAbstraction::numberThreads ( ) const
inline

Accessor to the number of threads.

Returns
Group's number of threads

Definition at line 60 of file any_groupable_abstraction.h.

Here is the caller graph for this function:

Member Data Documentation

◆ group_

std::shared_ptr<std::set<AnyGroupableAbstraction *> > hh::core::abstraction::AnyGroupableAbstraction::group_ = nullptr
private

Node's group.

Definition at line 43 of file any_groupable_abstraction.h.

◆ groupRepresentative_

AnyGroupableAbstraction* hh::core::abstraction::AnyGroupableAbstraction::groupRepresentative_ = nullptr
private

Group representative.

Definition at line 42 of file any_groupable_abstraction.h.

◆ numberThreads_

size_t const hh::core::abstraction::AnyGroupableAbstraction::numberThreads_ = 0
private

Number of threads.

Definition at line 41 of file any_groupable_abstraction.h.