graphSorting.hh File Reference

#include <set>
#include "loop.hh"
Include dependency graph for graphSorting.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef set< Loop * > lset
typedef vector< Loop * > lvec
typedef vector< lsetlgraph

Functions

void sortGraph (Loop *root, lgraph &V)
 Topological sort of an acyclic graph of loops starting from its root.

Typedef Documentation

typedef vector<lset> lgraph

Definition at line 12 of file graphSorting.hh.

typedef set<Loop*> lset

Definition at line 10 of file graphSorting.hh.

typedef vector<Loop*> lvec

Definition at line 11 of file graphSorting.hh.


Function Documentation

void sortGraph ( Loop root,
lgraph V 
)

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::printLoopGraphInternal(), Klass::printLoopGraphOpenMP(), Klass::printLoopGraphScheduler(), and Klass::printLoopGraphVector().

00039 {
00040     lset            T1, T2;
00041     int             level;
00042     
00043     assert(root);
00044     resetOrder(root);
00045     T1.insert(root); level=0; V.clear();
00046     do {
00047         setLevel(level, T1, T2, V); 
00048         T1=T2; T2.clear(); level++;
00049     } while (T1.size()>0);
00050     
00051     // Erase empty levels
00052     lgraph::iterator p = V.begin();
00053     while (p != V.end()) {
00054         if ((*p).size() == 1 && (*(*p).begin())->isEmpty()) {
00055             p = V.erase(p);
00056         } else {
00057             p++; 
00058         }
00059     }
00060 }

Here is the call graph for this function:

Here is the caller graph for this function:

Generated on Wed Apr 28 23:45:50 2010 for FAUST compiler by  doxygen 1.6.3