![]() |
HTGS
v2.0
The Hybrid Task Graph Scheduler
|
Implements the producer consumer edge that connects two tasks where one task is producing data and the other is consuming. More...
#include <htgs/core/graph/edge/ProducerConsumerEdge.hpp>
Public Member Functions | |
ProducerConsumerEdge (ITask< T, U > *producer, ITask< U, W > *consumer) | |
Constructs a producer consumer edge. More... | |
void | applyEdge (AnyTaskGraphConf *graph) override |
Applies an edge to a task graph. More... | |
EdgeDescriptor * | copy (AnyTaskGraphConf *graph) override |
Creates a copy of the edge descriptor to be added to other graphs, such as those within execution pipelines. More... | |
![]() | |
virtual | ~EdgeDescriptor () |
Destructor. | |
Private Attributes | |
ITask< T, U > * | producer |
The producer ITask. | |
ITask< U, W > * | consumer |
The consumer ITask. | |
Implements the producer consumer edge that connects two tasks where one task is producing data and the other is consuming.
The edge is applied by getting the task managers for two ITasks and setting the output and input connectors for the producer and consumer tasks to be the same, respectively.
When the edge is copied the ITasks that represent the producer and consumer are retrieved from the task graph that will become the copied graph.
T | the input type of the producer task |
U | the output type of the producer task and the input type of the consumer task |
W | the output type of the consumer task |
|
inline |
Constructs a producer consumer edge.
producer | the task producing data |
consumer | the task consuming the data from the producer task |
|
inlineoverridevirtual |
Applies an edge to a task graph.
An edge is added to the supplied task graph. Each ITask is obtains a task manager that is to be used to manage the ITask. The graph has helper function AnyTaskGraphConf::getTaskManager. This is used to get the correct task manager that is to be used for a given ITask.
graph | the task graph configuration that the edge is applied to. |
Implements htgs::EdgeDescriptor.
|
inlineoverridevirtual |
Creates a copy of the edge descriptor to be added to other graphs, such as those within execution pipelines.
The edge descriptor typically has ITasks that are added to a TaskManager, which is then added to the task graph. The copy function is used to copy the ITasks and any other meta data that is needed for applying the edge. The implementation should use the AnyTaskGraphConf::getCopy function to get copies of the ITask.
graph | the graph you are getting ITask copies from. |
Implements htgs::EdgeDescriptor.