|
FAUST compiler
0.9.9.6b8
|


Go to the source code of this file.
Typedefs | |
| typedef set< Loop * > | lset |
| typedef vector< Loop * > | lvec |
| typedef vector< lset > | lgraph |
Functions | |
| void | sortGraph (Loop *root, lgraph &V) |
| Topological sort of an acyclic graph of loops starting from its root. | |
Definition at line 12 of file graphSorting.hh.
Definition at line 10 of file graphSorting.hh.
Definition at line 11 of file graphSorting.hh.
Topological sort of an acyclic graph of loops starting from its root.
The loops are collect in an lgraph : a vector of sets of loops
Topological sort of an acyclic graph of loops starting from its root.
The loops are collect in an lgraph : a vector of sets of loops
Definition at line 38 of file graphSorting.cpp.
References resetOrder(), and setLevel().
Referenced by Klass::buildTasksList(), Klass::printGraphDotFormat(), Klass::printLoopGraphInternal(), Klass::printLoopGraphOpenMP(), Klass::printLoopGraphScheduler(), and Klass::printLoopGraphVector().
{
lset T1, T2;
int level;
assert(root);
resetOrder(root);
T1.insert(root); level=0; V.clear();
do {
setLevel(level, T1, T2, V);
T1=T2; T2.clear(); level++;
} while (T1.size()>0);
// Erase empty levels
lgraph::iterator p = V.begin();
while (p != V.end()) {
if ((*p).size() == 1 && (*(*p).begin())->isEmpty()) {
p = V.erase(p);
} else {
p++;
}
}
}


1.8.0