6 #ifndef MYRAMATH_JOBGRAPH_JOB_H 7 #define MYRAMATH_JOBGRAPH_JOB_H 14 #include <myramath/MYRAMATH_EXPORT.h> 25 class MYRAMATH_EXPORT
Job 33 virtual JobID id()
const {
throw std::runtime_error(
"Job::id() not implemented"); }
36 virtual void parents(
JobIDs& output)
const {
throw std::runtime_error(
"Job::parents(JobIDs&) not implemented"); }
39 virtual void children(
JobIDs& output)
const {
throw std::runtime_error(
"Job::children(JobIDs&) not implemented"); }
42 bool notify(
const JobID& j);
48 virtual std::string
name()
const {
return "Job"; }
Abstraction to represent one node of a JobGraph.
Definition: Job.h:25
virtual ~Job()
Virtual destructor, for subtypes to release resources.
Definition: Job.h:51
Job()
Default constructor.
Definition: Job.h:30
virtual uint64_t execute()
Subtypes inject the "real work" here. Should return the amount of "work" performed.
Definition: Job.h:45
virtual JobID id() const
Returns the JobID of this Job.
Definition: Job.h:33
Key type used to identify the Job's of a JobGraph.
Key type used to identify the Job's of a JobGraph.
Definition: JobID.h:60
virtual void children(JobIDs &output) const
Returns the JobIDs of children - successor Jobs that can only execute() after this one...
Definition: Job.h:39
virtual std::string name() const
Returns a printable name for this Job, for debugging.
Definition: Job.h:48
std::vector< JobID > JobIDs
Useful typedef.
Definition: JobID.h:118
virtual void parents(JobIDs &output) const
Returns the JobIDs of parents - predecessor Jobs that must execute() before this one.
Definition: Job.h:36