68 void tab (
int n, ostream& fout)
71 while (n--) fout <<
'\t';
155 list<string>::iterator s;
156 for (s = lines.begin(); s != lines.end(); s++) {
157 tab(n, fout); fout << *s;
164 void printdecllist(
int n,
const string& decl, list<string>& content, ostream& fout)
166 if (!content.empty()) {
167 list<string>::iterator s;
169 tab(n, fout); fout << decl;
171 for (s = content.begin(); s != content.end(); s++) {
185 set<string>::iterator f;
189 fout <<
"/* link with ";
190 for (f = S.begin(), sep =
": "; f != S.end(); f++, sep =
", ") {
202 set<string>::iterator f;
205 fout <<
"#include <omp.h>" <<
"\n";
209 for (f = S.begin(); f != S.end(); f++) {
210 fout <<
"#include " << *f <<
"\n";
221 fout <<
"#ifndef FAUSTPOWER" << endl;
222 fout <<
"#define FAUSTPOWER" << endl;
223 fout <<
"#include <cmath>" << endl;
224 fout <<
"template <int N> inline float faustpower(float x) { return powf(x,N); } " << endl;
225 fout <<
"template <int N> inline double faustpower(double x) { return pow(x,N); }" << endl;
226 if (
gFloatSize == 3) fout <<
"template <int N> inline long double faustpower(long double x) { return powl(x,N); }" << endl;
227 fout <<
"template <int N> inline int faustpower(int x) { return faustpower<N/2>(x) * faustpower<N-N/2>(x); } " << endl;
228 fout <<
"template <> inline int faustpower<0>(int x) { return 1; }" << endl;
229 fout <<
"template <> inline int faustpower<1>(int x) { return x; }" << endl;
230 fout <<
"#endif" << endl;
240 tab(n,fout); fout <<
"static void metadata(Meta* m) \t{ ";
243 if (i->first !=
tree(
"author")) {
244 tab(n+1,fout); fout <<
"m->declare(\"" << *(i->first) <<
"\", " << **(i->second.begin()) <<
");";
246 for (set<Tree>::iterator j = i->second.begin(); j != i->second.end(); j++) {
247 if (j == i->second.begin()) {
248 tab(n+1,fout); fout <<
"m->declare(\"" << *(i->first) <<
"\", " << **j <<
");" ;
250 tab(n+1,fout); fout <<
"m->declare(\"" <<
"contributor" <<
"\", " << **j <<
");";
256 tab(n,fout); fout <<
"}" << endl;
261 return S.find(l)!= S.end();
281 tab(n, fout); fout <<
"// LOOP " << l <<
", ORDER " << l->
fOrder << endl;
322 #define WORK_STEALING_INDEX 0
323 #define LAST_TASK_INDEX 1
324 #define START_TASK_INDEX LAST_TASK_INDEX + 1
326 #define START_TASK_MAX 2
351 for (
int l=(
int)G.size()-1; l>=0; l--) {
352 for (lset::const_iterator p =G[l].begin(); p!=G[l].end(); p++) {
353 for (lset::const_iterator p1 = (*p)->fBackwardLoopDependencies.begin(); p1!=(*p)->fBackwardLoopDependencies.end(); p1++) {
354 (*p1)->fForwardLoopDependencies.insert((*p));
356 (*p)->fIndex = index_task;
362 vector<int> task_num;
363 for (
int l=(
int)G.size()-1; l>=0; l--) {
364 lset::const_iterator next;
365 for (lset::const_iterator p =G[l].begin(); p!=G[l].end(); p++) {
366 if ((*p)->fBackwardLoopDependencies.size() == 0) {
367 task_num.push_back((*p)->fIndex);
379 for (
int l=(
int)G.size()-1; l>=0; l--) {
380 lset::const_iterator next;
381 for (lset::const_iterator p =G[l].begin(); p!=G[l].end(); p++) {
382 if ((*p)->fBackwardLoopDependencies.size() == 0) {
397 addZone3(
" tasknum = TaskQueue::GetNextTask(cur_thread, fDynamicNumThreads);");
403 addZone3(
subst(
"int task_list_size = $0;",
T((
int)task_num.size())));
405 buf <<
"int task_list[" << task_num.size() <<
"] = {";
406 for(
size_t i = 0; i < task_num.size(); i++) {
408 if (i != (task_num.size() - 1))
414 addZone3(
"taskqueue.InitTaskList(task_list_size, task_list, fDynamicNumThreads, cur_thread, tasknum);");
418 if (G[0].size() > 1) {
419 addZone2c(
"// Initialize end task, if more than one input");
422 addZone2c(
"// End task has only one input, so will be directly activated");
426 addZone2c(
"// Only initialize taks with more than one input");
427 for (
int l=(
int)G.size()-1; l>=0; l--) {
428 for (lset::const_iterator p =G[l].begin(); p!=G[l].end(); p++) {
429 if ((*p)->fBackwardLoopDependencies.size() > 1) {
438 addInitCode(
"fDynamicNumThreads = getenv(\"OMP_NUM_THREADS\") ? atoi(getenv(\"OMP_NUM_THREADS\")) : fStaticNumThreads;");
439 addInitCode(
"fThreadPool = DSPThreadPool::Init();");
440 addInitCode(
"fThreadPool->StartAll(fStaticNumThreads - 1, false);");
468 for (
int l=(
int)G.size()-1; l>=0; l--) {
469 if (
gVectorSwitch) {
tab(n, fout); fout <<
"// SECTION : " << G.size() - l; }
470 for (lset::const_iterator p =G[l].begin(); p!=G[l].end(); p++) {
471 (*p)->println(n, fout);
490 for (
int l=(
int)G.size()-1; l>=0; l--) {
491 tab(n, fout); fout <<
"// SECTION : " << G.size() - l;
510 for (
int l=(
int)G.size()-1; l>0; l--) {
511 tab(n, fout); fout <<
"// SECTION : " << G.size() - l;
527 fout <<
"strict digraph loopgraph {" << endl;
528 fout <<
'\t' <<
"rankdir=LR;" << endl;
529 fout <<
'\t' <<
"node[color=blue, fillcolor=lightblue, style=filled, fontsize=9];" << endl;
533 for (
int l=(
int)G.size()-1; l>=0; l--) {
535 for (lset::const_iterator t =G[l].begin(); t!=G[l].end(); t++) {
537 fout <<
'\t' <<
'L'<<(*t)<<
"[label=<<font face=\"verdana,bold\">L"<<lnum++<<
"</font> : "<<(*t)<<
">];"<<endl;
539 for (lset::const_iterator src = (*t)->fBackwardLoopDependencies.begin(); src!=(*t)->fBackwardLoopDependencies.end(); src++) {
541 fout <<
'\t' <<
'L'<<(*src)<<
"->"<<
'L'<<(*t)<<
';'<<endl;
557 for (
int l=(
int)G.size()-1; l>=0; l--) {
558 if (
gVectorSwitch) {
tab(n, fout); fout <<
"// SECTION : " << G.size() - l; }
559 for (lset::const_iterator p =G[l].begin(); p!=G[l].end(); p++) {
560 (*p)->printoneln(n, fout);
578 for (lset::const_iterator p =L.begin(); p!=L.end(); p++) {
579 if ((*p)->fIsRecursive)
return false;
591 for (lset::const_iterator p =L.begin(); p!=L.end(); p++) {
592 if ((*p)->isEmpty() ==
false) {
594 (*p)->printParLoopln(n, fout);
596 tab(n, fout); fout <<
"#pragma omp single ";
597 tab(n, fout); fout <<
"{ ";
598 (*p)->println(n+1, fout);
599 tab(n, fout); fout <<
"} ";
604 }
else if (L.size() > 1) {
605 tab(n, fout); fout <<
"#pragma omp sections ";
606 tab(n, fout); fout <<
"{ ";
607 for (lset::const_iterator p =L.begin(); p!=L.end(); p++) {
608 tab(n+1, fout); fout <<
"#pragma omp section ";
609 tab(n+1, fout); fout <<
"{";
610 (*p)->println(n+2, fout);
611 tab(n+1, fout); fout <<
"} ";
613 tab(n, fout); fout <<
"} ";
614 }
else if (L.size() == 1 && !(*L.begin())->isEmpty()) {
615 tab(n, fout); fout <<
"#pragma omp single ";
616 tab(n, fout); fout <<
"{ ";
617 for (lset::const_iterator p =L.begin(); p!=L.end(); p++) {
618 (*p)->println(n+1, fout);
620 tab(n, fout); fout <<
"} ";
632 lset::const_iterator p =L.begin();
634 (*p)->println(n+1, fout);
635 tab(n+1, fout); fout <<
"tasknum = LAST_TASK_INDEX;";
636 tab(n+1, fout); fout <<
"break;";
637 tab(n, fout); fout <<
"} ";
639 }
else if (L.size() > 1) {
641 for (lset::const_iterator p =L.begin(); p!=L.end(); p++) {
643 (*p)->println(n+1, fout);
644 tab(n+1, fout); fout <<
"fGraph.ActivateOneOutputTask(taskqueue, LAST_TASK_INDEX, tasknum);";
645 tab(n+1, fout); fout <<
"break;";
646 tab(n, fout); fout <<
"} ";
649 }
else if (L.size() == 1 && !(*L.begin())->isEmpty()) {
651 lset::const_iterator p =L.begin();
653 (*p)->println(n+1, fout);
654 tab(n+1, fout); fout <<
"tasknum = LAST_TASK_INDEX;";
655 tab(n+1, fout); fout <<
"break;";
656 tab(n, fout); fout <<
"} ";
664 (*p)->println(n+1, fout);
667 if ((*p)->fForwardLoopDependencies.size() == 1) {
669 lset::const_iterator p1 = (*p)->fForwardLoopDependencies.begin();
670 if ((*p1)->fBackwardLoopDependencies.size () == 1) {
671 tab(n+1, fout); fout <<
subst(
"tasknum = $0;",
T((*p1)->fIndex));
673 tab(n+1, fout); fout <<
subst(
"fGraph.ActivateOneOutputTask(taskqueue, $0, tasknum);",
T((*p1)->fIndex));
680 for (lset::const_iterator p1 = (*p)->fForwardLoopDependencies.begin(); p1!=(*p)->fForwardLoopDependencies.end(); p1++) {
681 if ((*p1)->fBackwardLoopDependencies.size () == 1) {
688 tab(n+1, fout); fout <<
"tasknum = WORK_STEALING_INDEX;";
691 for (lset::const_iterator p1 = (*p)->fForwardLoopDependencies.begin(); p1!=(*p)->fForwardLoopDependencies.end(); p1++) {
692 if ((*p1)->fBackwardLoopDependencies.size () == 1) {
694 tab(n+1, fout); fout <<
subst(
"taskqueue.PushHead($0);",
T((*p1)->fIndex));
698 tab(n+1, fout); fout <<
subst(
"fGraph.ActivateOutputTask(taskqueue, $0, tasknum);",
T((*p1)->fIndex));
700 tab(n+1, fout); fout <<
subst(
"fGraph.ActivateOutputTask(taskqueue, $0);",
T((*p1)->fIndex));
708 tab(n+1, fout); fout <<
"fGraph.GetReadyTask(taskqueue, tasknum);";
712 tab(n+1, fout); fout <<
"break;";
713 tab(n, fout); fout <<
"} ";
725 }
else if (L.size() > 1) {
726 for (lset::const_iterator p = L.begin(); p != L.end(); p++) {
729 }
else if (L.size() == 1 && !(*L.begin())->isEmpty()) {
739 list<Klass* >::iterator k;
741 tab(n,fout); fout <<
"#ifndef FAUSTCLASS " << endl;
742 fout <<
"#define FAUSTCLASS "<<
fKlassName << endl;
743 fout <<
"#endif" << endl;
752 tab(n,fout); fout <<
" public:";
754 tab(n,fout); fout <<
" private:";
761 tab(n,fout); fout <<
" public:";
766 tab(n+1,fout); fout <<
"virtual ~" <<
fKlassName <<
"() \t{ "
767 <<
"DSPThreadPool::Destroy()"
771 tab(n+1,fout); fout <<
"virtual int getNumInputs() \t{ "
774 tab(n+1,fout); fout <<
"virtual int getNumOutputs() \t{ "
778 tab(n+1,fout); fout <<
"static void classInit(int samplingFreq) {";
780 tab(n+1,fout); fout <<
"}";
782 tab(n+1,fout); fout <<
"virtual void instanceInit(int samplingFreq) {";
783 tab(n+2,fout); fout <<
"fSamplingFreq = samplingFreq;";
785 tab(n+1,fout); fout <<
"}";
787 tab(n+1,fout); fout <<
"virtual void init(int samplingFreq) {";
788 tab(n+2,fout); fout <<
"classInit(samplingFreq);";
789 tab(n+2,fout); fout <<
"instanceInit(samplingFreq);";
790 tab(n+1,fout); fout <<
"}";
793 tab(n+1,fout); fout <<
"virtual void buildUserInterface(UI* interface) {";
795 tab(n+1,fout); fout <<
"}";
799 tab(n,fout); fout <<
"};\n" << endl;
805 tab(n, fout); fout <<
"#ifdef FAUST_UIMACROS";
806 tab(n+1,fout); fout <<
"#define FAUST_INPUTS " <<
fNumInputs;
811 tab(n, fout); fout <<
"#endif";
839 tab(n+1,fout); fout <<
subst(
"virtual void compute (int count, $0** input, $0** output) {",
xfloat());
845 tab(n+1,fout); fout <<
"}";
857 tab(n+1,fout); fout <<
subst(
"virtual void compute (int fullcount, $0** input, $0** output) {",
xfloat());
862 tab(n+2,fout); fout <<
"int index;";
863 tab(n+2,fout); fout <<
"for (index = 0; index <= fullcount - " <<
gVecSize <<
"; index += " <<
gVecSize <<
") {";
864 tab(n+3,fout); fout <<
"// compute by blocks of " << gVecSize <<
" samples";
865 tab(n+3,fout); fout <<
"const int count = " << gVecSize <<
";";
868 tab(n+2,fout); fout <<
"}";
870 tab(n+2,fout); fout <<
"if (index < fullcount) {";
871 tab(n+3,fout); fout <<
"// compute the remaining samples if any";
872 tab(n+3,fout); fout <<
"int count = fullcount-index;";
875 tab(n+2,fout); fout <<
"}";
876 tab(n+1,fout); fout <<
"}";
886 tab(n+1,fout); fout <<
subst(
"virtual void compute (int fullcount, $0** input, $0** output) {",
xfloat());
890 tab(n+2,fout); fout <<
"for (int index = 0; index < fullcount; index += " <<
gVecSize <<
") {";
891 tab(n+3,fout); fout <<
"int count = min("<< gVecSize <<
", fullcount-index);";
894 tab(n+2,fout); fout <<
"}";
895 tab(n+1,fout); fout <<
"}";
957 tab(n+1,fout); fout <<
subst(
"virtual void compute (int fullcount, $0** input, $0** output) {",
xfloat());
960 tab(n+2,fout); fout <<
"#pragma omp parallel";
963 tab(n+2,fout); fout <<
"{";
965 tab(n+3,fout); fout <<
"#pragma omp single";
966 tab(n+3,fout); fout <<
"{";
968 tab(n+3,fout); fout <<
"}";
971 tab(n+3,fout); fout <<
"for (int index = 0; index < fullcount; index += " <<
gVecSize <<
") {";
972 tab(n+4,fout); fout <<
"int count = min ("<< gVecSize <<
", fullcount-index);";
977 tab(n+3,fout); fout <<
"}";
979 tab(n+2,fout); fout <<
"}";
980 tab(n+1,fout); fout <<
"}";
1054 tab(n+1,fout); fout <<
"void display() {";
1055 tab(n+2,fout); fout <<
"fGraph.Display();";
1056 tab(n+1,fout); fout <<
"}";
1058 tab(n+1,fout); fout <<
subst(
"virtual void compute (int fullcount, $0** input, $0** output) {",
xfloat());
1060 tab(n+2,fout); fout <<
"GetRealTime();";
1062 tab(n+2,fout); fout <<
"this->input = input;";
1063 tab(n+2,fout); fout <<
"this->output = output;";
1065 tab(n+2,fout); fout <<
"StartMeasure();";
1067 tab(n+2,fout); fout <<
"for (fIndex = 0; fIndex < fullcount; fIndex += " <<
gVecSize <<
") {";
1069 tab(n+3,fout); fout <<
"fFullCount = min ("<< gVecSize <<
", fullcount-fIndex);";
1070 tab(n+3,fout); fout <<
"TaskQueue::Init();";
1073 tab(n+3,fout); fout <<
"fIsFinished = false;";
1074 tab(n+3,fout); fout <<
"fThreadPool->SignalAll(fDynamicNumThreads - 1, this);";
1075 tab(n+3,fout); fout <<
"computeThread(0);";
1076 tab(n+3,fout); fout <<
"while (!fThreadPool->IsFinished()) {}";
1078 tab(n+2,fout); fout <<
"}";
1080 tab(n+2,fout); fout <<
"StopMeasure(fStaticNumThreads, fDynamicNumThreads);";
1082 tab(n+1,fout); fout <<
"}";
1084 tab(n+1,fout); fout <<
"void computeThread(int cur_thread) {";
1088 tab(n+2,fout); fout <<
"// Init graph state";
1090 tab(n+2,fout); fout <<
"{";
1091 tab(n+3,fout); fout <<
"TaskQueue taskqueue(cur_thread);";
1092 tab(n+3,fout); fout <<
"int tasknum = -1;";
1093 tab(n+3,fout); fout <<
"int count = fFullCount;";
1096 tab(n+3,fout); fout <<
"// Init input and output";
1099 tab(n+3,fout); fout <<
"while (!fIsFinished) {";
1100 tab(n+4,fout); fout <<
"switch (tasknum) {";
1103 tab(n+5, fout); fout <<
"case WORK_STEALING_INDEX: { ";
1104 tab(n+6, fout); fout <<
"tasknum = TaskQueue::GetNextTask(cur_thread, fDynamicNumThreads);";
1105 tab(n+6, fout); fout <<
"break;";
1106 tab(n+5, fout); fout <<
"} ";
1109 tab(n+5, fout); fout <<
"case LAST_TASK_INDEX: { ";
1110 tab(n+6, fout); fout <<
"fIsFinished = true;";
1111 tab(n+6, fout); fout <<
"break;";
1112 tab(n+5, fout); fout <<
"} ";
1119 tab(n+4,fout); fout <<
"}";
1120 tab(n+3,fout); fout <<
"}";
1121 tab(n+2,fout); fout <<
"}";
1122 tab(n+1,fout); fout <<
"}";
1130 list<Klass* >::iterator k;
1134 tab(n,fout); fout <<
" private:";
1135 tab(n+1,fout); fout <<
"int \tfSamplingFreq;";
1141 tab(n,fout); fout <<
" public:";
1143 tab(n+1,fout); fout <<
"int getNumInputs() \t{ "
1145 tab(n+1,fout); fout <<
"int getNumOutputs() \t{ "
1148 tab(n+1,fout); fout <<
"void init(int samplingFreq) {";
1149 tab(n+2,fout); fout <<
"fSamplingFreq = samplingFreq;";
1151 tab(n+1,fout); fout <<
"}";
1153 tab(n+1,fout); fout <<
"void fill (int count, int output[]) {";
1159 tab(n+1,fout); fout <<
"}";
1161 tab(n,fout); fout <<
"};\n" << endl;
1169 list<Klass* >::iterator k;
1173 tab(n,fout); fout <<
" private:";
1174 tab(n+1,fout); fout <<
"int \tfSamplingFreq;";
1180 tab(n,fout); fout <<
" public:";
1182 tab(n+1,fout); fout <<
"int getNumInputs() \t{ "
1184 tab(n+1,fout); fout <<
"int getNumOutputs() \t{ "
1187 tab(n+1,fout); fout <<
"void init(int samplingFreq) {";
1188 tab(n+2,fout); fout <<
"fSamplingFreq = samplingFreq;";
1190 tab(n+1,fout); fout <<
"}";
1192 tab(n+1,fout); fout <<
subst(
"void fill (int count, $0 output[]) {",
ifloat());
1198 tab(n+1,fout); fout <<
"}";
1200 tab(n,fout); fout <<
"};\n" << endl;
1203 static void merge (set<string>& dst, set<string>& src)
1205 set<string>::iterator i;
1206 for (i = src.begin(); i != src.end(); i++) dst.insert(*i);
1211 list<Klass* >::iterator k;
1219 list<Klass* >::iterator k;
void addZone2c(const string &str)
void println(int n, ostream &fout)
print the loop
static bool nonRecursiveLevel(const lset &L)
returns true if all the loops are non recursive
virtual void println(int n, ostream &fout)
Print an auxillary C++ class corresponding to an integer init signal.
virtual void printComputeMethodVectorFaster(int n, ostream &fout)
Uses loops of constant gVecSize boundary in order to provide the C compiler with more optimisation op...
void collectLibrary(set< string > &S)
void tab(int n, ostream &fout)
Loop * fTopLoop
active loops currently open
void setLoopProperty(Tree sig, Loop *l)
Store the loop used to compute a signal.
virtual void printAdditionalCode(ostream &fout)
Print additional functions required by the generated code.
static void merge(set< string > &dst, set< string > &src)
void collectIncludeFile(set< string > &S)
virtual void printComputeMethodVectorSimple(int n, ostream &fout)
Simple loop layout, generally less efficient than printComputeMethodVectorFaster. ...
virtual void println(int n, ostream &fout)
Print a full C++ class corresponding to a Faust dsp.
Loop *const fEnclosingLoop
Loop from which this one originated.
list< string > fZone3Code
private every sub block
list< string > fZone2Code
first private
void printlines(int n, list< string > &lines, ostream &fout)
Print a list of lines.
list< string > fZone2bCode
single once per block
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
void openLoop(const string &size)
Open a non-recursive loop on top of the stack of open loops.
virtual void printLoopGraphInternal(int n, ostream &fout)
Print the loop graph (used for internals classes)
virtual void printComputeMethod(int n, ostream &fout)
Print Compute() method according to the various switch.
static bool fNeedPowerDef
true when faustpower definition is needed
list< string > fStaticFields
static fields after class
void closeLoop(Tree sig)
Close the top loop and either keep it or absorb it within its enclosing loop.
virtual void printOneLoopScheduler(lset::const_iterator p, int n, ostream &fout)
int fUseCount
how many loops depend on this one
virtual void printGraphDotFormat(ostream &fout)
Print the loop graph in dot format.
list< string > fZone2cCode
single once per block
void addInitCode(const string &str)
virtual void printComputeMethodScalar(int n, ostream &fout)
int fNumActives
number of active controls in the UI (sliders, buttons, etc.)
void set(Tree t, const P &data)
static void computeUseCount(Loop *l)
Compute how many time each loop is used in a DAG.
bool isEmpty()
true when the loop doesn't contain any line of code
virtual void printLoopLevelOpenMP(int n, int lnum, const lset &L, ostream &fout)
Print the 'level' of the loop graph as a set of parallel loops.
virtual void println(int n, ostream &fout)
Print an auxillary C++ class corresponding to an float init signal.
list< string > fFirstPrivateDecl
first private declarations
void printoneln(int n, ostream &fout)
print the loop in scalar mode
bool getLoopProperty(Tree sig, Loop *&l)
Returns the loop used to compute a signal.
Tree fRecSymbolSet
recursive loops define a set of recursive symbol
string subst(const string &model, const vector< string > &args)
Text substitution.
set< string > fLibrarySet
virtual void printIncludeFile(ostream &fout)
Print the required include files.
void printdecllist(int n, const string &decl, list< string > &content, ostream &fout)
Print a list of elements (e1, e2,...)
virtual void printLoopGraphOpenMP(int n, ostream &fout)
Print the loop graph as a serie of parallel loops.
virtual void printLoopDeepFirst(int n, ostream &fout, Loop *l, set< Loop * > &visited)
Print a loop graph deep first.
int fNumPassives
number of passive widgets in the UI (bargraphs, etc.)
bool isElement(const set< Loop * > &S, Loop *l)
bool get(Tree t, P &data)
map< Tree, set< Tree > > gMetaDataSet
void absorb(Loop *l)
absorb a loop inside this one
bool hasRecDependencyIn(Tree S)
returns true is this loop or its ancestors define a symbol in S
void sortGraph(Loop *root, lgraph &V)
Topological sort of an acyclic graph of loops.
static void groupSeqLoops(Loop *l)
Group together sequences of loops.
virtual void printComputeMethodScheduler(int n, ostream &fout)
virtual void printLoopGraphScheduler(int n, ostream &fout)
Print the loop graph as a serie of parallel loops.
virtual void printLoopGraphVector(int n, ostream &fout)
Print the loop graph (used for vector code)
list< string > fStaticInitCode
static init code for class constant tables
virtual void printComputeMethodOpenMP(int n, ostream &fout)
property< Loop * > fLoopProperty
loops used to compute some signals
int fOrder
used during topological sort
list< Klass * > fSubClassList
virtual void printLastLoopLevelScheduler(int n, int lnum, const lset &L, ostream &fout)
Print the 'level' of the loop graph as a set of parallel loops.
virtual void printLibrary(ostream &fout)
Print the required C++ libraries as comments in source code.
set< string > fIncludeFileSet
void addZone3(const string &str)
virtual void printLoopLevelScheduler(int n, int lnum, const lset &L, ostream &fout)
Print the 'level' of the loop graph as a set of parallel loops.
virtual void printLoopGraphScalar(int n, ostream &fout)
Print the loop graph (scalar mode)
list< string > fZone1Code
shared vectors
int fIndex
used during scheduler mode code generation
set< Loop * > fBackwardLoopDependencies
Loops that must be computed before this one.
void addDeclCode(const string &str)
virtual void printMetadata(int n, const map< Tree, set< Tree > > &S, ostream &fout)
Print metadata declaration.