19 #include "../exception.h"
Task: an operation that can be executed by multiple threads in parallel.
A task within a pipeline.
int getTaskIndex(const TaskHolder &)
Retrieves task index if it is in the pipeline; returns -1 otherwise.
bool route(TaskRouter &router)
std::mutex policyAccess
access control to modify repetition policies
TaskHolder * createTaskHolder(AbstractTask &task)
RepetitionPolicy getRepetitionPolicy(const TaskHolder &)
void setRepetitionPolicy(TaskHolder &taskHolder, RepetitionPolicy policy)
Sets repetition policy of a task.
RepetitionPolicy
Determines when a specific task in the sequence is run when the whole sequence is invoked.
@ IGNORE_IF_UPTODATE
do not execute the task if no preceding tasks are run
@ REPEAT_ALWAYS
execute the task unconditionally on each run
@ IGNORE_ALWAYS
do not execute the task
@ REPEAT_UPDATE
execute the task one time then switch to IGNORE_IF_UPTODATE
Interface managing the execution of a sequence of tasks.
virtual void goToNextTask()=0
Goes to the next task in the list.
virtual void runTask()=0
Executes the pointed task.
virtual CustomPipeline::TaskHolder & getCurrentTask()=0
Returns currently pointed task.
virtual bool allTasksDone() const =0
Returns true if all tasks are done.
virtual bool allTasksAborted() const =0
Returns true if the current session is aborted.
TaskHolder implementation for Multitask pipeline.
MultitaskTaskHolder(AbstractTask &task)
Multitask::RepetitionPolicy repetitionPolicy
#define BEATMUP_ASSERT_DEBUG(C)
Beatmup internal declarations.
return pipeline getTaskIndex * taskHolder
Beatmup::NNets::InferenceTask * task