FAUST compiler  0.9.9.6b8
Public Member Functions | List of all members
SigIntGenKlass Class Reference

#include <klass.hh>

Inheritance diagram for SigIntGenKlass:
Inheritance graph
[legend]
Collaboration diagram for SigIntGenKlass:
Collaboration graph
[legend]

Public Member Functions

 SigIntGenKlass (Klass *parent, const string &name)
 
virtual void println (int n, ostream &fout)
 Print an auxillary C++ class corresponding to an integer init signal. More...
 
- Public Member Functions inherited from Klass
 Klass (const string &name, const string &super, int numInputs, int numOutputs, bool __vec=false)
 
virtual ~Klass ()
 
void setParentKlass (Klass *parent)
 
KlassgetParentKlass ()
 
KlassgetTopParentKlass ()
 
string getFullClassName ()
 Returns the name of the class. More...
 
void openLoop (const string &size)
 Open a non-recursive loop on top of the stack of open loops. More...
 
void openLoop (Tree recsymbol, const string &size)
 Open a recursive loop on top of the stack of open loops. More...
 
void closeLoop (Tree sig)
 Close the top loop and either keep it or absorb it within its enclosing loop. More...
 
void setLoopProperty (Tree sig, Loop *l)
 Store the loop used to compute a signal. More...
 
bool getLoopProperty (Tree sig, Loop *&l)
 Returns the loop used to compute a signal. More...
 
const string & getClassName () const
 Returns the name of the class. More...
 
LooptopLoop ()
 
void buildTasksList ()
 
void addIncludeFile (const string &str)
 
void addLibrary (const string &str)
 
void rememberNeedPowerDef ()
 
void collectIncludeFile (set< string > &S)
 
void collectLibrary (set< string > &S)
 
void addSubKlass (Klass *son)
 
void addDeclCode (const string &str)
 
void addInitCode (const string &str)
 
void addStaticInitCode (const string &str)
 
void addStaticFields (const string &str)
 
void addUICode (const string &str)
 
void addUIMacro (const string &str)
 
void incUIActiveCount ()
 
void incUIPassiveCount ()
 
void addSharedDecl (const string &str)
 
void addFirstPrivateDecl (const string &str)
 
void addZone1 (const string &str)
 
void addZone2 (const string &str)
 
void addZone2b (const string &str)
 
void addZone2c (const string &str)
 
void addZone3 (const string &str)
 
void addPreCode (const string &str)
 
void addExecCode (const string &str)
 
void addPostCode (const string &str)
 
virtual void printComputeMethod (int n, ostream &fout)
 Print Compute() method according to the various switch. More...
 
virtual void printComputeMethodScalar (int n, ostream &fout)
 
virtual void printComputeMethodVectorFaster (int n, ostream &fout)
 Uses loops of constant gVecSize boundary in order to provide the C compiler with more optimisation opportunities. More...
 
virtual void printComputeMethodVectorSimple (int n, ostream &fout)
 Simple loop layout, generally less efficient than printComputeMethodVectorFaster. More...
 
virtual void printComputeMethodOpenMP (int n, ostream &fout)
 
virtual void printComputeMethodScheduler (int n, ostream &fout)
 
virtual void printLoopGraphScalar (int n, ostream &fout)
 Print the loop graph (scalar mode) More...
 
virtual void printLoopGraphVector (int n, ostream &fout)
 Print the loop graph (used for vector code) More...
 
virtual void printLoopGraphOpenMP (int n, ostream &fout)
 Print the loop graph as a serie of parallel loops. More...
 
virtual void printLoopGraphScheduler (int n, ostream &fout)
 Print the loop graph as a serie of parallel loops. More...
 
virtual void printLoopGraphInternal (int n, ostream &fout)
 Print the loop graph (used for internals classes) More...
 
virtual void printGraphDotFormat (ostream &fout)
 Print the loop graph in dot format. More...
 
virtual void printLoopDeepFirst (int n, ostream &fout, Loop *l, set< Loop * > &visited)
 Print a loop graph deep first. More...
 
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. More...
 
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. More...
 
virtual void printOneLoopScheduler (lset::const_iterator p, int n, ostream &fout)
 
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. More...
 
virtual void printMetadata (int n, const map< Tree, set< Tree > > &S, ostream &fout)
 Print metadata declaration. More...
 
virtual void printIncludeFile (ostream &fout)
 Print the required include files. More...
 
virtual void printLibrary (ostream &fout)
 Print the required C++ libraries as comments in source code. More...
 
virtual void printAdditionalCode (ostream &fout)
 Print additional functions required by the generated code. More...
 
int inputs ()
 
int outputs ()
 

Additional Inherited Members

- Protected Attributes inherited from Klass
KlassfParentKlass
 Klass in which this Klass is embedded, void if toplevel Klass. More...
 
string fKlassName
 
string fSuperKlassName
 
int fNumInputs
 
int fNumOutputs
 
int fNumActives
 number of active controls in the UI (sliders, buttons, etc.) More...
 
int fNumPassives
 number of passive widgets in the UI (bargraphs, etc.) More...
 
set< string > fIncludeFileSet
 
set< string > fLibrarySet
 
list< Klass * > fSubClassList
 
list< string > fDeclCode
 
list< string > fStaticInitCode
 static init code for class constant tables More...
 
list< string > fStaticFields
 static fields after class More...
 
list< string > fInitCode
 
list< string > fUICode
 
list< string > fUIMacro
 
list< string > fSharedDecl
 shared declarations More...
 
list< string > fFirstPrivateDecl
 first private declarations More...
 
list< string > fZone1Code
 shared vectors More...
 
list< string > fZone2Code
 first private More...
 
list< string > fZone2bCode
 single once per block More...
 
list< string > fZone2cCode
 single once per block More...
 
list< string > fZone3Code
 private every sub block More...
 
LoopfTopLoop
 active loops currently open More...
 
property< Loop * > fLoopProperty
 loops used to compute some signals More...
 
bool fVec
 
- Static Protected Attributes inherited from Klass
static bool fNeedPowerDef = false
 true when faustpower definition is needed More...
 

Detailed Description

Definition at line 213 of file klass.hh.

Constructor & Destructor Documentation

SigIntGenKlass::SigIntGenKlass ( Klass parent,
const string &  name 
)
inline

Definition at line 217 of file klass.hh.

217 : Klass(name, "", 0, 1, false) { fParentKlass = parent; }
Klass(const string &name, const string &super, int numInputs, int numOutputs, bool __vec=false)
Definition: klass.hh:109
Klass * fParentKlass
Klass in which this Klass is embedded, void if toplevel Klass.
Definition: klass.hh:66
const char * name(Symbol *sym)
Returns the name of a symbol.
Definition: symbol.hh:98

Member Function Documentation

void SigIntGenKlass::println ( int  n,
ostream &  fout 
)
virtual

Print an auxillary C++ class corresponding to an integer init signal.

Reimplemented from Klass.

Definition at line 1128 of file klass.cpp.

References Klass::fDeclCode, Klass::fInitCode, Klass::fKlassName, Klass::fNumInputs, Klass::fNumOutputs, Klass::fSubClassList, Klass::fZone1Code, Klass::fZone2bCode, Klass::fZone2Code, Klass::fZone3Code, printlines(), Klass::printLoopGraphInternal(), and tab().

1129 {
1130  list<Klass* >::iterator k;
1131 
1132  tab(n,fout); fout << "class " << fKlassName << " {";
1133 
1134  tab(n,fout); fout << " private:";
1135  tab(n+1,fout); fout << "int \tfSamplingFreq;";
1136 
1137  for (k = fSubClassList.begin(); k != fSubClassList.end(); k++) (*k)->println(n+1, fout);
1138 
1139  printlines(n+1, fDeclCode, fout);
1140 
1141  tab(n,fout); fout << " public:";
1142 
1143  tab(n+1,fout); fout << "int getNumInputs() \t{ "
1144  << "return " << fNumInputs << "; }";
1145  tab(n+1,fout); fout << "int getNumOutputs() \t{ "
1146  << "return " << fNumOutputs << "; }";
1147 
1148  tab(n+1,fout); fout << "void init(int samplingFreq) {";
1149  tab(n+2,fout); fout << "fSamplingFreq = samplingFreq;";
1150  printlines(n+2, fInitCode, fout);
1151  tab(n+1,fout); fout << "}";
1152 
1153  tab(n+1,fout); fout << "void fill (int count, int output[]) {";
1154  printlines (n+2, fZone1Code, fout);
1155  printlines (n+2, fZone2Code, fout);
1156  printlines (n+2, fZone2bCode, fout);
1157  printlines (n+2, fZone3Code, fout);
1158  printLoopGraphInternal (n+2,fout);
1159  tab(n+1,fout); fout << "}";
1160 
1161  tab(n,fout); fout << "};\n" << endl;
1162 }
list< string > fDeclCode
Definition: klass.hh:79
void tab(int n, ostream &fout)
Definition: klass.cpp:68
list< string > fInitCode
Definition: klass.hh:82
list< string > fZone3Code
private every sub block
Definition: klass.hh:100
list< string > fZone2Code
first private
Definition: klass.hh:97
int fNumInputs
Definition: klass.hh:69
void printlines(int n, list< string > &lines, ostream &fout)
Print a list of lines.
Definition: klass.cpp:153
list< string > fZone2bCode
single once per block
Definition: klass.hh:98
virtual void printLoopGraphInternal(int n, ostream &fout)
Print the loop graph (used for internals classes)
Definition: klass.cpp:551
int fNumOutputs
Definition: klass.hh:70
string fKlassName
Definition: klass.hh:67
list< Klass * > fSubClassList
Definition: klass.hh:77
list< string > fZone1Code
shared vectors
Definition: klass.hh:96

Here is the call graph for this function:


The documentation for this class was generated from the following files: