|
| TaskManager (ITask< T, U > *taskFunction, size_t numThreads, bool isStartTask, size_t pipelineId, size_t numPipelines, std::string address) |
| Constructs a TaskManager with an ITask as the task function and specific runtime parameters. More...
|
|
| TaskManager (ITask< T, U > *taskFunction, size_t numThreads, bool isStartTask, bool poll, size_t microTimeoutTime, size_t pipelineId, size_t numPipelines, std::string address) |
| Constructs a TaskManager with an ITask as the task function and specific runtime parameters. More...
|
|
std::shared_ptr< AnyConnector > | getInputConnector () override |
| Gets the input Connector. More...
|
|
std::shared_ptr< AnyConnector > | getOutputConnector () override |
| Gets the output Connector. More...
|
|
void | initialize () override |
| Initializes the TaskManager.
|
|
void | setRuntimeThread (TaskManagerThread *runtimeThread) override |
| Sets the thread that is executing this TaskManager. More...
|
|
ITask< T, U > * | getTaskFunction () override |
| Gets the ITask function associated with the TaskManager. More...
|
|
AnyTaskManager * | copy (bool deep) override |
| Copies the TaskManager. More...
|
|
void | executeTask () override |
| Executes the TaskManager. More...
|
|
size_t | getThreadsRemaining () override |
| Gets the number of threads that are still running for the task. More...
|
|
void | gatherProfileData (std::map< AnyTaskManager *, TaskManagerProfile *> *taskManagerProfiles) override |
| Gathers profiling data for the TaskProfiler. More...
|
|
void | setInputConnector (std::shared_ptr< AnyConnector > connector) override |
| Sets the input BaseConnector. More...
|
|
void | setOutputConnector (std::shared_ptr< AnyConnector > connector) override |
| Sets the output BaseConnector. More...
|
|
void | addResult (std::shared_ptr< U > result) |
| Adds the result data to the output connector. More...
|
|
void | terminateConnections () override |
| Terminates all Connector edges. More...
|
|
| AnyTaskManager (size_t numThreads, bool isStartTask, size_t pipelineId, size_t numPipelines, std::string address) |
| Constructs an AnyTaskManager with an ITask as the task function and specific runtime parameters. More...
|
|
| AnyTaskManager (size_t numThreads, bool isStartTask, bool poll, size_t microTimeoutTime, size_t pipelineId, size_t numPipelines, std::string address) |
| Constructs an AnyTaskManager with an ITask as the task function and specific runtime parameters. More...
|
|
virtual | ~AnyTaskManager () |
| Destructor.
|
|
void | printProfile () |
| Prints the profiling data to std::cout.
|
|
void | updateAddressAndPipelines (std::string address, size_t pipelineId, size_t numPipelines) |
| Sets the task graph communicator. More...
|
|
std::string | getAddress () |
| Gets the address of the task manager. More...
|
|
void | setNumPipelines (size_t numPipelines) |
| Sets the number of pipelines associated with the TaskManager. More...
|
|
size_t | getNumPipelines () |
| Gets the number of pipelines that this task manager belongs too. More...
|
|
void | setPipelineId (size_t id) |
| Sets the pipeline Id associated with the TaskManager. More...
|
|
size_t | getPipelineId () |
| Gets the pipeline identifer for this task from 0 to number of pipelines - 1. More...
|
|
size_t | getNumThreads () const |
| Gets the number of threads associated with this TaskManager. More...
|
|
void | setAlive (bool val) |
| Sets the alive state for this task manager. More...
|
|
bool | isAlive () |
| Gets whether the TaskManager is alive or not. More...
|
|
void | setInitialized (bool val) |
| Sets the initialized state for the task manager. More...
|
|
bool | isInitialized () |
| Gets whether the TaskManager has initialized or not. More...
|
|
void | setStartTask (bool val) |
| Sets whether this task manager is a start task or not, which will immediately begin executing by sending nullptr data to the underlying task as soon as this task executes. More...
|
|
bool | isStartTask () |
| Gets whether this task manager will begin executing immediately with nullptr data or not. More...
|
|
bool | isPoll () |
| Gets whether the task manager is polling for data or not. More...
|
|
size_t | getTimeout () |
| Gets the timeout period in microseconds for the task when the task is polling for data. More...
|
|
void | incTaskComputeTime (int64_t val) |
| Increments the compute time profile value. More...
|
|
void | incWaitTime (int64_t val) |
| Increments the wait time profile value. More...
|
|
void | shutdown () |
| Shuts down the TaskManager.
|
|
std::string | getName () |
| Gets the name of the ITask. More...
|
|
void | debug () |
| Provides debug output. More...
|
|
std::string | getNameWithPipelineId () |
| Gets the name of the ITask with it's pipeline ID. More...
|
|
std::string | getDot (int flags) |
| Gets the dot notation for this TaskManager.
|
|
void | setThreadId (size_t id) |
| Sets the thread id associated with the TaskManager. More...
|
|
size_t | getThreadId () |
| Gets the thread id associated with the TaskManager. More...
|
|
unsigned long long int | getComputeTime () |
| Gets the compute time for the task manager, removing the memory wait time. More...
|
|
unsigned long long int | getExecuteTime () |
| Gets the total execution time for the task manager, including any waiting for memory within the execute function. More...
|
|
unsigned long long int | getWaitTime () |
| Gets the wait time for the task manager. More...
|
|
size_t | getMaxQueueSize () |
| Gets the maximum size the input queue became during execution. More...
|
|
void | resetProfile () |
| Resets the profile data for this task.
|
|
unsigned long long int | getTaskComputeTime () |
| Gets the task's compute time. More...
|
|
template<class T, class U>
class htgs::TaskManager< T, U >
Encapsulates an ITask to interact with an ITask's functionality.
The TaskManager interacts with the TaskManagerThread to process an ITask's input and output data. The core logic of a TaskManager is implemented with the ITask representing the computational and logic functionality.
When the TaskManager is ready to be terminated the thread associated with the TaskManager and the output Connector will be notified.
- Template Parameters
-
- Note
- This class should only be called by the HTGS API
-
#define PROFILE to enable profiling.