MyraMath
|
Container-like JobGraph class, can be manually populated with user-defined Job's and dependencies. More...
#include <UserJobGraph.h>
Classes | |
class | UserJob |
Implementation detail of UserJobGraph Job's, calculational aspects. More... | |
class | UserJobBase |
Implementation detail of UserJobGraph Job's, structural aspects. More... | |
Public Member Functions | |
UserJobGraph () | |
Default constructor, empty Graph. | |
template<class Functor > | |
uint64_t | insert (const Functor &f) |
Inserts a Job (in the form of a C++11 lambda) to this JobGraph, returns its unique JobID. | |
template<class Functor > | |
uint64_t | insert (const Functor &f, const std::string &n) |
Like insert(f), but can also give a name to the Job (useful for debugging). | |
void | add_edge (uint64_t j0, uint64_t j1) |
Adds a dependency, that Job j0 must execute before Job j1. | |
virtual JobGraphBase * | clone () const |
Virtual copy-constructor. | |
virtual uint64_t | n_work () const |
Total "work" over all Job's of this JobGraph. | |
virtual std::string | name () const |
Returns a printable name for this JobGraph, for debugging. | |
virtual void | begins (JobIDs &output) const |
Enumerates the JobIDs of Job's that have no parents (where execution begins) | |
virtual void | ends (JobIDs &output) const |
Enumerates the JobIDs of Job's that have no children (where execution ends) | |
virtual Job * | create (JobID id) |
Constructs the Job corresponding to the given JobID. | |
uint64_t | size () const |
Returns maximum JobID. | |
virtual | ~UserJobGraph () |
Virtual destructor, so subtypes can release resources. | |
![]() | |
virtual std::vector< Job * > | create () |
Constructs all Job's in an implementation-defined order. | |
virtual | ~JobGraphBase () |
Virtual destructor, so subtypes can release resources. | |