HTGS  v2.0
The Hybrid Task Graph Scheduler
htgs::MemoryEdge< T > Class Template Reference

Implements the memory edge that is added to the graph. More...

#include <htgs/core/graph/edge/MemoryEdge.hpp>

Inheritance diagram for htgs::MemoryEdge< T >:
Inheritance graph
Collaboration diagram for htgs::MemoryEdge< T >:
Collaboration graph

Public Member Functions

 MemoryEdge (const std::string &memoryEdgeName, AnyITask *getMemoryTask, MemoryManager< T > *memoryManager)
 Creates a memory edge. More...
 
void applyEdge (AnyTaskGraphConf *graph) override
 Applies an edge to a task graph. More...
 
EdgeDescriptorcopy (AnyTaskGraphConf *graph) override
 Creates a copy of the edge descriptor to be added to other graphs, such as those within execution pipelines. More...
 
- Public Member Functions inherited from htgs::EdgeDescriptor
virtual ~EdgeDescriptor ()
 Destructor.
 

Private Attributes

std::string memoryEdgeName
 The name of the memory edge.
 
AnyITaskgetMemoryTask
 The task that is getting memory.
 
MemoryManager< T > * memoryManager
 the memory manager task
 

Detailed Description

template<class T>
class htgs::MemoryEdge< T >

Implements the memory edge that is added to the graph.

This edge connects a memory manager to a task that is receiving the memory.

When applying the edge, the memory manager task is created and its associated input and output connectors. The output connector is added to the task that is getting memory to receive the memory data from the memory manager.

During edge copying the task getting memory, and the memory manager are copied. The memory edge name is reused.

Template Parameters
Tthe type of data that is allocated by the memory manager

Constructor & Destructor Documentation

◆ MemoryEdge()

template<class T>
htgs::MemoryEdge< T >::MemoryEdge ( const std::string &  memoryEdgeName,
AnyITask getMemoryTask,
MemoryManager< T > *  memoryManager 
)
inline

Creates a memory edge.

Parameters
memoryEdgeNamethe name of the memory edge
getMemoryTaskthe task getting memory
memoryManagerthe memory manager task

Member Function Documentation

◆ applyEdge()

template<class T>
void htgs::MemoryEdge< T >::applyEdge ( AnyTaskGraphConf graph)
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.

Parameters
graphthe task graph configuration that the edge is applied to.

Implements htgs::EdgeDescriptor.

◆ copy()

template<class T>
EdgeDescriptor* htgs::MemoryEdge< T >::copy ( AnyTaskGraphConf graph)
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.

Parameters
graphthe graph you are getting ITask copies from.
Returns
a new EdgeDescriptor to be used to apply edges to a future task graph configuration.

Implements htgs::EdgeDescriptor.


The documentation for this class was generated from the following file: