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

#include <klass.hh>

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

Public Member Functions

 SigFloatGenKlass (Klass *parent, const string &name)
 
virtual void println (int n, ostream &fout)
 Print an auxillary C++ class corresponding to an float 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 222 of file klass.hh.

Constructor & Destructor Documentation

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

Definition at line 226 of file klass.hh.

226 : 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 SigFloatGenKlass::println ( int  n,
ostream &  fout 
)
virtual

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

Reimplemented from Klass.

Definition at line 1167 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, ifloat(), printlines(), Klass::printLoopGraphInternal(), subst(), and tab().

1168 {
1169  list<Klass* >::iterator k;
1170 
1171  tab(n,fout); fout << "class " << fKlassName << " {";
1172 
1173  tab(n,fout); fout << " private:";
1174  tab(n+1,fout); fout << "int \tfSamplingFreq;";
1175 
1176  for (k = fSubClassList.begin(); k != fSubClassList.end(); k++) (*k)->println(n+1, fout);
1177 
1178  printlines(n+1, fDeclCode, fout);
1179 
1180  tab(n,fout); fout << " public:";
1181 
1182  tab(n+1,fout); fout << "int getNumInputs() \t{ "
1183  << "return " << fNumInputs << "; }";
1184  tab(n+1,fout); fout << "int getNumOutputs() \t{ "
1185  << "return " << fNumOutputs << "; }";
1186 
1187  tab(n+1,fout); fout << "void init(int samplingFreq) {";
1188  tab(n+2,fout); fout << "fSamplingFreq = samplingFreq;";
1189  printlines(n+2, fInitCode, fout);
1190  tab(n+1,fout); fout << "}";
1191 
1192  tab(n+1,fout); fout << subst("void fill (int count, $0 output[]) {", ifloat());
1193  printlines (n+2, fZone1Code, fout);
1194  printlines (n+2, fZone2Code, fout);
1195  printlines (n+2, fZone2bCode, fout);
1196  printlines (n+2, fZone3Code, fout);
1197  printLoopGraphInternal(n+2,fout);
1198  tab(n+1,fout); fout << "}";
1199 
1200  tab(n,fout); fout << "};\n" << endl;
1201 }
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
string subst(const string &model, const vector< string > &args)
Text substitution.
Definition: Text.cpp:47
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
const char * ifloat()
Definition: floats.cpp:46

Here is the call graph for this function:


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