Parent class for Connector, which removes the template type of the Connector.
More...
#include <htgs/core/graph/AnyConnector.hpp>
|
std::atomic_size_t | producerTaskCount |
| The number of producers adding data to the connector.
|
|
Parent class for Connector, which removes the template type of the Connector.
Used to hold various types of Connectors. Each Connector is built using an EdgeDescriptor routines to add ITasks to a TaskGraphConf.
Each Connector holds onto a priority queue that acquires/distributes IData from a producer/consumer ITask.
Most common use for this class is to indicate when the producer for this Connector has finished pushing data onto its queue.
Common usage:
inputConnector->isInputTerminated();
◆ copy()
◆ genDot()
std::string htgs::AnyConnector::genDot |
( |
int |
flags | ) |
|
|
inline |
Generates the dot representation for this connector.
- Parameters
-
- Returns
- the dot representation
◆ getDotId()
std::string htgs::AnyConnector::getDotId |
( |
| ) |
|
|
inline |
Gets the id used for dot graphs for GraphViz.
- Returns
- the unique id associated with this Connector
◆ getMaxQueueSize()
virtual size_t htgs::AnyConnector::getMaxQueueSize |
( |
| ) |
|
|
pure virtual |
◆ getProducerCount()
size_t htgs::AnyConnector::getProducerCount |
( |
| ) |
|
|
inline |
Gets the number of producers producing data for the connector.
- Returns
- the number of producers adding data for this connector.
◆ getQueueSize()
virtual size_t htgs::AnyConnector::getQueueSize |
( |
| ) |
|
|
pure virtual |
◆ incrementInputTaskCount()
void htgs::AnyConnector::incrementInputTaskCount |
( |
| ) |
|
|
inline |
Increments the number of tasks producing data for the Connector.
- Note
- This function should only be called by the HTGS API
◆ isInputTerminated()
virtual bool htgs::AnyConnector::isInputTerminated |
( |
| ) |
|
|
pure virtual |
◆ produceAnyData()
virtual void htgs::AnyConnector::produceAnyData |
( |
std::shared_ptr< IData > |
data | ) |
|
|
pure virtual |
◆ producerFinished()
void htgs::AnyConnector::producerFinished |
( |
| ) |
|
|
inline |
Indicates to the Connector that the producer has finished producing data for the Connector.
- Note
- This function should only be called by the HTGS API
◆ profileConsume()
virtual void htgs::AnyConnector::profileConsume |
( |
size_t |
numThreads, |
|
|
bool |
showQueueSize |
|
) |
| |
|
pure virtual |
Provides profile output for the consume operation.
- Parameters
-
numThreads | the number of threads associated with consuming data |
showQueueSize | whether to show the max queue size or not |
- Note
- #define PROFILE to enable profiling
Implemented in htgs::Connector< T >, and htgs::Connector< htgs::MemoryData< T > >.
◆ profileProduce()
virtual void htgs::AnyConnector::profileProduce |
( |
size_t |
numThreads | ) |
|
|
pure virtual |
◆ typeName()
virtual std::string htgs::AnyConnector::typeName |
( |
| ) |
|
|
pure virtual |
◆ wakeupConsumer()
virtual void htgs::AnyConnector::wakeupConsumer |
( |
| ) |
|
|
pure virtual |
Awakens all Tasks that are consuming data from this connector.
This function passes nullptr to each consumer to check whether that consumer is ready to be terminated.
- Note
- This function should only be called by the HTGS API
Implemented in htgs::Connector< T >, and htgs::Connector< htgs::MemoryData< T > >.
The documentation for this class was generated from the following file: