Hedgehog  3.1.0
A library to generate hybrid pipeline workflow systems
Loading...
Searching...
No Matches
hh::core::CoreGraph< Separator, AllTypes > Class Template Reference

Graph core. More...

#include "core_graph.h"

Inheritance diagram for hh::core::CoreGraph< Separator, AllTypes >:
Inheritance graph
Collaboration diagram for hh::core::CoreGraph< Separator, AllTypes >:
Collaboration graph

Public Member Functions

 CoreGraph (std::string const &name, std::unique_ptr< Scheduler > scheduler, hh::Graph< Separator, AllTypes... > *graph)
 Core Graph constructor using the name and the scheduler.
 
 CoreGraph (CoreGraph const &rhs, std::map< NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &correspondenceMap)
 Copy constructor using an added correspondence map.
 
 ~CoreGraph () override=default
 Default destructor.
 
template<class CoreInputTypes , tool::CompatibleInputCore< CoreInputTypes, typename GIM< Separator, AllTypes... >::inputs_t > InputCore>
void setInputForAllCommonTypes (InputCore *const core)
 Connect a core's node as input of the graph for all compatible types.
 
template<class InputType , class CoreInputTypes , tool::CompatibleInputCoreForAType< InputType, CoreInputTypes, typename GIM< Separator, AllTypes... >::inputs_t > InputCore>
void setInputForACommonType (InputCore *const core)
 Connect a core's node as input of the graph for an compatible input type.
 
template<class CoreOutputTypes , tool::CompatibleOutputCore< CoreOutputTypes, typename GOM< Separator, AllTypes... >::outputs_t > OutputCore>
void setOutputForAllCommonTypes (OutputCore *const core)
 Connect a core's node as output of the graph for all compatible types.
 
template<class OutputType , class CoreOutputTypes , tool::CompatibleOutputCoreForAType< OutputType, CoreOutputTypes, typename GOM< Separator, AllTypes... >::outputs_t > OutputCore>
void setOutputForACommonType (OutputCore *const core)
 Connect a core's node as output of the graph for a compatible type.
 
template<class OutputTypesSenderTuple , class InputTypeReceiverTuple >
void addEdgeForAllCommonTypes (NodeAbstraction *const senderCore, NodeAbstraction *const receiverCore)
 Connect two nodes together for all common types.
 
template<class CommonType , class OutputTypesSenderTuple , class InputTypeReceiverTuple >
void addEdgeForACommonType (NodeAbstraction *const senderCore, NodeAbstraction *const receiverCore)
 Connect two nodes together for a common type.
 
void executeGraph (bool waitForInitialization)
 Execute the graph.
 
void finishPushingData ()
 Indicate to the graph that no more input will be sent, trigger the termination of the graph.
 
void waitForTermination ()
 Wait for the graph to terminate.
 
template<tool::MatchInputTypeConcept< tool::Inputs< Separator, AllTypes... > > CompatibleInputType_t>
void broadcastAndNotifyAllInputNodes (std::shared_ptr< CompatibleInputType_t > &data)
 Broadcast an input data to all inputs nodes.
 
void visit (Printer *printer) override
 Visit the graph.
 
void cleanGraph ()
 Clean the graph.
 
std::vector< std::pair< std::string const, std::string const > > ids () const override
 Node ids [nodeId, nodeGroupId] accessor.
 
behavior::Nodenode () const override
 Node accessor.
 
- Public Member Functions inherited from hh::core::abstraction::GraphNodeAbstraction
 GraphNodeAbstraction (std::string const &name)
 Base graph abstraction.
 
 ~GraphNodeAbstraction () override=default
 Default destructor.
 
int deviceId () const override
 Device id accessor.
 
size_t graphId () const override
 Graph id accessor.
 
Status graphStatus () const
 Graph status accessor.
 
std::chrono::time_point< std::chrono::system_clock > const & graphStartCreation () const
 Graph start creation timestamp accessor.
 
std::chrono::nanoseconds const & graphConstructionDuration () const
 Graph construction duration accessor.
 
void deviceId (int deviceId)
 Setter to the device id.
 
void graphId (size_t graphId)
 Setter to the graph id.
 
void graphConstructionDuration (std::chrono::nanoseconds const &graphConstructionDuration)
 Setter to the graph construction duration.
 
void registerNode (GraphNodeAbstraction *belongingGraph) override
 Register a graph inside a graph.
 
std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > minMaxExecutionDuration () const
 Accessor to the min / max execution duration of the nodes in the graph.
 
std::pair< std::chrono::nanoseconds, std::chrono::nanoseconds > minMaxWaitDuration () const
 Accessor to the min / max wait duration of the nodes in the graph.
 
virtual void joinThreads ()=0
 Interface to join the threads inside of a graph, called by the Default scheduler.
 
virtual void setInside ()=0
 Set a graph inside another one.
 
virtual void createInnerGroupsAndLaunchThreads (bool waitForInitialization)=0
 Create the groups and launch the threads of the inside nodes.
 
virtual void registerNodeInsideGraph (NodeAbstraction *core)=0
 Register a core inside a graph.
 
- 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.
 
- Public Member Functions inherited from hh::core::abstraction::CleanableAbstraction
 CleanableAbstraction ()=default
 Constructor used by the CoreGraph to have the handles to clean inner cleanable nodes.
 
 CleanableAbstraction (behavior::Cleanable *const cleanableNode)
 Constructor used by cleanable nodes.
 
virtual ~CleanableAbstraction ()=default
 Default destructor.
 
virtual void gatherCleanable (std::unordered_set< hh::behavior::Cleanable * > &cleanableSet)
 Gather cleanable node from the graph, and the state manager.
 
- Public Member Functions inherited from hh::core::abstraction::ClonableAbstraction
 ClonableAbstraction ()
 Default constructor.
 
virtual ~ClonableAbstraction ()=default
 Default destructor.
 
void storeClone (std::shared_ptr< abstraction::NodeAbstraction > const &clone)
 Store a core clone.
 
virtual std::shared_ptr< abstraction::NodeAbstractionclone (std::map< NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &correspondenceMap)=0
 Clone virtual function.
 
virtual void duplicateEdge (std::map< NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &mapping)=0
 Duplicate the output edges of a node.
 

Private Member Functions

void joinThreads () override
 Wait for the threads to join.
 
void setInside () override
 Set the graph as inside of another graph.
 
void registerNodeInsideGraph (NodeAbstraction *const core) override
 Register a node inside of a graph.
 
template<class InputTypes , size_t ... Indices>
void callAddInputNodeToGraph (NodeAbstraction *const core, std::index_sequence< Indices... >)
 Call addInputNodeToGraph for all type-elements of a tuple.
 
template<class OutputTypes , size_t ... Indices>
void callAddOutputNodeToGraph (NodeAbstraction *const core, std::index_sequence< Indices... >)
 Call addOutputNodeToGraph for all type-elements of a tuple.
 
void connectNotifierToSlot (NodeAbstraction *senderCore, NodeAbstraction *receiverCore)
 Connect a notifier to a slot, used when connecting two nodes.
 
template<class CommonType >
void drawEdge (NodeAbstraction *const senderCore, NodeAbstraction *const receiverCore)
 Do the actual typed connection between a sender and receiver.
 
template<class CommonTypes , size_t ... Indexes>
void drawEdges (NodeAbstraction *const senderCore, NodeAbstraction *const receiverCore, std::index_sequence< Indexes... >)
 Do the actual typed connections between a sender and receiver.
 
template<class TupleInputs , size_t... Indices>
void testAbstractReceivers (NodeAbstraction *const core, std::index_sequence< Indices... >)
 Test a core if it can receives data of specific types.
 
template<class TupleOutputs , size_t... Indices>
void testAbstractSenders (NodeAbstraction *const core, std::index_sequence< Indices... >)
 Test a core if it can send data of specific types.
 
void testRegistered (auto const &funcName)
 Test if the graph has been registered.
 
void createInnerGroupsAndLaunchThreads (bool waitForInitialization) override
 Create the inner groups and launch the threads inside of a graph.
 
void launchThreads (bool waitForInitialization)
 Launch the threads with the scheduler.
 
void gatherCleanable (std::unordered_set< hh::behavior::Cleanable * > &cleanableSet) override
 Gather cleanable nodes.
 
std::shared_ptr< abstraction::NodeAbstractionclone (std::map< NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &correspondenceMap) override
 Clone the current graph.
 
void duplicateInsideNodes (CoreGraph const &rhs, std::map< NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &correspondenceMap)
 Clone all of the inside nodes.
 
void duplicateEdge (std::map< NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &mapping) override
 Duplicate the graph output's edges.
 

Private Attributes

friend CoreExecutionPipeline< Separator, AllTypes... >
 Declare CoreExecutionPipeline as friend.
 
std::unique_ptr< Scheduler > const scheduler_ = nullptr
 Scheduler used by the graph.
 
hh::Graph< Separator, AllTypes... > *const graph_
 Graph attached to this core.
 

Additional Inherited Members

- Public Types inherited from hh::core::abstraction::GraphNodeAbstraction
enum  Status { INIT , EXEC , TERM , INS }
 Graph status (INITialisation, EXECution, TERMination, INSide) More...
 
- Protected Attributes inherited from hh::core::abstraction::GraphNodeAbstraction
std::unique_ptr< std::map< NodeAbstraction *, std::vector< NodeAbstraction * > > > const insideNodesAndGroups_ = nullptr
 All nodes of the graph, mapped to their group nodes.
 
Status graphStatus_ = Status::INIT
 Group status.
 

Detailed Description

template<size_t Separator, class ... AllTypes>
class hh::core::CoreGraph< Separator, AllTypes >

Graph core.

Template Parameters
SeparatorSeparator position between input types and output types
AllTypesList of input and output types

Definition at line 76 of file core_graph.h.

Constructor & Destructor Documentation

◆ CoreGraph() [1/2]

template<size_t Separator, class ... AllTypes>
hh::core::CoreGraph< Separator, AllTypes >::CoreGraph ( std::string const &  name,
std::unique_ptr< Scheduler scheduler,
hh::Graph< Separator, AllTypes... > *  graph 
)
inlineexplicit

Core Graph constructor using the name and the scheduler.

Parameters
nameGraph name
schedulerGraph scheduler
graphGraph node attached to this core

Definition at line 94 of file core_graph.h.

◆ CoreGraph() [2/2]

template<size_t Separator, class ... AllTypes>
hh::core::CoreGraph< Separator, AllTypes >::CoreGraph ( CoreGraph< Separator, AllTypes > const &  rhs,
std::map< NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &  correspondenceMap 
)
inline

Copy constructor using an added correspondence map.

Parameters
rhsCoreGraph to copy
correspondenceMapCorrespondence map

Definition at line 105 of file core_graph.h.

Here is the call graph for this function:

◆ ~CoreGraph()

template<size_t Separator, class ... AllTypes>
hh::core::CoreGraph< Separator, AllTypes >::~CoreGraph ( )
overridedefault

Default destructor.

Member Function Documentation

◆ addEdgeForACommonType()

template<size_t Separator, class ... AllTypes>
template<class CommonType , class OutputTypesSenderTuple , class InputTypeReceiverTuple >
void hh::core::CoreGraph< Separator, AllTypes >::addEdgeForACommonType ( NodeAbstraction *const  senderCore,
NodeAbstraction *const  receiverCore 
)
inline

Connect two nodes together for a common type.

Template Parameters
CommonTypeType used for the edge
OutputTypesSenderTupleSender output types
InputTypeReceiverTupleReceiver Input types
Parameters
senderCoreType of the sender
receiverCoreType of the receiver

Definition at line 242 of file core_graph.h.

Here is the call graph for this function:

◆ addEdgeForAllCommonTypes()

template<size_t Separator, class ... AllTypes>
template<class OutputTypesSenderTuple , class InputTypeReceiverTuple >
void hh::core::CoreGraph< Separator, AllTypes >::addEdgeForAllCommonTypes ( NodeAbstraction *const  senderCore,
NodeAbstraction *const  receiverCore 
)
inline

Connect two nodes together for all common types.

Template Parameters
OutputTypesSenderTupleSender output types
InputTypeReceiverTupleReceiver Input types
Parameters
senderCoreType of the sender
receiverCoreType of the receiver

Definition at line 210 of file core_graph.h.

Here is the call graph for this function:

◆ broadcastAndNotifyAllInputNodes()

template<size_t Separator, class ... AllTypes>
template<tool::MatchInputTypeConcept< tool::Inputs< Separator, AllTypes... > > CompatibleInputType_t>
void hh::core::CoreGraph< Separator, AllTypes >::broadcastAndNotifyAllInputNodes ( std::shared_ptr< CompatibleInputType_t > &  data)
inline

Broadcast an input data to all inputs nodes.

Template Parameters
CompatibleInputType_tType of the input data
Parameters
dataData to broadcast

Definition at line 299 of file core_graph.h.

Here is the call graph for this function:

◆ callAddInputNodeToGraph()

template<size_t Separator, class ... AllTypes>
template<class InputTypes , size_t ... Indices>
void hh::core::CoreGraph< Separator, AllTypes >::callAddInputNodeToGraph ( NodeAbstraction *const  core,
std::index_sequence< Indices... >   
)
inlineprivate

Call addInputNodeToGraph for all type-elements of a tuple.

Template Parameters
InputTypesTuple of input types
IndicesTuple indices
Parameters
coreCore to set as input of the graph

Definition at line 408 of file core_graph.h.

◆ callAddOutputNodeToGraph()

template<size_t Separator, class ... AllTypes>
template<class OutputTypes , size_t ... Indices>
void hh::core::CoreGraph< Separator, AllTypes >::callAddOutputNodeToGraph ( NodeAbstraction *const  core,
std::index_sequence< Indices... >   
)
inlineprivate

Call addOutputNodeToGraph for all type-elements of a tuple.

Template Parameters
InputTypesTuple of output types
IndicesTuple indices
Parameters
coreCore to set as output of the graph

Definition at line 417 of file core_graph.h.

◆ cleanGraph()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::cleanGraph ( )
inline

Clean the graph.

Call clean recursively all nodes that can be cleaned

Definition at line 327 of file core_graph.h.

Here is the call graph for this function:

◆ clone()

template<size_t Separator, class ... AllTypes>
std::shared_ptr< abstraction::NodeAbstraction > hh::core::CoreGraph< Separator, AllTypes >::clone ( std::map< NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &  correspondenceMap)
inlineoverrideprivate

Clone the current graph.

Parameters
correspondenceMapCorrespondence map to register clone
Returns
Clone of the grpah

Definition at line 577 of file core_graph.h.

◆ connectNotifierToSlot()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::connectNotifierToSlot ( NodeAbstraction senderCore,
NodeAbstraction receiverCore 
)
inlineprivate

Connect a notifier to a slot, used when connecting two nodes.

Parameters
senderCoreNotifier to connect
receiverCoreSlot to connect
Exceptions
std::runtime_errorThe nodes are ill-formed

Definition at line 425 of file core_graph.h.

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

◆ createInnerGroupsAndLaunchThreads()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::createInnerGroupsAndLaunchThreads ( bool  waitForInitialization)
inlineoverrideprivatevirtual

Create the inner groups and launch the threads inside of a graph.

Parameters
waitForInitializationWait for internal nodes to be initialized flags

Implements hh::core::abstraction::GraphNodeAbstraction.

Definition at line 529 of file core_graph.h.

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

◆ drawEdge()

template<size_t Separator, class ... AllTypes>
template<class CommonType >
void hh::core::CoreGraph< Separator, AllTypes >::drawEdge ( NodeAbstraction *const  senderCore,
NodeAbstraction *const  receiverCore 
)
inlineprivate

Do the actual typed connection between a sender and receiver.

Template Parameters
CommonTypeType to do the connection
Parameters
senderCoreSender core
receiverCoreReceiver core

Definition at line 456 of file core_graph.h.

◆ drawEdges()

template<size_t Separator, class ... AllTypes>
template<class CommonTypes , size_t ... Indexes>
void hh::core::CoreGraph< Separator, AllTypes >::drawEdges ( NodeAbstraction *const  senderCore,
NodeAbstraction *const  receiverCore,
std::index_sequence< Indexes... >   
)
inlineprivate

Do the actual typed connections between a sender and receiver.

Template Parameters
CommonTypesTuple with common types
IndexesIndexes of CommonTypes tuple
Parameters
senderCoreSender core
receiverCoreReceiver core

Definition at line 476 of file core_graph.h.

◆ duplicateEdge()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::duplicateEdge ( std::map< NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &  mapping)
inlineoverrideprivate

Duplicate the graph output's edges.

Parameters
mappingMap between nodes and their clones

Definition at line 613 of file core_graph.h.

◆ duplicateInsideNodes()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::duplicateInsideNodes ( CoreGraph< Separator, AllTypes > const &  rhs,
std::map< NodeAbstraction *, std::shared_ptr< NodeAbstraction > > &  correspondenceMap 
)
inlineprivate

Clone all of the inside nodes.

Parameters
rhsCoreGraph to clone
correspondenceMapMap between nodes and their clones

Definition at line 585 of file core_graph.h.

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

◆ executeGraph()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::executeGraph ( bool  waitForInitialization)
inline

Execute the graph.

Create the needed groups and use the scheduler to create the threads

Parameters
waitForInitializationWait for internal nodes to be initialized flags

Definition at line 270 of file core_graph.h.

Here is the call graph for this function:

◆ finishPushingData()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::finishPushingData ( )
inline

Indicate to the graph that no more input will be sent, trigger the termination of the graph.

Definition at line 280 of file core_graph.h.

Here is the call graph for this function:

◆ gatherCleanable()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::gatherCleanable ( std::unordered_set< hh::behavior::Cleanable * > &  cleanableSet)
inlineoverrideprivatevirtual

Gather cleanable nodes.

Parameters
cleanableSetMutable set of cleanable ndoes

Reimplemented from hh::core::abstraction::CleanableAbstraction.

Definition at line 560 of file core_graph.h.

Here is the caller graph for this function:

◆ ids()

template<size_t Separator, class ... AllTypes>
std::vector< std::pair< std::string const, std::string const > > hh::core::CoreGraph< Separator, AllTypes >::ids ( ) const
inlineoverridevirtual

Node ids [nodeId, nodeGroupId] accessor.

Returns
Node ids [nodeId, nodeGroupId]
Exceptions
std::runtime_errorif the node is ill-formed

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

Definition at line 351 of file core_graph.h.

Here is the call graph for this function:

◆ joinThreads()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::joinThreads ( )
inlineoverrideprivatevirtual

Wait for the threads to join.

Implements hh::core::abstraction::GraphNodeAbstraction.

Definition at line 371 of file core_graph.h.

Here is the caller graph for this function:

◆ launchThreads()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::launchThreads ( bool  waitForInitialization)
inlineprivate

Launch the threads with the scheduler.

Parameters
waitForInitializationWait for internal nodes to be initialized flags

Definition at line 547 of file core_graph.h.

Here is the caller graph for this function:

◆ node()

template<size_t Separator, class ... AllTypes>
behavior::Node * hh::core::CoreGraph< Separator, AllTypes >::node ( ) const
inlineoverridevirtual

Node accessor.

Returns
Node attached to this core

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

Definition at line 367 of file core_graph.h.

◆ registerNodeInsideGraph()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::registerNodeInsideGraph ( NodeAbstraction *const  core)
inlineoverrideprivate

Register a node inside of a graph.

Parameters
coreCore to register
Exceptions
std::runtime_errorTry to modify a graph that has been set as inside of another graph, or set the graph as inside of itself

Definition at line 384 of file core_graph.h.

Here is the caller graph for this function:

◆ setInputForACommonType()

template<size_t Separator, class ... AllTypes>
template<class InputType , class CoreInputTypes , tool::CompatibleInputCoreForAType< InputType, CoreInputTypes, typename GIM< Separator, AllTypes... >::inputs_t > InputCore>
void hh::core::CoreGraph< Separator, AllTypes >::setInputForACommonType ( InputCore *const  core)
inline

Connect a core's node as input of the graph for an compatible input type.

Template Parameters
InputTypeInput node type
CoreInputTypesInput node types
InputCoreType of the core to set as input
Parameters
coreCore to set as input
Exceptions
std::runtimeif the core is malformed (missing inheritance to SlotAbstraction)

Definition at line 154 of file core_graph.h.

Here is the call graph for this function:

◆ setInputForAllCommonTypes()

template<size_t Separator, class ... AllTypes>
template<class CoreInputTypes , tool::CompatibleInputCore< CoreInputTypes, typename GIM< Separator, AllTypes... >::inputs_t > InputCore>
void hh::core::CoreGraph< Separator, AllTypes >::setInputForAllCommonTypes ( InputCore *const  core)
inline

Connect a core's node as input of the graph for all compatible types.

Template Parameters
CoreInputTypesInput node types
InputCoreType of the core to set as input
Parameters
coreCore to set as input
Exceptions
std::runtimeif the core is malformed (missing inheritance to SlotAbstraction)

Definition at line 126 of file core_graph.h.

Here is the call graph for this function:

◆ setInside()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::setInside ( )
inlineoverrideprivatevirtual

Set the graph as inside of another graph.

Implements hh::core::abstraction::GraphNodeAbstraction.

Definition at line 374 of file core_graph.h.

◆ setOutputForACommonType()

template<size_t Separator, class ... AllTypes>
template<class OutputType , class CoreOutputTypes , tool::CompatibleOutputCoreForAType< OutputType, CoreOutputTypes, typename GOM< Separator, AllTypes... >::outputs_t > OutputCore>
void hh::core::CoreGraph< Separator, AllTypes >::setOutputForACommonType ( OutputCore *const  core)
inline

Connect a core's node as output of the graph for a compatible type.

Template Parameters
OutputTypeOutput node type
CoreOutputTypesOutput node types
OutputCoreType of the core to set as output
Parameters
coreCore to set as output

Definition at line 192 of file core_graph.h.

Here is the call graph for this function:

◆ setOutputForAllCommonTypes()

template<size_t Separator, class ... AllTypes>
template<class CoreOutputTypes , tool::CompatibleOutputCore< CoreOutputTypes, typename GOM< Separator, AllTypes... >::outputs_t > OutputCore>
void hh::core::CoreGraph< Separator, AllTypes >::setOutputForAllCommonTypes ( OutputCore *const  core)
inline

Connect a core's node as output of the graph for all compatible types.

Template Parameters
CoreOutputTypesOutput node types
OutputCoreType of the core to set as output
Parameters
coreCore to set as output

Definition at line 172 of file core_graph.h.

Here is the call graph for this function:

◆ testAbstractReceivers()

template<size_t Separator, class ... AllTypes>
template<class TupleInputs , size_t... Indices>
void hh::core::CoreGraph< Separator, AllTypes >::testAbstractReceivers ( NodeAbstraction *const  core,
std::index_sequence< Indices... >   
)
inlineprivate

Test a core if it can receives data of specific types.

Template Parameters
TupleInputsTuple of types to test
IndicesIndices of TupleInputs tuple
Parameters
coreCore to test
Exceptions
std::runtime_errorif core does not inherit from ReceiverAbstraction

Definition at line 489 of file core_graph.h.

◆ testAbstractSenders()

template<size_t Separator, class ... AllTypes>
template<class TupleOutputs , size_t... Indices>
void hh::core::CoreGraph< Separator, AllTypes >::testAbstractSenders ( NodeAbstraction *const  core,
std::index_sequence< Indices... >   
)
inlineprivate

Test a core if it can send data of specific types.

Template Parameters
TupleOutputsTuple of types to test
IndicesIndices of TupleOutputs tuple
Parameters
coreCore to test
Exceptions
std::runtime_errorif core does not inherit from SenderAbstraction

Definition at line 506 of file core_graph.h.

◆ testRegistered()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::testRegistered ( auto const &  funcName)
inlineprivate

Test if the graph has been registered.

Parameters
funcNameFunction name calling the registration test

Definition at line 519 of file core_graph.h.

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

◆ visit()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::visit ( Printer printer)
inlineoverridevirtual

Visit the graph.

Parameters
printerPrinter gathering node information

Implements hh::core::abstraction::PrintableAbstraction.

Definition at line 307 of file core_graph.h.

Here is the call graph for this function:

◆ waitForTermination()

template<size_t Separator, class ... AllTypes>
void hh::core::CoreGraph< Separator, AllTypes >::waitForTermination ( )
inline

Wait for the graph to terminate.

Wait for the inner threads to join

Definition at line 288 of file core_graph.h.

Here is the call graph for this function:

Member Data Documentation

◆ CoreExecutionPipeline< Separator, AllTypes... >

template<size_t Separator, class ... AllTypes>
friend hh::core::CoreGraph< Separator, AllTypes >::CoreExecutionPipeline< Separator, AllTypes... >
private

Declare CoreExecutionPipeline as friend.

Definition at line 84 of file core_graph.h.

◆ graph_

template<size_t Separator, class ... AllTypes>
hh::Graph<Separator, AllTypes...>* const hh::core::CoreGraph< Separator, AllTypes >::graph_
private

Graph attached to this core.

Definition at line 88 of file core_graph.h.

◆ scheduler_

template<size_t Separator, class ... AllTypes>
std::unique_ptr<Scheduler> const hh::core::CoreGraph< Separator, AllTypes >::scheduler_ = nullptr
private

Scheduler used by the graph.

Definition at line 86 of file core_graph.h.