13 #ifndef HTGS_TASKGRAPHCONF_HPP 14 #define HTGS_TASKGRAPHCONF_HPP 17 #include <htgs/core/graph/edge/GraphTaskProducerEdge.hpp> 19 #include <htgs/core/graph/edge/GraphEdge.hpp> 26 #include <htgs/core/graph/edge/GraphRuleProducerEdge.hpp> 27 #include <htgs/core/graph/edge/GraphTaskConsumerEdge.hpp> 34 #include <htgs/core/graph/profile/CustomProfile.hpp> 35 #include <htgs/core/graph/profile/WebSocketProfiler.hpp> 40 template <
class T,
class U>
41 class ExecutionPipeline;
43 template <
class T,
class U>
143 template<
class T,
class U>
145 static_assert(std::is_base_of<IData, T>::value,
"T must derive from IData");
146 static_assert(std::is_base_of<IData, U>::value,
"U must derive from IData");
157 this->
input->incrementInputTaskCount();
161 this->
edges =
new std::list<EdgeDescriptor *>();
168 WebSocketProfiler *profileTask =
new WebSocketProfiler();
176 profileTask->getMicroTimeoutTime(),
182 wsConnector->incrementInputTaskCount();
187 this->taskConnectorCommunicator->addTaskNameConnectorPair(pair);
190 std::shared_ptr<ProfileData> createGraphData(
new CreateNodeProfile(
this,
nullptr,
""));
191 this->sendProfileData(createGraphData);
193 std::cout <<
"Creating " << this->wsProfileTaskManager->getName() <<
" with connector addr: " << wsConnector << std::endl;
207 std::string baseAddress
217 this->
input->incrementInputTaskCount();
222 edges =
new std::list<EdgeDescriptor *>();
228 this->wsProfileTaskManager = wsProfileTaskManager;
229 this->wsProfileThread =
nullptr;
238 for (
auto edge : *
edges) {
239 if (edge !=
nullptr) {
248 if (wsProfileThread !=
nullptr)
250 this->wsProfileTaskManager->getInputConnector()->producerFinished();
251 this->wsProfileTaskManager->getInputConnector()->wakeupConsumer();
252 this->wsProfileThread->join();
254 delete wsProfileTaskManager;
255 wsProfileTaskManager =
nullptr;
257 delete wsProfileThread;
258 wsProfileThread =
nullptr;
260 delete runtimeThread;
261 runtimeThread =
nullptr;
287 if (edge !=
nullptr) {
294 graphProducerEdges =
nullptr;
308 return copy(pipelineId, numPipelines,
nullptr,
nullptr, this->
getAddress());
325 std::string baseAddress) {
332 std::shared_ptr<ProfileData> createGraphData(
new CreateNodeProfile(graphCopy,
this,
""));
333 this->sendProfileData(createGraphData);
341 if (
input !=
nullptr) {
352 graphCopy->setGraphConsumerEdge(consumerEdge);
358 graphCopy->addGraphProducerEdge(producerEdgeCopy);
373 graphCopy->addEdgeDescriptor(edgeCopy);
387 template<
class V,
class W,
class X>
391 this->addEdgeDescriptor(pce);
405 template<
class V,
class IRuleType,
class W,
class X>
407 static_assert(std::is_base_of<
IRule<V, W>, IRuleType>::value,
408 "Type mismatch for IRule<V, W>, V must match the input type of the bookkeeper and W must match the input type of the consumer!");
409 std::shared_ptr<IRule<V, W>> ruleCast = std::static_pointer_cast<
IRule<V, W>>(rule);
412 this->addEdgeDescriptor(re);
424 template<
class V,
class W,
class X>
426 std::shared_ptr<IRule<V, W>> rule = super::getIRule(iRule);
430 this->addEdgeDescriptor(re);
447 template<
class V,
class IMemoryAllocatorType>
450 std::shared_ptr<IMemoryAllocatorType> allocator,
451 size_t memoryPoolSize,
455 "Type mismatch for allocator, allocator must be a MemoryAllocator!");
457 std::shared_ptr<IMemoryAllocator<V>> memAllocator = std::static_pointer_cast<
IMemoryAllocator<V>>(allocator);
462 memEdge->applyEdge(
this);
463 this->addEdgeDescriptor(memEdge);
486 size_t memoryPoolSize,
490 std::shared_ptr<IMemoryAllocator<V>> memAllocator = this->
getMemoryAllocator(allocator);
495 memEdge->applyEdge(
this);
496 this->addEdgeDescriptor(memEdge);
503 std::shared_ptr<IRule<V, U>> rule = super::getIRule(iRule);
507 this->addGraphProducerEdge(gore);
522 this->addEdgeDescriptor(memEdge);
536 template<
class V,
class IMemoryAllocatorType>
538 std::shared_ptr<IMemoryAllocatorType> allocator,
size_t memoryPoolSize,
MMType type) {
540 "Type mismatch for allocator, allocator must be a MemoryAllocator!");
542 std::shared_ptr<IMemoryAllocator<V>> memAllocator = std::static_pointer_cast<
IMemoryAllocator<V>>(allocator);
547 memEdge->applyEdge(
this);
548 this->addEdgeDescriptor(memEdge);
565 size_t memoryPoolSize,
568 std::shared_ptr<IMemoryAllocator<V>> memAllocator = super::getMemoryAllocator(allocator);
573 memEdge->applyEdge(
this);
574 this->addEdgeDescriptor(memEdge);
602 nvtxDomainHandle_t graphDomain = nvtxDomainCreateA(TASK_GRAPH_PREFIX_NAME);
603 #ifdef USE_MINIMAL_NVTX 604 profiler =
new NVTXProfiler(TASK_GRAPH_PREFIX_NAME,
nullptr, graphDomain, graphDomain, graphDomain, graphDomain, graphDomain, graphDomain);
606 profiler =
new NVTXProfiler(TASK_GRAPH_PREFIX_NAME, graphDomain,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr);
671 this->
input->incrementInputTaskCount();
681 this->
input->producerFinished();
682 if (this->
input->getProducerCount() == 0) {
683 this->
input->wakeupConsumer();
686 std::shared_ptr<ProfileData> updateStatus(
new ChangeStatusProfile(this->
input.get(), StatusCode::DECREMENT));
687 this->sendProfileData(updateStatus);
713 std::shared_ptr<ProfileData> connectorData(
new CreateConnectorProfile(
input.get(),
this,
input->getProducerCount(),
"Graph Input"));
714 std::shared_ptr<ProfileData> consumerData(
new CreateNodeProfile(task,
this, task->getName()));
716 this->sendProfileData(consumerData);
717 this->sendProfileData(connectorData);
719 std::shared_ptr<ProfileData> connectorConsumerData(
new CreateEdgeProfile(
input.get(), task,
"",
nullptr));
721 this->sendProfileData(connectorConsumerData);
741 std::shared_ptr<ProfileData> connectorData(
new CreateConnectorProfile(
output.get(),
this,
output->getProducerCount(),
"Graph Output"));
742 std::shared_ptr<ProfileData> producerData(
new CreateNodeProfile(task,
this, task->getName()));
744 this->sendProfileData(producerData);
745 this->sendProfileData(connectorData);
747 std::shared_ptr<ProfileData> connectorProducerData(
new CreateEdgeProfile(task,
output.get(),
"",
nullptr));
749 this->sendProfileData(connectorProducerData);
764 std::shared_ptr<T> dataPtr = std::shared_ptr<T>(data);
765 this->
input->produceData(dataPtr);
776 this->
input->produceData(data);
787 this->
input->produceData(dataList);
788 if (this->
input->isInputTerminated())
789 this->
input->wakeupConsumer();
803 nvtxRangeId_t
id = profiler->startRangeWaiting(this->
output->getQueueSize());
805 std::shared_ptr<U> data = this->
output->consumeData();
807 profiler->endRangeWaiting(
id);
819 nvtxRangeId_t
id = profiler->startRangeWaiting(this->
output->getQueueSize());
821 std::shared_ptr<U> data = this->
output->pollConsumeData(microTimeout);
823 profiler->endRangeWaiting(
id);
835 return this->
output->isInputTerminated();
845 producerEdge->updateEdge(std::dynamic_pointer_cast<
Connector<U>>(connector),
this);
873 [[gnu::deprecated(
"Replaced by calling 'releaseMemory' directory with htgs::MemoryData (or m_data_t)")]]
875 memory->releaseMemory();
883 profiler->addReleaseMarker();
899 std::ostringstream oss;
902 oss << bTask->getTaskFunction()->genCustomDot(profileUtils, colorFlag);
916 std::map<std::shared_ptr<AnyConnector>,
AnyTaskManager *> inputConnectorMap;
917 std::map<std::shared_ptr<AnyConnector>,
AnyITask *> inputConnectorDotMap;
919 for (
auto tmanProfiles : *allTaskManagerProfiles) {
920 auto bTask = tmanProfiles.first;
921 if (bTask->getThreadId() == 0) {
922 inputConnectorMap.insert(
923 std::pair<std::shared_ptr<AnyConnector>,
AnyTaskManager *>(bTask->getInputConnector(), bTask));
924 inputConnectorDotMap.insert(
925 std::pair<std::shared_ptr<AnyConnector>,
AnyITask *>(bTask->getInputConnector(), bTask->getTaskFunction()));
936 std::ostringstream oss;
938 for (
auto tmanProfiles : *allTaskManagerProfiles)
940 auto bTask = tmanProfiles.first;
942 if (bTask->getThreadId() == 0) {
943 oss << bTask->getTaskFunction()->genDotProducerEdgeToTask(inputConnectorDotMap, flags);
944 oss << bTask->getTaskFunction()->genDotConsumerEdgeFromConnector(this->
getInputConnector(), flags);
945 oss << bTask->getTaskFunction()->genDotProducerEdgeFromConnector(this->
getOutputConnector(), flags);
978 std::string
genDotGraph(
int flags,
int colorFlag, std::string graphTitle =
"", std::string customTitleText =
"")
override {
980 std::ostringstream oss;
983 oss <<
"digraph { rankdir=\"TB\"" << std::endl;
984 oss <<
"forcelabels=true;" << std::endl;
985 oss <<
"node[shape=record, fontsize=10, fontname=\"Verdana\"];" << std::endl;
986 oss <<
"edge[fontsize=10, fontname=\"Verdana\"];" << std::endl;
988 std::string graphTitleStr = graphTitle ==
"" ?
"" : (graphTitle +
"\\n");
994 oss <<
"graph [compound=true, labelloc=top, labeljust=left, " 995 <<
"label=\"" << graphTitleStr << computeTimeStr << createTimeStr <<customTitleText <<
"\",pad=\"0.5\", nodesep=\"0.5\", ranksep=\"0\"];" << std::endl;
1015 <<
"\"];" << std::endl;
1020 oss <<
"{ rank = sink; " << this->
getOutputConnector()->getDotId() <<
"[label=\"Graph Output\\n" 1024 <<
"\"]; }" << std::endl;
1026 if (oss.str().find(
"mainThread") != std::string::npos) {
1027 oss <<
"{ rank = sink; mainThread[label=\"Main Thread\", fillcolor = aquamarine4]; }" << std::endl;
1030 oss <<
"}" << std::endl;
1040 HTGS_DEBUG(
"-----------------------------------------------");
1046 HTGS_DEBUG(
"-----------------------------------------------");
1050 void sendProfileData(std::shared_ptr<ProfileData> profileData)
override 1052 this->wsProfileTaskManager->getInputConnector()->produceAnyData(profileData);
1088 std::list<GraphEdge<U> *> *getGraphProducerEdges()
const {
1161 this->
edges->push_back(edge);
1167 std::list<EdgeDescriptor *> *
1171 std::list<GraphEdge<U> *> *
1183 std::thread *wsProfileThread;
1188 NVTXProfiler *profiler;
1194 #endif //HTGS_TASKGRAPHCONF_HPP void incrementGraphProducer()
Sets the input connector for the task graph.
Definition: TaskGraphConf.hpp:670
ProfileUtils * getProfileUtils()
Gets the profile utility class to obtain color codes based on the total execution time...
Definition: TaskGraphProfiler.hpp:164
size_t getNumThreads() const
Gets the number of threads associated with this TaskManager.
Definition: AnyTaskManager.hpp:298
virtual void applyEdge(AnyTaskGraphConf *graph)=0
Applies an edge to a task graph.
Implements the parent ITask, which removes the template arguments of an ITask.
Definition: AnyITask.hpp:48
TaskGraphConf< T, U > * copy(size_t pipelineId, size_t numPipelines, std::shared_ptr< Connector< T >> input, std::shared_ptr< Connector< U >> output, std::string baseAddress)
Creates a mirror copy of the TaskGraph with the specified pipelineId and number of pipelines...
Definition: TaskGraphConf.hpp:321
void produceData(std::shared_ptr< T > data)
Produces data for the input of the TaskGraph.
Definition: TaskGraphConf.hpp:775
std::string getMemoryManagerName()
Gets the name of the memory manager.
Definition: MemoryManager.hpp:197
Implements the memory edge, which is an edge descriptor.
Implements a MemoryManager that binds the thread responsible for the MemoryManager to a CUDA GPU prio...
Definition: CudaMemoryManager.hpp:34
unsigned long long int getGraphComputeTime() const
Gets the total time the graph was computing.
Definition: AnyTaskGraphConf.hpp:536
MMType
The memory manager types.
Definition: MMType.hpp:38
void setOutputConnector(std::shared_ptr< AnyConnector > connector)
Sets the output connector for the task graph configuration.
Definition: TaskGraphConf.hpp:842
virtual EdgeDescriptor * copy(AnyTaskGraphConf *graph)=0
Creates a copy of the edge descriptor to be added to other graphs, such as those within execution pip...
std::string genDotProfile(std::string curDotGraph, int colorFlag)
Generates the dot profile for the graph.
Definition: TaskGraphProfiler.hpp:102
TGTask is the task graph task, which is used to bundle a graph as a task, which can then be connected...
Definition: TaskGraphConf.hpp:44
void copyTasks(std::list< AnyTaskManager *> *tasks)
Creates a copy of each task from the list of AnyTaskManagers passed as a parameter.
Definition: AnyTaskGraphConf.hpp:576
std::string getAddress()
Gets the address for the task graph.
Definition: AnyTaskGraphConf.hpp:516
unsigned long long int getGraphCreationTime() const
Gets the total time the graph was getting created.
Definition: AnyTaskGraphConf.hpp:543
TaskGraphConf< T, U > * copy(size_t pipelineId, size_t numPipelines)
Creates a mirror copy of the TaskGraph with the specified pipelineId and number of pipelines...
Definition: TaskGraphConf.hpp:307
void debug()
Provides debug output for the TaskGraphConf.
Definition: TaskGraphConf.hpp:1039
Implements the rule edge that is added to the graph.
Definition: RuleEdge.hpp:44
std::list< GraphEdge< U > * > * graphProducerEdges
The list of producers that are outputting data to the TaskGraph's output connector.
Definition: TaskGraphConf.hpp:1172
Holds the TGTask class implementation.
bool isOutputTerminated()
Checks if the output of the TaskGraph has finished producing data.
Definition: TaskGraphConf.hpp:834
std::list< EdgeDescriptor * > * edges
The list of edges for the graph, represented by edge descriptors to define how the edges are copied/a...
Definition: TaskGraphConf.hpp:1168
void updateTaskManagersAddressingAndPipelines()
Updates the task managers addresses, pipelineIds and the number of pipelines for all tasks in the Tas...
Definition: TaskGraphConf.hpp:595
void finishedProducingData()
Decrements the input connector and wakes up any consumer of the graph's input if the input connector ...
Definition: TaskGraphConf.hpp:680
void addEdge(ITask< V, W > *producer, ITask< W, X > *consumer)
Adds an edge to the graph, where one task produces data for a consumer task.
Definition: TaskGraphConf.hpp:388
virtual GraphEdge< T > * copy(AnyTaskGraphConf *graph)=0
Creates a copy of the edge descriptor to be added to other graphs, such as those within execution pip...
void addCustomMemoryManagerEdge(AnyITask *getMemoryTask, MemoryManager< V > *memoryManager)
Adds a custom MemoryManager with the specified name to the TaskGraphConf.
Definition: TaskGraphConf.hpp:518
Implements the memory edge that is added to the graph.
Definition: MemoryEdge.hpp:39
Implements the task graph profiler for gathering and communicating the results via graphviz...
void buildProfile(AnyTaskGraphConf *graphConf)
Builds a profile for the graph, (called after execution is done)
Definition: TaskGraphProfiler.hpp:75
std::map< AnyTaskManager *, TaskManagerProfile * > * getTaskManagerProfiles()
Gets the task manager profiles for all tasks in all graphs and sub-graphs.
Definition: TaskGraphProfiler.hpp:173
Definition: GraphEdge.hpp:16
TaskGraphConf(size_t pipelineId, size_t numPipelines, std::string baseAddress)
Constructs a TaskGraph.
Definition: TaskGraphConf.hpp:205
void addCudaMemoryManagerEdge(std::string name, AnyITask *getMemoryTask, IMemoryAllocator< V > *allocator, size_t memoryPoolSize, MMType type, int *gpuIds)
Adds a CudaMemoryManager edge with the specified name to the TaskGraphConf.
Definition: TaskGraphConf.hpp:483
std::string genDotGraphEdgesWithoutConnectors(std::map< AnyTaskManager *, TaskManagerProfile *> *allTaskManagerProfiles, int flags)
Generates the edges between tasks without connectors.
Definition: TaskGraphConf.hpp:912
Implements the rule edge, which is an edge descriptor.
Manages the input/output of IData between Tasks.
Definition: Connector.hpp:62
Provides an interface to send data along RuleManager edges for processing state and dependencies...
Definition: ExecutionPipeline.hpp:34
Definition: GraphTaskConsumerEdge.hpp:13
void addRuleEdge(Bookkeeper< V > *bookkeeper, std::shared_ptr< IRuleType > rule, ITask< W, X > *consumer)
Creates a rule edge that is managed by a bookkeeper.
Definition: TaskGraphConf.hpp:406
GraphEdge< T > * graphConsumerEdge
The consumer accessing the TaskGraph's input connector.
Definition: TaskGraphConf.hpp:1170
bool isPoll()
Gets whether the task manager is polling for data or not.
Definition: AnyTaskManager.hpp:351
std::list< AnyTaskManager * > * getTaskManagers()
Virtual function that initiates updating the task graph communicator.
Definition: AnyTaskGraphConf.hpp:180
std::shared_ptr< Connector< T > > input
The input connector for the TaskGraph.
Definition: TaskGraphConf.hpp:1174
void produceData(T *data)
Produces data for the input of the TaskGraph.
Definition: TaskGraphConf.hpp:763
void applyEdge(AnyTaskGraphConf *graph) override
Applies an edge to a task graph.
Definition: GraphTaskConsumerEdge.hpp:20
ExecutionPipeline< T, U > * createExecutionPipeline(size_t numPipelines, std::string name="Execution Pipeline", bool waitForInit=true)
Wraps this task graph into an execution pipeline task, which will then be used to duplicate and execu...
Definition: TaskGraphConf.hpp:1065
std::string genCustomDotForTasks(ProfileUtils *profileUtils, int colorFlag)
Generates the custom dot profiles for all tasks in this graph.
Definition: TaskGraphConf.hpp:897
bool isStartTask()
Gets whether this task manager will begin executing immediately with nullptr data or not...
Definition: AnyTaskManager.hpp:343
void applyEdge(AnyTaskGraphConf *graph) override
Applies an edge to a task graph.
Definition: GraphTaskProducerEdge.hpp:17
void addRuleEdge(Bookkeeper< V > *bookkeeper, IRule< V, W > *iRule, ITask< W, X > *consumer)
Creates a rule edge that is managed by a bookkeeper.
Definition: TaskGraphConf.hpp:425
TaskGraphConf()
Constructs a TaskGraph.
Definition: TaskGraphConf.hpp:153
void releaseMemory(m_data_t< V > memory)
Releases memory back to its memory manager.
Definition: TaskGraphConf.hpp:874
void applyEdge(AnyTaskGraphConf *graph) override
Applies an edge to a task graph.
Definition: ProducerConsumerEdge.hpp:52
void applyEdge(AnyTaskGraphConf *graph) override
Applies an edge to a task graph.
Definition: RuleEdge.hpp:58
The parent class for a Task that removes the template arguments.
Definition: AnyTaskManager.hpp:45
void addMemoryManagerEdge(std::string name, AnyITask *getMemoryTask, IMemoryAllocator< V > *allocator, size_t memoryPoolSize, MMType type)
Adds a MemoryManager edge with the specified name to the TaskGraphConf.
Definition: TaskGraphConf.hpp:562
std::string genDotGraphContent(int flags)
Generate the content only of the graph (excludes all graph definitions and attributes) ...
Definition: AnyTaskGraphConf.hpp:550
void setInputConnector(std::shared_ptr< AnyConnector > connector)
Sets the input connector for the task graph configuration.
Definition: TaskGraphConf.hpp:856
std::shared_ptr< AnyConnector > getOutputConnector() override
Virtual function that gets the connector used for graph output.
Definition: TaskGraphConf.hpp:590
std::shared_ptr< U > consumeData()
Consumes data from the output of a TaskGraph.
Definition: TaskGraphConf.hpp:801
~TaskGraphConf() override
Destructor, handles releasing all ITask memory that is managed by the TaskGraph.
Definition: TaskGraphConf.hpp:237
std::string genDotGraph(int flags, int colorFlag, std::string graphTitle="", std::string customTitleText="") override
Generates the dot graph as a string.
Definition: TaskGraphConf.hpp:978
#define HTGS_DEBUG(msg)
Prints a debug message to std::cerr with standard level If DEBUG_FLAG is not defined, this equates to a no op Each message includes the file and line number for where the debug is called.
Definition: debug_message.hpp:65
Implements a producer consumer edge, which is a type of edge descriptor.
Processes MemoryData between two ITasks using a memory pool.
Definition: MemoryManager.hpp:47
An interface to process input data and forward results within a TaskGraph.
Definition: ITask.hpp:165
size_t numPipelines
The number of pipelines from this graph.
Definition: AnyTaskGraphConf.hpp:635
Definition: GraphTaskProducerEdge.hpp:11
Abstract class that describes how memory is allocated and freed.
Definition: IMemoryAllocator.hpp:67
Manages a group of connected ITasks and their connections.
Definition: ExecutionPipeline.hpp:37
#define DOTGEN_FLAG_SHOW_IN_OUT_TYPES
Shows input and output types for all tasks.
Definition: TaskGraphDotGenFlags.hpp:32
Manages a TaskManager that is bound to a thread for execution.
Definition: AnyTaskManager.hpp:573
void produceData(std::list< std::shared_ptr< T >> *dataList)
Adds a list of data into the TaskGraph Must specify the TaskGraph input using addGraphInputConsumer()...
Definition: TaskGraphConf.hpp:786
Encapsulates an ITask to interact with an ITask's functionality.
Definition: ITask.hpp:39
std::shared_ptr< Connector< U > > output
The output connector for the TaskGraph.
Definition: TaskGraphConf.hpp:1175
std::shared_ptr< AnyConnector > getInputConnector() override
Pure virtual function that gets the task manager that is consuming data from the graph's input...
Definition: TaskGraphConf.hpp:586
size_t pipelineId
The pipelineId for the task graph.
Definition: AnyTaskGraphConf.hpp:634
void addGraphProducerTask(ITask< W, U > *task)
Sets the task that is producing data for the output of the graph.
Definition: TaskGraphConf.hpp:733
AnyTaskGraphConf * copy() override
Creates an exact copy of this task graph.
Definition: TaskGraphConf.hpp:297
Implements the base class for the TaskGraphConf class, removing the template arguments and providing ...
Definition: AnyTaskGraphConf.hpp:66
void setInputConnector(std::shared_ptr< AnyConnector > connector) override
Sets the input BaseConnector.
Definition: TaskManager.hpp:318
void addCudaMemoryManagerEdge(std::string name, AnyITask *getMemoryTask, std::shared_ptr< IMemoryAllocatorType > allocator, size_t memoryPoolSize, MMType type, int *gpuIds)
Adds a CudaMemoryManager edge with the specified name to the TaskGraphConf.
Definition: TaskGraphConf.hpp:448
The edge descriptor is an interface used to describe how an edge is applied and copied to a task grap...
Definition: EdgeDescriptor.hpp:39
void setGraphConsumerTask(ITask< T, W > *task)
Sets the task that is consuming data from the input of the graph.
Definition: TaskGraphConf.hpp:700
Provides the implementation for a MemoryManager for Cuda MemoryData.
std::shared_ptr< IMemoryAllocator< V > > getMemoryAllocator(IMemoryAllocator< V > *allocator)
Gets the shared_ptr reference for a particular IMemoryAllocator.
Definition: AnyTaskGraphConf.hpp:222
std::pair< std::string, std::shared_ptr< AnyConnector > > TaskNameConnectorPair
Defines a pair to be added into a TaskNameConnectorMap.
Definition: AnyTaskGraphConf.hpp:56
size_t getPipelineId()
Gets the pipeline ID for the task graph configuration.
Definition: AnyTaskGraphConf.hpp:418
The ExecutionPipeline class is used to duplicate task graphs, such that each duplicate executes concu...
Definition: ExecutionPipeline.hpp:96
The task graph profiler that gathers profile data and communicates via graphviz.
Definition: TaskGraphProfiler.hpp:42
TGTask< T, U > * createTaskGraphTask(std::string name="TGTask", bool waitForInit=true)
Wraps this task graph into a TGTask.
Definition: TaskGraphConf.hpp:1079
Implements the producer consumer edge that connects two tasks where one task is producing data and th...
Definition: ProducerConsumerEdge.hpp:40
void applyEdge(AnyTaskGraphConf *graph) override
Applies an edge to a task graph.
Definition: MemoryEdge.hpp:56
Implements the task graph communicator task that communicates from each task to all other tasks in a ...
std::shared_ptr< MemoryData< V > > m_data_t
Defines a shared pointer to htgs::MemoryData.
Definition: Types.hpp:101
std::shared_ptr< U > pollData(size_t microTimeout)
Polls for data from the output of the TaskGraph.
Definition: TaskGraphConf.hpp:817
Definition: ProfileUtils.hpp:13
Definition: Bookkeeper.hpp:23
Definition: GraphRuleProducerEdge.hpp:15
size_t getNumPipelines()
Gets the number of pipelines that exist for this task graph.
Definition: AnyTaskGraphConf.hpp:424
ExecutionPipeline encapsulates a task graph and duplicates it, such that each duplicate task graph ex...
void applyEdge(AnyTaskGraphConf *graph) override
Applies an edge to a task graph.
Definition: GraphRuleProducerEdge.hpp:24
#define DOTGEN_FLAG_SHOW_CONNECTOR_VERBOSE
Shows verbose information within each connector in the graph.
Definition: TaskGraphDotGenFlags.hpp:92
Special task used to manage rules.
Definition: Bookkeeper.hpp:60
void addMemoryManagerEdge(std::string name, AnyITask *getMemoryTask, std::shared_ptr< IMemoryAllocatorType > allocator, size_t memoryPoolSize, MMType type)
Adds a MemoryManager edge with the specified name to the TaskGraphConf.
Definition: TaskGraphConf.hpp:537
#define DOTGEN_FLAG_SHOW_CURRENT_Q_SZ
Displays the current queue size within each connector.
Definition: TaskGraphDotGenFlags.hpp:86