|
| DAG (sparta::Scheduler *scheduler, const bool &check_cycles=false) |
|
void | enableEarlyCycleDetect () |
|
void | initializeDAG_ () |
| Initialize the DAG Creates new vertices from the VertexFactory and links them according to precedence.
|
|
uint32_t | finalize () |
| Finialize the DAG.
|
|
bool | isFinalized () const |
| Is the DAG finalized?
|
|
Vertex * | newFactoryVertex (const std::string &label, sparta::Scheduler *const scheduler, const bool isgop=false) |
| Get a new Vertex from the DAGs Vertex Factory Called in a Scheduleable after the scheduler_ has been set, before the Scheduleable is assigned/linked to a DAG phase.
|
|
void | link (Vertex *v, Vertex *w, const std::string &reason="") |
| link(): Establish a precedence relationship between two entities. This method will wrap the Scheduleables with Vertices so that they can be manipulated by the DAG
|
|
bool | unlink (Vertex *v, Vertex *w) |
|
uint32_t | numGroups () |
|
bool | sort () |
|
Vertex * | findGOPVertex (const std::string &label) const |
| Find a GOP point.
|
|
Vertex * | newGOPVertex (const std::string &label, sparta::Scheduler *const scheduler) |
| Create a new Vertex-GOP point.
|
|
Vertex * | getGOPoint (const std::string &label) |
| Get the named GOP point; create it if not found.
|
|
sparta::Scheduler * | getScheduler () const |
|
bool | detectCycle () const |
| Look for cycles.
|
|
void | printCycles (std::ostream &os) const |
|
void | dumpToCSV (std::ostream &os_vertices, std::ostream &os_edges) const |
| Dump the DAG to a CSV vertices file and an edges file.
|
|
void | print (std::ostream &os) const |
| Print the DAG.
|
|
|
std::ostream & | operator<< (std::ostream &os, const Edge &e) |
|
std::ostream & | operator<< (std::ostream &os, const Vertex &v) |
|
Definition at line 38 of file DAG.hpp.
◆ GOPoint
typedef Vertex sparta::DAG::GOPoint |
◆ VertexMap
typedef std::map<std::string, Vertex*> sparta::DAG::VertexMap |
◆ enableEarlyCycleDetect()
void sparta::DAG::enableEarlyCycleDetect |
( |
| ) |
|
|
inline |
Turn on early cycle detection – as items are linked in the DAG, it will look for a cycle.
Definition at line 83 of file DAG.hpp.
◆ finalize()
uint32_t sparta::DAG::finalize |
( |
| ) |
|
Finialize the DAG.
- Returns
- The number of groups that were created
◆ findGOPVertex()
Vertex * sparta::DAG::findGOPVertex |
( |
const std::string & |
label | ) |
const |
|
inline |
Find a GOP point.
- Parameters
-
label | The GOP point to create |
- Returns
- the GOP point; nullptr if not found
Definition at line 151 of file DAG.hpp.
◆ getGOPoint()
Vertex * sparta::DAG::getGOPoint |
( |
const std::string & |
label | ) |
|
|
inline |
Get the named GOP point; create it if not found.
- Parameters
-
label | The GOP point to find or create |
- Returns
- the GOP point, never nullptr
Definition at line 177 of file DAG.hpp.
◆ getScheduler()
◆ isFinalized()
bool sparta::DAG::isFinalized |
( |
| ) |
const |
|
inline |
Is the DAG finalized?
Definition at line 99 of file DAG.hpp.
◆ link()
void sparta::DAG::link |
( |
Vertex * |
v, |
|
|
Vertex * |
w, |
|
|
const std::string & |
reason = "" |
|
) |
| |
link(): Establish a precedence relationship between two entities. This method will wrap the Scheduleables with Vertices so that they can be manipulated by the DAG
- Parameters
-
source | The Vertex from |
dest | The Vertex to |
reason | The reason for the link |
- Exceptions
-
link(v,w) will introduce an edge from source to dest, so that source precedes dest (and after sort, source's group ID will be less than dest's)
◆ newFactoryVertex()
Vertex * sparta::DAG::newFactoryVertex |
( |
const std::string & |
label, |
|
|
sparta::Scheduler *const |
scheduler, |
|
|
const bool |
isgop = false |
|
) |
| |
Get a new Vertex from the DAGs Vertex Factory Called in a Scheduleable after the scheduler_ has been set, before the Scheduleable is assigned/linked to a DAG phase.
- Returns
- The new Vertex contained in a Scheduleable.
◆ newGOPVertex()
Vertex * sparta::DAG::newGOPVertex |
( |
const std::string & |
label, |
|
|
sparta::Scheduler *const |
scheduler |
|
) |
| |
|
inline |
Create a new Vertex-GOP point.
- Exceptions
-
Will | assert if already exists |
- Parameters
-
label | The GOP point to create |
scheduler | The Scheduler associated with this Vertex |
- Returns
- the new GOP point; assert if already exists
Definition at line 164 of file DAG.hpp.
◆ numGroups()
uint32_t sparta::DAG::numGroups |
( |
| ) |
|
|
inline |
◆ unlink()
bool sparta::DAG::unlink |
( |
Vertex * |
v, |
|
|
Vertex * |
w |
|
) |
| |
|
inline |
The documentation for this class was generated from the following file:
- /github/workspace/sparta/sparta/kernel/DAG.hpp