<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>FAUST compiler: ScalarCompiler Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.3 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>ScalarCompiler Class Reference</h1><!-- doxytag: class="ScalarCompiler" --><!-- doxytag: inherits="Compiler" --> <p>Compile a list of FAUST signals into a scalar C++ class. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="compile__scal_8hh_source.html">compile_scal.hh</a>></code></p> <p>Inherits <a class="el" href="classCompiler.html">Compiler</a>.</p> <p>Inherited by <a class="el" href="classVectorCompiler.html">VectorCompiler</a>.</p> <div class="dynheader"> Collaboration diagram for ScalarCompiler:</div> <div class="dynsection"> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classScalarCompiler-members.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a5ba99c359e876e917a35366c1dbdf343">ScalarCompiler</a> (const string &name, const string &super, int numInputs, int numOutputs)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#ac28915d125703cf3d012fca02ee1d672">ScalarCompiler</a> (<a class="el" href="classKlass.html">Klass</a> *k)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a3870aba6cb3a4ba4092a6fd1f1e01bb3">compileMultiSignal</a> (<a class="el" href="classCTree.html">Tree</a> lsig)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a3590109641b7970c68ea20d033471a41">compileSingleSignal</a> (<a class="el" href="classCTree.html">Tree</a> lsig)</td></tr> <tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988">CS</a> (<a class="el" href="classCTree.html">Tree</a> sig)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compile a signal. <a href="#aac679ae86346a78d59a4779c9bc5d988"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a312d1e036e59631cfc976ad1346d93c9">generateCode</a> (<a class="el" href="classCTree.html">Tree</a> sig)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Main code generator dispatch. <a href="#a312d1e036e59631cfc976ad1346d93c9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a> (<a class="el" href="classCTree.html">Tree</a> sig, const string &exp)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a6774794b9cc217001586c0eb7b4ebb80">generateVariableStore</a> (<a class="el" href="classCTree.html">Tree</a> sig, const string &exp)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a> (const string &prefix)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a30a141aa27d500ad6c354f82295d5306">compilePreparedSignalList</a> (<a class="el" href="classCTree.html">Tree</a> lsig)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCTree.html">Tree</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a7144aea17822337a175d660cd6def014">prepare</a> (<a class="el" href="classCTree.html">Tree</a> L0)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCTree.html">Tree</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a38de9ca99a78eb0e82f149bbf4e03783">prepare2</a> (<a class="el" href="classCTree.html">Tree</a> L0)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#ab9526b36f9f5c40e5780c6015312eed4">getCompiledExpression</a> (<a class="el" href="classCTree.html">Tree</a> sig, string &name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Test if a signal is already compiled. <a href="#ab9526b36f9f5c40e5780c6015312eed4"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a47e098af6e5857d4577371e459cd6df4">setCompiledExpression</a> (<a class="el" href="classCTree.html">Tree</a> sig, const string &name)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the string of a compiled expression is already compiled. <a href="#a47e098af6e5857d4577371e459cd6df4"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a81c64ccef445fdf557fc7b3ce6a786a7">setVectorNameProperty</a> (<a class="el" href="classCTree.html">Tree</a> sig, const string &vecname)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the vector name property of a signal, the name of the vector used to store the previous values of the signal to implement a delay. <a href="#a81c64ccef445fdf557fc7b3ce6a786a7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a12cd9487cf729b06cbece49552bc632e">getVectorNameProperty</a> (<a class="el" href="classCTree.html">Tree</a> sig, string &vecname)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the vector name property of a signal, the name of the vector used to store the previous values of the signal to implement a delay. <a href="#a12cd9487cf729b06cbece49552bc632e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a7bf169572df60b9383297d85f36e2506">getSharingCount</a> (<a class="el" href="classCTree.html">Tree</a> t)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a547b625712373da8332abff2c9b90142">setSharingCount</a> (<a class="el" href="classCTree.html">Tree</a> t, int count)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a3266c7302f512a4198aa4a047e55f80d">sharingAnalysis</a> (<a class="el" href="classCTree.html">Tree</a> t)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#ac30012ee9420900ecf8a28c4e0752142">sharingAnnotation</a> (int vctxt, <a class="el" href="classCTree.html">Tree</a> t)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#ad3aa914094a53cc9451e2526c37ddfe3">generateXtended</a> (<a class="el" href="classCTree.html">Tree</a> sig)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">retrieve the type annotation of sig <a href="#ad3aa914094a53cc9451e2526c37ddfe3"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a114a804894cbeb775c205de2410fb5a9">generateFixDelay</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> arg, <a class="el" href="classCTree.html">Tree</a> size)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate code for accessing a delayed signal. <a href="#a114a804894cbeb775c205de2410fb5a9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#ab42de3c4f62f672808a9db186702fa07">generatePrefix</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> x, <a class="el" href="classCTree.html">Tree</a> e)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#ae3daa4b707e6037295c89d6d2d741fd7">generateIota</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> arg)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a5dcc35b4aa293a13045e6e95e28fdf49">generateBinOp</a> (<a class="el" href="classCTree.html">Tree</a> sig, int opcode, <a class="el" href="classCTree.html">Tree</a> arg1, <a class="el" href="classCTree.html">Tree</a> arg2)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a92f3d40967413418444d272a271b5d5e">generateFFun</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> ff, <a class="el" href="classCTree.html">Tree</a> largs)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a6c2bc57c93e7b7aeef5fc6d9e0563161">generateInput</a> (<a class="el" href="classCTree.html">Tree</a> sig, const string &idx)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#aa79b3ecf25b9022861bbda454e160a3f">generateOutput</a> (<a class="el" href="classCTree.html">Tree</a> sig, const string &idx, const string &arg1)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a2c51c50e63758ec32c7c205ff4123446">generateTable</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> tsize, <a class="el" href="classCTree.html">Tree</a> content)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#ad21be208043a8c934441c78fd2e19a48">generateStaticTable</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> tsize, <a class="el" href="classCTree.html">Tree</a> content)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a839b060c8ac3792bb888225352533dd8">generateWRTbl</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> tbl, <a class="el" href="classCTree.html">Tree</a> idx, <a class="el" href="classCTree.html">Tree</a> data)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a37ad94c097c4d2343e71f1748129f74d">generateRDTbl</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> tbl, <a class="el" href="classCTree.html">Tree</a> idx)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a1caabad696e1b182349065cb9805d768">generateSigGen</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> content)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a7d79795953aa1a6de561b8ebd6d2db9b">generateStaticSigGen</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> content)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a2e070a0f894bf348049b111b094f8a3e">generateSelect2</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> sel, <a class="el" href="classCTree.html">Tree</a> s1, <a class="el" href="classCTree.html">Tree</a> s2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate a select2 code. <a href="#a2e070a0f894bf348049b111b094f8a3e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a0651bbed181dd7f68c53ef94f2bafd1f">generateSelect3</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> sel, <a class="el" href="classCTree.html">Tree</a> s1, <a class="el" href="classCTree.html">Tree</a> s2, <a class="el" href="classCTree.html">Tree</a> s3)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate a select3 code. <a href="#a0651bbed181dd7f68c53ef94f2bafd1f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#ac6ac92b3f9b29101dc0e09ca7d9f01e3">generateRecProj</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> exp, int i)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate code for a projection of a group of mutually recursive definitions. <a href="#ac6ac92b3f9b29101dc0e09ca7d9f01e3"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a635ee95d9c94ec8fed0e2587fbb95eba">generateRec</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> var, <a class="el" href="classCTree.html">Tree</a> le)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate code for a group of mutually recursive definitions. <a href="#a635ee95d9c94ec8fed0e2587fbb95eba"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a69b85f3ec1a38ec05bd21d245b98a60f">generateIntCast</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> x)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a1f836f4c9fd1ebade4892a1ce56e2d9d">generateFloatCast</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> x)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#accff264d4e6ed46e5a2c31ca49edd196">generateButton</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> label)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a6ae716419715b48142a2f685875d0d4e">generateCheckbox</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> label)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a3c022fb9c391b7da22e2bc9c75a370a4">generateVSlider</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> label, <a class="el" href="classCTree.html">Tree</a> cur, <a class="el" href="classCTree.html">Tree</a> min, <a class="el" href="classCTree.html">Tree</a> max, <a class="el" href="classCTree.html">Tree</a> step)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#aa840902417516d180182273d59a302ef">generateHSlider</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> label, <a class="el" href="classCTree.html">Tree</a> cur, <a class="el" href="classCTree.html">Tree</a> min, <a class="el" href="classCTree.html">Tree</a> max, <a class="el" href="classCTree.html">Tree</a> step)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a1db9a71b00c04ac777a7f206c1359cb2">generateNumEntry</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> label, <a class="el" href="classCTree.html">Tree</a> cur, <a class="el" href="classCTree.html">Tree</a> min, <a class="el" href="classCTree.html">Tree</a> max, <a class="el" href="classCTree.html">Tree</a> step)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#add2b616f1aa52f7c3e5fea14b84a341e">generateVBargraph</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> label, <a class="el" href="classCTree.html">Tree</a> min, <a class="el" href="classCTree.html">Tree</a> max, const string &exp)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a88f90a11fc6bb95aff713977fd34166d">generateHBargraph</a> (<a class="el" href="classCTree.html">Tree</a> sig, <a class="el" href="classCTree.html">Tree</a> label, <a class="el" href="classCTree.html">Tree</a> min, <a class="el" href="classCTree.html">Tree</a> max, const string &exp)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a14b0b24942c22ad01e6429dba926f55d">generateNumber</a> (<a class="el" href="classCTree.html">Tree</a> sig, const string &exp)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#abb3f8901987a78d9285d724b3e19f7d3">generateFConst</a> (<a class="el" href="classCTree.html">Tree</a> sig, const string &file, const string &name)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a3beb833085a4e20decf3783a78a18b05">generateFVar</a> (<a class="el" href="classCTree.html">Tree</a> sig, const string &file, const string &name)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#adec9012e0c7e1c27b0144e53fcdc4734">generateDelayVec</a> (<a class="el" href="classCTree.html">Tree</a> sig, const string &exp, const string &ctype, const string &vname, int mxd)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate code for the delay mecchanism. <a href="#adec9012e0c7e1c27b0144e53fcdc4734"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">string </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a98cf35a790700aa70ec4789245359a4b">generateDelayVecNoTemp</a> (<a class="el" href="classCTree.html">Tree</a> sig, const string &exp, const string &ctype, const string &vname, int mxd)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate code for the delay mecchanism without using temporary variables. <a href="#a98cf35a790700aa70ec4789245359a4b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a0fee342e1ab991f0f75169290afe36cd">generateDelayLine</a> (const string &ctype, const string &vname, int mxd, const string &exp)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate code for the delay mecchanism without using temporary variables. <a href="#a0fee342e1ab991f0f75169290afe36cd"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#ac33a3eb7d6bb601ab957871bd860b632">getTypedNames</a> (<a class="el" href="classP.html">Type</a> t, const string &prefix, string &ctype, string &vname)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a4a74bd8a23a1ce8bc21d13eeb20ba821">ensureIotaCode</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate code for a unique IOTA variable increased at each sample and used to index ring buffers. <a href="#a4a74bd8a23a1ce8bc21d13eeb20ba821"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#ad2a7768ff9ad2157f15a11686fe70366">pow2limit</a> (int x)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute the minimal power of 2 greater than x. <a href="#ad2a7768ff9ad2157f15a11686fe70366"></a><br/></td></tr> <tr><td colspan="2"><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classproperty.html">property</a>< string > </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a5a9a34892a42d9fc3b55af5da5a44176">fCompileProperty</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classproperty.html">property</a>< string > </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a6ce8c9b467aee733e29260c7f6f889f7">fVectorProperty</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classCTree.html">Tree</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#ac2dfd867bce185ff73b8f0625fcd640e">fSharingKey</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOccMarkup.html">OccMarkup</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#a01d66ece3660a3151f270d7e7a79cb77">fOccMarkup</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#af31cb95a6eca2df4a03bcb59f80d095b">fHasIota</a></td></tr> <tr><td colspan="2"><h2>Static Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static map< string, int > </td><td class="memItemRight" valign="bottom"><a class="el" href="classScalarCompiler.html#aaeb282c0d2d1e2a3f4f35c8ead8aecdb">fIDCounters</a></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Compile a list of FAUST signals into a scalar C++ class. </p> <p>Definition at line <a class="el" href="compile__scal_8hh_source.html#l00039">39</a> of file <a class="el" href="compile__scal_8hh_source.html">compile_scal.hh</a>.</p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a5ba99c359e876e917a35366c1dbdf343"></a><!-- doxytag: member="ScalarCompiler::ScalarCompiler" ref="a5ba99c359e876e917a35366c1dbdf343" args="(const string &name, const string &super, int numInputs, int numOutputs)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">ScalarCompiler::ScalarCompiler </td> <td>(</td> <td class="paramtype">const string & </td> <td class="paramname"> <em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>super</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>numInputs</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>numOutputs</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8hh_source.html#l00053">53</a> of file <a class="el" href="compile__scal_8hh_source.html">compile_scal.hh</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00054"></a>00054 : <a name="l00055"></a>00055 <a class="code" href="classCompiler.html#a3ec4b139d880a9dd56656f072ba04687">Compiler</a>(<a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>,super,numInputs,numOutputs,<span class="keyword">false</span>), <a name="l00056"></a>00056 <a class="code" href="classScalarCompiler.html#af31cb95a6eca2df4a03bcb59f80d095b">fHasIota</a>(<span class="keyword">false</span>) {} </pre></div></p> </div> </div> <a class="anchor" id="ac28915d125703cf3d012fca02ee1d672"></a><!-- doxytag: member="ScalarCompiler::ScalarCompiler" ref="ac28915d125703cf3d012fca02ee1d672" args="(Klass *k)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">ScalarCompiler::ScalarCompiler </td> <td>(</td> <td class="paramtype"><a class="el" href="classKlass.html">Klass</a> * </td> <td class="paramname"> <em>k</em></td> <td> ) </td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8hh_source.html#l00058">58</a> of file <a class="el" href="compile__scal_8hh_source.html">compile_scal.hh</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00058"></a>00058 : <a name="l00059"></a>00059 <a class="code" href="classCompiler.html#a3ec4b139d880a9dd56656f072ba04687">Compiler</a>(k), <a name="l00060"></a>00060 <a class="code" href="classScalarCompiler.html#af31cb95a6eca2df4a03bcb59f80d095b">fHasIota</a>(<span class="keyword">false</span>) <a name="l00061"></a>00061 {} </pre></div></p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a3870aba6cb3a4ba4092a6fd1f1e01bb3"></a><!-- doxytag: member="ScalarCompiler::compileMultiSignal" ref="a3870aba6cb3a4ba4092a6fd1f1e01bb3" args="(Tree lsig)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ScalarCompiler::compileMultiSignal </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>lsig</em></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Implements <a class="el" href="classCompiler.html#ad090565a1a134ba2d9ccab6fccfb6acc">Compiler</a>.</p> <p>Reimplemented in <a class="el" href="classVectorCompiler.html#aed983c23776dfd40264a14ee750f2c4c">VectorCompiler</a>.</p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00129">129</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00158">Klass::addExecCode()</a>, <a class="el" href="klass_8hh_source.html#l00155">Klass::addZone3()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile_8hh_source.html#l00056">Compiler::fDescription</a>, <a class="el" href="compile_8hh_source.html#l00055">Compiler::fUIRoot</a>, <a class="el" href="compile_8cpp_source.html#l00410">Compiler::generateMacroInterfaceTree()</a>, <a class="el" href="compile_8cpp_source.html#l00279">Compiler::generateUserInterfaceTree()</a>, <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="klass_8hh_source.html#l00190">Klass::inputs()</a>, <a class="el" href="list_8hh_source.html#l00138">isList()</a>, <a class="el" href="klass_8hh_source.html#l00191">Klass::outputs()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00096">prepare()</a>, <a class="el" href="compile_8cpp_source.html#l00133">Compiler::prepareUserInterfaceTree()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, <a class="el" href="Text_8cpp_source.html#l00163">T()</a>, <a class="el" href="list_8hh_source.html#l00134">tl()</a>, <a class="el" href="description_8cpp_source.html#l00204">Description::ui()</a>, <a class="el" href="floats_8cpp_source.html#l00050">xcast()</a>, and <a class="el" href="floats_8cpp_source.html#l00049">xfloat()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00130"></a>00130 { <a name="l00131"></a>00131 <span class="comment">//contextor recursivness(0);</span> <a name="l00132"></a>00132 L = <a class="code" href="classScalarCompiler.html#a7144aea17822337a175d660cd6def014">prepare</a>(L); <span class="comment">// optimize, share and annotate expression</span> <a name="l00133"></a>00133 <a name="l00134"></a>00134 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#ae4a8930e2604b74416905dc1830c2bb1">inputs</a>(); i++) { <a name="l00135"></a>00135 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a368fbe339be25ff39dcddd984e2c6342">addZone3</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$1* input$0 = input[$0];"</span>, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(i), <a class="code" href="floats_8cpp.html#a2da2ae6649f9479320f115342675b275">xfloat</a>())); <a name="l00136"></a>00136 } <a name="l00137"></a>00137 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a7050eb78afb74764622f1b6140297dd4">outputs</a>(); i++) { <a name="l00138"></a>00138 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a368fbe339be25ff39dcddd984e2c6342">addZone3</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$1* output$0 = output[$0];"</span>, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(i), <a class="code" href="floats_8cpp.html#a2da2ae6649f9479320f115342675b275">xfloat</a>())); <a name="l00139"></a>00139 } <a name="l00140"></a>00140 <a name="l00141"></a>00141 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; <a class="code" href="list_8hh.html#a8bdd73641276e0c0f999f504348eacc1">isList</a>(L); L = <a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(L), i++) { <a name="l00142"></a>00142 <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a> sig = <a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(L); <a name="l00143"></a>00143 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"output$0[i] = $2$1;"</span>, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(i), <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(sig), <a class="code" href="floats_8cpp.html#a73d3935ab38244e8006fbaa2b7caf33c">xcast</a>())); <a name="l00144"></a>00144 } <a name="l00145"></a>00145 <a class="code" href="classCompiler.html#ae994f402a26a38796eab173a1028804e" title="Generate buildUserInterface C++ lines of code corresponding to user interface element...">generateUserInterfaceTree</a>(<a class="code" href="classCompiler.html#a4e6876486af1cf65dc633fd3b99aba85" title="Remove fake root folder if not needed (that is if the UI is completely enclosed in...">prepareUserInterfaceTree</a>(<a class="code" href="classCompiler.html#a2b8004ea1fd5b86ded1a093e7c5eb70d">fUIRoot</a>)); <a name="l00146"></a>00146 <a class="code" href="classCompiler.html#a83bb12b7d930bd1b574e35202f5d3da6" title="Generate user interface macros corresponding to user interface element t.">generateMacroInterfaceTree</a>(<span class="stringliteral">""</span>, <a class="code" href="classCompiler.html#a4e6876486af1cf65dc633fd3b99aba85" title="Remove fake root folder if not needed (that is if the UI is completely enclosed in...">prepareUserInterfaceTree</a>(<a class="code" href="classCompiler.html#a2b8004ea1fd5b86ded1a093e7c5eb70d">fUIRoot</a>)); <a name="l00147"></a>00147 <span class="keywordflow">if</span> (<a class="code" href="classCompiler.html#a8a23c67dd7d72d5aa6353d29de84b711">fDescription</a>) { <a name="l00148"></a>00148 <a class="code" href="classCompiler.html#a8a23c67dd7d72d5aa6353d29de84b711">fDescription</a>-><a class="code" href="classDescription.html#a7b97643d00e0cc786355a696cac2bcba">ui</a>(<a class="code" href="classCompiler.html#a4e6876486af1cf65dc633fd3b99aba85" title="Remove fake root folder if not needed (that is if the UI is completely enclosed in...">prepareUserInterfaceTree</a>(<a class="code" href="classCompiler.html#a2b8004ea1fd5b86ded1a093e7c5eb70d">fUIRoot</a>)); <a name="l00149"></a>00149 } <a name="l00150"></a>00150 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a30a141aa27d500ad6c354f82295d5306"></a><!-- doxytag: member="ScalarCompiler::compilePreparedSignalList" ref="a30a141aa27d500ad6c354f82295d5306" args="(Tree lsig)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ScalarCompiler::compilePreparedSignalList </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>lsig</em></td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a3590109641b7970c68ea20d033471a41"></a><!-- doxytag: member="ScalarCompiler::compileSingleSignal" ref="a3590109641b7970c68ea20d033471a41" args="(Tree lsig)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ScalarCompiler::compileSingleSignal </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>lsig</em></td> <td> ) </td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Implements <a class="el" href="classCompiler.html#a0a282f00285b51971d41a6b7e3bd5f7c">Compiler</a>.</p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00157">157</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00158">Klass::addExecCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile_8hh_source.html#l00056">Compiler::fDescription</a>, <a class="el" href="compile_8hh_source.html#l00055">Compiler::fUIRoot</a>, <a class="el" href="compile_8cpp_source.html#l00410">Compiler::generateMacroInterfaceTree()</a>, <a class="el" href="compile_8cpp_source.html#l00279">Compiler::generateUserInterfaceTree()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00113">prepare2()</a>, <a class="el" href="compile_8cpp_source.html#l00133">Compiler::prepareUserInterfaceTree()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, and <a class="el" href="description_8cpp_source.html#l00204">Description::ui()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00056">signal2klass()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00158"></a>00158 { <a name="l00159"></a>00159 <span class="comment">//contextor recursivness(0);</span> <a name="l00160"></a>00160 sig = <a class="code" href="classScalarCompiler.html#a38de9ca99a78eb0e82f149bbf4e03783">prepare2</a>(sig); <span class="comment">// optimize and annotate expression</span> <a name="l00161"></a>00161 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"output[i] = $0;"</span>, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(sig))); <a name="l00162"></a>00162 <a class="code" href="classCompiler.html#ae994f402a26a38796eab173a1028804e" title="Generate buildUserInterface C++ lines of code corresponding to user interface element...">generateUserInterfaceTree</a>(<a class="code" href="classCompiler.html#a4e6876486af1cf65dc633fd3b99aba85" title="Remove fake root folder if not needed (that is if the UI is completely enclosed in...">prepareUserInterfaceTree</a>(<a class="code" href="classCompiler.html#a2b8004ea1fd5b86ded1a093e7c5eb70d">fUIRoot</a>)); <a name="l00163"></a>00163 <a class="code" href="classCompiler.html#a83bb12b7d930bd1b574e35202f5d3da6" title="Generate user interface macros corresponding to user interface element t.">generateMacroInterfaceTree</a>(<span class="stringliteral">""</span>, <a class="code" href="classCompiler.html#a4e6876486af1cf65dc633fd3b99aba85" title="Remove fake root folder if not needed (that is if the UI is completely enclosed in...">prepareUserInterfaceTree</a>(<a class="code" href="classCompiler.html#a2b8004ea1fd5b86ded1a093e7c5eb70d">fUIRoot</a>)); <a name="l00164"></a>00164 <span class="keywordflow">if</span> (<a class="code" href="classCompiler.html#a8a23c67dd7d72d5aa6353d29de84b711">fDescription</a>) { <a name="l00165"></a>00165 <a class="code" href="classCompiler.html#a8a23c67dd7d72d5aa6353d29de84b711">fDescription</a>-><a class="code" href="classDescription.html#a7b97643d00e0cc786355a696cac2bcba">ui</a>(<a class="code" href="classCompiler.html#a4e6876486af1cf65dc633fd3b99aba85" title="Remove fake root folder if not needed (that is if the UI is completely enclosed in...">prepareUserInterfaceTree</a>(<a class="code" href="classCompiler.html#a2b8004ea1fd5b86ded1a093e7c5eb70d">fUIRoot</a>)); <a name="l00166"></a>00166 } <a name="l00167"></a>00167 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="aac679ae86346a78d59a4779c9bc5d988"></a><!-- doxytag: member="ScalarCompiler::CS" ref="aac679ae86346a78d59a4779c9bc5d988" args="(Tree sig)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::CS </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em></td> <td> ) </td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Compile a signal. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sig</em> </td><td>the signal expression to compile. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the C code translation of sig as a string </dd></dl> <p>Reimplemented in <a class="el" href="classVectorCompiler.html#a00dc47a1dd180a4c2a36494a5e9d0273">VectorCompiler</a>.</p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00202">202</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00180">getCompiledExpression()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00191">setCompiledExpression()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00129">compileMultiSignal()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00157">compileSingleSignal()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00369">generateBinOp()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00379">generateFFun()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01098">generateFixDelay()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00489">generateFloatCast()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00484">generateIntCast()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00821">generatePrefix()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00735">generateRDTbl()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00783">generateRec()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00874">generateSelect2()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00933">generateSelect3()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00638">generateTable()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00723">generateWRTbl()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l01007">generateXtended()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00203"></a>00203 { <a name="l00204"></a>00204 <span class="comment">//contextor contextRecursivness;</span> <a name="l00205"></a>00205 <span class="keywordtype">string</span> code; <a name="l00206"></a>00206 <a name="l00207"></a>00207 <span class="keywordflow">if</span> (!<a class="code" href="classScalarCompiler.html#ab9526b36f9f5c40e5780c6015312eed4" title="Test if a signal is already compiled.">getCompiledExpression</a>(sig, code)) { <a name="l00208"></a>00208 <span class="comment">// not compiled yet</span> <a name="l00209"></a>00209 <span class="comment">/* if (getRecursivness(sig) != contextRecursivness.get()) {</span> <a name="l00210"></a>00210 <span class="comment"> contextRecursivness.set(getRecursivness(sig));</span> <a name="l00211"></a>00211 <span class="comment"> }*/</span> <a name="l00212"></a>00212 code = <a class="code" href="classScalarCompiler.html#a312d1e036e59631cfc976ad1346d93c9" title="Main code generator dispatch.">generateCode</a>(sig); <a name="l00213"></a>00213 <a class="code" href="classScalarCompiler.html#a47e098af6e5857d4577371e459cd6df4" title="Set the string of a compiled expression is already compiled.">setCompiledExpression</a>(sig, code); <a name="l00214"></a>00214 } <a name="l00215"></a>00215 <span class="keywordflow">return</span> code; <a name="l00216"></a>00216 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a4a74bd8a23a1ce8bc21d13eeb20ba821"></a><!-- doxytag: member="ScalarCompiler::ensureIotaCode" ref="a4a74bd8a23a1ce8bc21d13eeb20ba821" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ScalarCompiler::ensureIotaCode </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Generate code for a unique IOTA variable increased at each sample and used to index ring buffers. </p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l01245">1245</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="klass_8hh_source.html#l00159">Klass::addPostCode()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, and <a class="el" href="compile__scal_8hh_source.html#l00048">fHasIota</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l01199">generateDelayLine()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l01151">generateDelayVecNoTemp()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l01246"></a>01246 { <a name="l01247"></a>01247 <span class="keywordflow">if</span> (!<a class="code" href="classScalarCompiler.html#af31cb95a6eca2df4a03bcb59f80d095b">fHasIota</a>) { <a name="l01248"></a>01248 <a class="code" href="classScalarCompiler.html#af31cb95a6eca2df4a03bcb59f80d095b">fHasIota</a> = <span class="keyword">true</span>; <a name="l01249"></a>01249 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<span class="stringliteral">"int \tIOTA;"</span>); <a name="l01250"></a>01250 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<span class="stringliteral">"IOTA = 0;"</span>); <a name="l01251"></a>01251 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a9e4aa8af46e099cdfc0cb2775239620f">addPostCode</a>(<span class="stringliteral">"IOTA = IOTA+1;"</span>); <a name="l01252"></a>01252 } <a name="l01253"></a>01253 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a5dcc35b4aa293a13045e6e95e28fdf49"></a><!-- doxytag: member="ScalarCompiler::generateBinOp" ref="a5dcc35b4aa293a13045e6e95e28fdf49" args="(Tree sig, int opcode, Tree arg1, Tree arg2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateBinOp </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>opcode</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>arg1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>arg2</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00369">369</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="binop_8cpp_source.html#l00028">gBinOpTable</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00370"></a>00370 { <a name="l00371"></a>00371 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"($0 $1 $2)"</span>, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(arg1), <a class="code" href="binop_8cpp.html#a2d55d4b4acaed7188a432ffdb646395a">gBinOpTable</a>[opcode]->fName, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(arg2))); <a name="l00372"></a>00372 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="accff264d4e6ed46e5a2c31ca49edd196"></a><!-- doxytag: member="ScalarCompiler::generateButton" ref="accff264d4e6ed46e5a2c31ca49edd196" args="(Tree sig, Tree label)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateButton </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>label</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00498">498</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="compile_8cpp_source.html#l00123">Compiler::addUIWidget()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="list_8cpp_source.html#l00240">reverse()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, <a class="el" href="list_8hh_source.html#l00134">tl()</a>, <a class="el" href="tree_8hh_source.html#l00173">tree()</a>, <a class="el" href="uitree_8cpp_source.html#l00140">uiWidget()</a>, and <a class="el" href="floats_8cpp_source.html#l00049">xfloat()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00499"></a>00499 { <a name="l00500"></a>00500 <span class="keywordtype">string</span> varname = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"fbutton"</span>); <a name="l00501"></a>00501 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$1 \t$0;"</span>, varname, <a class="code" href="floats_8cpp.html#a2da2ae6649f9479320f115342675b275">xfloat</a>())); <a name="l00502"></a>00502 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = 0.0;"</span>, varname)); <a name="l00503"></a>00503 <a class="code" href="classCompiler.html#a4532f2ccb5ae6b5bcef23029a01a86c2" title="Add a widget with a certain path to the user interface tree.">addUIWidget</a>(<a class="code" href="list_8cpp.html#a8e15f8d6fcc6cd319059c2e0544145bb">reverse</a>(<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(path)), <a class="code" href="uitree_8cpp.html#a57e5e173f6563110a36543ae576322cb">uiWidget</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(path), <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(varname), sig)); <a name="l00504"></a>00504 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, varname); <a name="l00505"></a>00505 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a96c58f44c4a1d1ac3bd648b542bd0afa"></a><!-- doxytag: member="ScalarCompiler::generateCacheCode" ref="a96c58f44c4a1d1ac3bd648b542bd0afa" args="(Tree sig, const string &exp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateCacheCode </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>exp</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Reimplemented in <a class="el" href="classVectorCompiler.html#a446965617480f2c52ad9cc6e474395bb">VectorCompiler</a>.</p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00410">410</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8hh_source.html#l00047">fOccMarkup</a>, <a class="el" href="compile__scal_8cpp_source.html#l01137">generateDelayVec()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00448">generateVariableStore()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00180">getCompiledExpression()</a>, <a class="el" href="occurences_8cpp_source.html#l00054">Occurences::getMaxDelay()</a>, <a class="el" href="sharing_8cpp_source.html#l00062">getSharingCount()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00401">getTypedNames()</a>, and <a class="el" href="occurences_8cpp_source.html#l00081">OccMarkup::retrieve()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00369">generateBinOp()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00498">generateButton()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00507">generateCheckbox()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01098">generateFixDelay()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00489">generateFloatCast()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00332">generateFVar()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00572">generateHBargraph()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00526">generateHSlider()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00351">generateInput()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00484">generateIntCast()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00535">generateNumEntry()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00735">generateRDTbl()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00874">generateSelect2()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00933">generateSelect3()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00545">generateVBargraph()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00517">generateVSlider()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l01007">generateXtended()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00411"></a>00411 { <a name="l00412"></a>00412 <span class="keywordtype">string</span> vname, ctype, code; <a name="l00413"></a>00413 <span class="keywordtype">int</span> sharing = <a class="code" href="classScalarCompiler.html#a7bf169572df60b9383297d85f36e2506">getSharingCount</a>(sig); <a name="l00414"></a>00414 <a class="code" href="classOccurences.html">Occurences</a>* o = <a class="code" href="classScalarCompiler.html#a01d66ece3660a3151f270d7e7a79cb77">fOccMarkup</a>.<a class="code" href="classOccMarkup.html#ade9cb60264fd5e727cfb69568cb49efa" title="occurences of subtree t within root tree">retrieve</a>(sig); <a name="l00415"></a>00415 <a name="l00416"></a>00416 <span class="comment">// check reentrance</span> <a name="l00417"></a>00417 <span class="keywordflow">if</span> (<a class="code" href="classScalarCompiler.html#ab9526b36f9f5c40e5780c6015312eed4" title="Test if a signal is already compiled.">getCompiledExpression</a>(sig, code)) { <a name="l00418"></a>00418 <span class="keywordflow">return</span> code; <a name="l00419"></a>00419 } <a name="l00420"></a>00420 <a name="l00421"></a>00421 <span class="comment">// check for expression occuring in delays</span> <a name="l00422"></a>00422 <span class="keywordflow">if</span> (o-><a class="code" href="classOccurences.html#ae7a8f070a5ad9597882c9e813b801cd7" title="return the maximal delay collected">getMaxDelay</a>()>0) { <a name="l00423"></a>00423 <a name="l00424"></a>00424 <a class="code" href="classScalarCompiler.html#ac33a3eb7d6bb601ab957871bd860b632">getTypedNames</a>(<a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(sig), <span class="stringliteral">"Vec"</span>, ctype, vname); <a name="l00425"></a>00425 <span class="keywordflow">if</span> (sharing>1) { <a name="l00426"></a>00426 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#adec9012e0c7e1c27b0144e53fcdc4734" title="Generate code for the delay mecchanism.">generateDelayVec</a>(sig, <a class="code" href="classScalarCompiler.html#a6774794b9cc217001586c0eb7b4ebb80">generateVariableStore</a>(sig,exp), ctype, vname, o-><a class="code" href="classOccurences.html#ae7a8f070a5ad9597882c9e813b801cd7" title="return the maximal delay collected">getMaxDelay</a>()); <a name="l00427"></a>00427 } <span class="keywordflow">else</span> { <a name="l00428"></a>00428 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#adec9012e0c7e1c27b0144e53fcdc4734" title="Generate code for the delay mecchanism.">generateDelayVec</a>(sig, exp, ctype, vname, o-><a class="code" href="classOccurences.html#ae7a8f070a5ad9597882c9e813b801cd7" title="return the maximal delay collected">getMaxDelay</a>()); <a name="l00429"></a>00429 } <a name="l00430"></a>00430 <a name="l00431"></a>00431 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sharing == 1) { <a name="l00432"></a>00432 <a name="l00433"></a>00433 <span class="keywordflow">return</span> exp; <a name="l00434"></a>00434 <a name="l00435"></a>00435 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (sharing > 1) { <a name="l00436"></a>00436 <a name="l00437"></a>00437 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a6774794b9cc217001586c0eb7b4ebb80">generateVariableStore</a>(sig, exp); <a name="l00438"></a>00438 <a name="l00439"></a>00439 } <span class="keywordflow">else</span> { <a name="l00440"></a>00440 cerr << <span class="stringliteral">"Error in sharing count ("</span> << sharing << <span class="stringliteral">") for "</span> << *sig << endl; <a name="l00441"></a>00441 exit(1); <a name="l00442"></a>00442 } <a name="l00443"></a>00443 <a name="l00444"></a>00444 <span class="keywordflow">return</span> <span class="stringliteral">"Error in generateCacheCode"</span>; <a name="l00445"></a>00445 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a6ae716419715b48142a2f685875d0d4e"></a><!-- doxytag: member="ScalarCompiler::generateCheckbox" ref="a6ae716419715b48142a2f685875d0d4e" args="(Tree sig, Tree label)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateCheckbox </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>label</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00507">507</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="compile_8cpp_source.html#l00123">Compiler::addUIWidget()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="list_8cpp_source.html#l00240">reverse()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, <a class="el" href="list_8hh_source.html#l00134">tl()</a>, <a class="el" href="tree_8hh_source.html#l00173">tree()</a>, <a class="el" href="uitree_8cpp_source.html#l00140">uiWidget()</a>, and <a class="el" href="floats_8cpp_source.html#l00049">xfloat()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00508"></a>00508 { <a name="l00509"></a>00509 <span class="keywordtype">string</span> varname = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"fcheckbox"</span>); <a name="l00510"></a>00510 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$1 \t$0;"</span>, varname, <a class="code" href="floats_8cpp.html#a2da2ae6649f9479320f115342675b275">xfloat</a>())); <a name="l00511"></a>00511 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = 0.0;"</span>, varname)); <a name="l00512"></a>00512 <a class="code" href="classCompiler.html#a4532f2ccb5ae6b5bcef23029a01a86c2" title="Add a widget with a certain path to the user interface tree.">addUIWidget</a>(<a class="code" href="list_8cpp.html#a8e15f8d6fcc6cd319059c2e0544145bb">reverse</a>(<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(path)), <a class="code" href="uitree_8cpp.html#a57e5e173f6563110a36543ae576322cb">uiWidget</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(path), <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(varname), sig)); <a name="l00513"></a>00513 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, varname); <a name="l00514"></a>00514 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a312d1e036e59631cfc976ad1346d93c9"></a><!-- doxytag: member="ScalarCompiler::generateCode" ref="a312d1e036e59631cfc976ad1346d93c9" args="(Tree sig)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateCode </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em></td> <td> ) </td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Main code generator dispatch. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sig</em> </td><td>the signal expression to compile. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the C code translation of sig </dd></dl> <p>Reimplemented in <a class="el" href="classVectorCompiler.html#af8918246b8ae134504d606b1ee65da59">VectorCompiler</a>.</p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00227">227</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00369">generateBinOp()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00498">generateButton()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00507">generateCheckbox()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00313">generateFConst()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00379">generateFFun()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01098">generateFixDelay()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00489">generateFloatCast()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00332">generateFVar()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00572">generateHBargraph()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00526">generateHSlider()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00351">generateInput()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00484">generateIntCast()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00847">generateIota()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00295">generateNumber()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00535">generateNumEntry()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00357">generateOutput()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00821">generatePrefix()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00735">generateRDTbl()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00766">generateRecProj()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00874">generateSelect2()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00933">generateSelect3()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00611">generateSigGen()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00638">generateTable()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00545">generateVBargraph()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00517">generateVSlider()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00723">generateWRTbl()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01007">generateXtended()</a>, <a class="el" href="symbol_8hh_source.html#l00100">getUserData()</a>, <a class="el" href="signals_8cpp_source.html#l00151">isProj()</a>, <a class="el" href="signals_8cpp_source.html#l00286">isSigAttach()</a>, <a class="el" href="signals_8cpp_source.html#l00126">isSigBinOp()</a>, <a class="el" href="signals_8cpp_source.html#l00199">isSigButton()</a>, <a class="el" href="signals_8cpp_source.html#l00205">isSigCheckbox()</a>, <a class="el" href="signals_8cpp_source.html#l00138">isSigFConst()</a>, <a class="el" href="signals_8cpp_source.html#l00133">isSigFFun()</a>, <a class="el" href="signals_8cpp_source.html#l00062">isSigFixDelay()</a>, <a class="el" href="signals_8cpp_source.html#l00187">isSigFloatCast()</a>, <a class="el" href="signals_8cpp_source.html#l00144">isSigFVar()</a>, <a class="el" href="signals_8cpp_source.html#l00091">isSigGen()</a>, <a class="el" href="signals_8cpp_source.html#l00274">isSigHBargraph()</a>, <a class="el" href="signals_8cpp_source.html#l00212">isSigHSlider()</a>, <a class="el" href="signals_8cpp_source.html#l00048">isSigInput()</a>, <a class="el" href="signals_8cpp_source.html#l00041">isSigInt()</a>, <a class="el" href="signals_8cpp_source.html#l00184">isSigIntCast()</a>, <a class="el" href="signals_8cpp_source.html#l00070">isSigIota()</a>, <a class="el" href="signals_8cpp_source.html#l00252">isSigNumEntry()</a>, <a class="el" href="signals_8cpp_source.html#l00052">isSigOutput()</a>, <a class="el" href="signals_8cpp_source.html#l00066">isSigPrefix()</a>, <a class="el" href="signals_8cpp_source.html#l00077">isSigRDTbl()</a>, <a class="el" href="signals_8cpp_source.html#l00044">isSigReal()</a>, <a class="el" href="signals_8cpp_source.html#l00116">isSigSelect2()</a>, <a class="el" href="signals_8cpp_source.html#l00119">isSigSelect3()</a>, <a class="el" href="signals_8cpp_source.html#l00085">isSigTable()</a>, <a class="el" href="signals_8cpp_source.html#l00280">isSigVBargraph()</a>, <a class="el" href="signals_8cpp_source.html#l00232">isSigVSlider()</a>, <a class="el" href="signals_8cpp_source.html#l00081">isSigWRTbl()</a>, <a class="el" href="symbol_8hh_source.html#l00098">name()</a>, <a class="el" href="list_8cpp_source.html#l00154">print()</a>, <a class="el" href="sigprint_8cpp_source.html#l00085">printSignal()</a>, <a class="el" href="Text_8cpp_source.html#l00163">T()</a>, and <a class="el" href="tree_8cpp_source.html#l00292">tree2str()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00228"></a>00228 { <a name="l00229"></a>00229 <span class="preprocessor">#if 0</span> <a name="l00230"></a>00230 <span class="preprocessor"></span> fprintf(stderr, <span class="stringliteral">"CALL generateCode("</span>); <a name="l00231"></a>00231 <a class="code" href="sigprint_8cpp.html#ac996689aaeee388feb18661ff38abe01">printSignal</a>(sig, stderr); <a name="l00232"></a>00232 fprintf(stderr, <span class="stringliteral">")\n"</span>); <a name="l00233"></a>00233 <span class="preprocessor">#endif</span> <a name="l00234"></a>00234 <span class="preprocessor"></span> <a name="l00235"></a>00235 <span class="keywordtype">int</span> i; <a name="l00236"></a>00236 <span class="keywordtype">double</span> r; <a name="l00237"></a>00237 <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a> c, sel, x, y, z, label, id, ff, largs, type, <a class="code" href="symbol_8hh.html#a8243134fbbd9d924ebbb3f833922e310" title="Returns the name of a symbol.">name</a>, file; <a name="l00238"></a>00238 <a name="l00239"></a>00239 <span class="comment">//printf("compilation of %p : ", sig); print(sig); printf("\n");</span> <a name="l00240"></a>00240 <a name="l00241"></a>00241 <span class="keywordflow">if</span> ( <a class="code" href="symbol_8hh.html#a603fcb6c07eacf2688c2a8470637d0ff" title="Returns user data.">getUserData</a>(sig) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#ad3aa914094a53cc9451e2526c37ddfe3" title="retrieve the type annotation of sig">generateXtended</a>(sig); } <a name="l00242"></a>00242 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a75cc925deac1e031e75ae72271dd5995">isSigInt</a>(sig, &i) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a14b0b24942c22ad01e6429dba926f55d">generateNumber</a>(sig, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(i)); } <a name="l00243"></a>00243 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a305497ed8593020624204f9d359743f2">isSigReal</a>(sig, &r) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a14b0b24942c22ad01e6429dba926f55d">generateNumber</a>(sig, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(r)); } <a name="l00244"></a>00244 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a38254d67a0541d98c6097fd51b22ea45">isSigInput</a>(sig, &i) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a6c2bc57c93e7b7aeef5fc6d9e0563161">generateInput</a> (sig, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(i)); } <a name="l00245"></a>00245 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a1415deb58619ab50a536d7f2ce425f22">isSigOutput</a>(sig, &i, x) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#aa79b3ecf25b9022861bbda454e160a3f">generateOutput</a> (sig, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(i), <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(x));} <a name="l00246"></a>00246 <a name="l00247"></a>00247 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#af55cdefee258834b3b8f6c070d4970c9">isSigFixDelay</a>(sig, x, y) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a114a804894cbeb775c205de2410fb5a9" title="Generate code for accessing a delayed signal.">generateFixDelay</a> (sig, x, y); } <a name="l00248"></a>00248 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a18895c816779682006a84aede438af29">isSigPrefix</a>(sig, x, y) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#ab42de3c4f62f672808a9db186702fa07">generatePrefix</a> (sig, x, y); } <a name="l00249"></a>00249 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a6aca999210178e06a21136a1bd819031">isSigIota</a>(sig, x) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#ae3daa4b707e6037295c89d6d2d741fd7">generateIota</a> (sig, x); } <a name="l00250"></a>00250 <a name="l00251"></a>00251 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a8705584c3c319be54be73dc391d25634">isSigBinOp</a>(sig, &i, x, y) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a5dcc35b4aa293a13045e6e95e28fdf49">generateBinOp</a> (sig, i, x, y); } <a name="l00252"></a>00252 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a7d60b2c9da70fb0a2edff9593d38c573">isSigFFun</a>(sig, ff, largs) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a92f3d40967413418444d272a271b5d5e">generateFFun</a> (sig, ff, largs); } <a name="l00253"></a>00253 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a71788aa9ccfc0aa598243fbef2a88f68">isSigFConst</a>(sig, type, name, file) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#abb3f8901987a78d9285d724b3e19f7d3">generateFConst</a>(sig, <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(file), <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(name)); } <a name="l00254"></a>00254 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a13d7a7178d98383c309b0e4a45dfc96b">isSigFVar</a>(sig, type, name, file) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a3beb833085a4e20decf3783a78a18b05">generateFVar</a>(sig, <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(file), <a class="code" href="tree_8cpp.html#ac753d60778175e30a86cba647db017ad" title="if t has a node of type symbol, return its name otherwise error">tree2str</a>(name)); } <a name="l00255"></a>00255 <a name="l00256"></a>00256 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#aa9b2ad7a65566fbc382d60e315b42740">isSigTable</a>(sig, <span class="keywordtype">id</span>, x, y) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a2c51c50e63758ec32c7c205ff4123446">generateTable</a> (sig, x, y); } <a name="l00257"></a>00257 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#ab5b22110acbd38b7d4634dc94bcc8d22">isSigWRTbl</a>(sig, <span class="keywordtype">id</span>, x, y, z) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a839b060c8ac3792bb888225352533dd8">generateWRTbl</a> (sig, x, y, z); } <a name="l00258"></a>00258 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a9d9cbd375c200fa4e666de6ffb72dbca">isSigRDTbl</a>(sig, x, y) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a37ad94c097c4d2343e71f1748129f74d">generateRDTbl</a> (sig, x, y); } <a name="l00259"></a>00259 <a name="l00260"></a>00260 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a55f14d5c4b5bc07285840f93d380b422">isSigSelect2</a>(sig, sel, x, y) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a2e070a0f894bf348049b111b094f8a3e" title="Generate a select2 code.">generateSelect2</a> (sig, sel, x, y); } <a name="l00261"></a>00261 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a33cf5ac61f2ad8244394ce1e59914bbc">isSigSelect3</a>(sig, sel, x, y, z) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a0651bbed181dd7f68c53ef94f2bafd1f" title="Generate a select3 code.">generateSelect3</a> (sig, sel, x, y, z); } <a name="l00262"></a>00262 <a name="l00263"></a>00263 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a771720237ca174a55a6823cc6623d602">isSigGen</a>(sig, x) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a1caabad696e1b182349065cb9805d768">generateSigGen</a> (sig, x); } <a name="l00264"></a>00264 <a name="l00265"></a>00265 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a9b54e9177bb3726e06700649c3e5c05d">isProj</a>(sig, &i, x) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#ac6ac92b3f9b29101dc0e09ca7d9f01e3" title="Generate code for a projection of a group of mutually recursive definitions.">generateRecProj</a> (sig, x, i); } <a name="l00266"></a>00266 <a name="l00267"></a>00267 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a3ef48f0da2ef5b8e3ee7371a1e4059ae">isSigIntCast</a>(sig, x) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a69b85f3ec1a38ec05bd21d245b98a60f">generateIntCast</a> (sig, x); } <a name="l00268"></a>00268 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a52448156d86125bbc8de23d641217de2">isSigFloatCast</a>(sig, x) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a1f836f4c9fd1ebade4892a1ce56e2d9d">generateFloatCast</a> (sig, x); } <a name="l00269"></a>00269 <a name="l00270"></a>00270 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a9cb8af593289d910a1f8ec8a9c8d880f">isSigButton</a>(sig, label) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#accff264d4e6ed46e5a2c31ca49edd196">generateButton</a> (sig, label); } <a name="l00271"></a>00271 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a48996c1ce74258d499baae3d267078bc">isSigCheckbox</a>(sig, label) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a6ae716419715b48142a2f685875d0d4e">generateCheckbox</a> (sig, label); } <a name="l00272"></a>00272 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#aac990f39e6a1d50e8e1de3b6f7701cfe">isSigVSlider</a>(sig, label,c,x,y,z) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a3c022fb9c391b7da22e2bc9c75a370a4">generateVSlider</a> (sig, label, c,x,y,z); } <a name="l00273"></a>00273 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#aaa72c718314a1ba2cee25a95c153e37d">isSigHSlider</a>(sig, label,c,x,y,z) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#aa840902417516d180182273d59a302ef">generateHSlider</a> (sig, label, c,x,y,z); } <a name="l00274"></a>00274 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#aa8476971aba67dfc3af7b5d11f974ef3">isSigNumEntry</a>(sig, label,c,x,y,z) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a1db9a71b00c04ac777a7f206c1359cb2">generateNumEntry</a> (sig, label, c,x,y,z); } <a name="l00275"></a>00275 <a name="l00276"></a>00276 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a667a345cf4efcba00fce5a06bc1e8299">isSigVBargraph</a>(sig, label,x,y,z) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#add2b616f1aa52f7c3e5fea14b84a341e">generateVBargraph</a> (sig, label, x, y, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(z)); } <a name="l00277"></a>00277 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#a5acf9dd03d1d0032e9486867876f1806">isSigHBargraph</a>(sig, label,x,y,z) ) { <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a88f90a11fc6bb95aff713977fd34166d">generateHBargraph</a> (sig, label, x, y, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(z)); } <a name="l00278"></a>00278 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( <a class="code" href="signals_8cpp.html#ad717966fe25735c5cf799e04338192b4">isSigAttach</a>(sig, x, y) ) { <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(y); <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(x)); } <a name="l00279"></a>00279 <a name="l00280"></a>00280 <span class="keywordflow">else</span> { <a name="l00281"></a>00281 printf(<span class="stringliteral">"Error in compiling signal, unrecognized signal : "</span>); <a name="l00282"></a>00282 <a class="code" href="list_8cpp.html#a850f2e459a901e0c9908d3a3a54b306e">print</a>(sig); <a name="l00283"></a>00283 printf(<span class="stringliteral">"\n"</span>); <a name="l00284"></a>00284 exit(1); <a name="l00285"></a>00285 } <a name="l00286"></a>00286 <span class="keywordflow">return</span> <span class="stringliteral">"error in generate code"</span>; <a name="l00287"></a>00287 } </pre></div></p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a0fee342e1ab991f0f75169290afe36cd"></a><!-- doxytag: member="ScalarCompiler::generateDelayLine" ref="a0fee342e1ab991f0f75169290afe36cd" args="(const string &ctype, const string &vname, int mxd, const string &exp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ScalarCompiler::generateDelayLine </td> <td>(</td> <td class="paramtype">const string & </td> <td class="paramname"> <em>ctype</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>vname</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>mxd</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>exp</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Generate code for the delay mecchanism without using temporary variables. </p> <p>Reimplemented in <a class="el" href="classVectorCompiler.html#a4a78b541b4c01df34c128aff55489675">VectorCompiler</a>.</p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l01199">1199</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00158">Klass::addExecCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="klass_8hh_source.html#l00159">Klass::addPostCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01245">ensureIotaCode()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="main_8cpp_source.html#l00124">gMaxCopyDelay</a>, <a class="el" href="compile__scal_8cpp_source.html#l01065">pow2limit()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, and <a class="el" href="Text_8cpp_source.html#l00163">T()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00783">generateRec()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l01200"></a>01200 { <a name="l01201"></a>01201 <span class="comment">//assert(mxd > 0);</span> <a name="l01202"></a>01202 <span class="keywordflow">if</span> (mxd == 0) { <a name="l01203"></a>01203 <span class="comment">// cerr << "MXD==0 : " << vname << " := " << exp << endl;</span> <a name="l01204"></a>01204 <span class="comment">// no need for a real vector</span> <a name="l01205"></a>01205 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1 = $2;"</span>, ctype, vname, exp)); <a name="l01206"></a>01206 <a name="l01207"></a>01207 <a name="l01208"></a>01208 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (mxd < <a class="code" href="doc__compile_8cpp.html#a278e0cda879c0108aff047853ab0214c">gMaxCopyDelay</a>) { <a name="l01209"></a>01209 <a name="l01210"></a>01210 <span class="comment">// short delay : we copy</span> <a name="l01211"></a>01211 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1[$2];"</span>, ctype, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(mxd+1))); <a name="l01212"></a>01212 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"for (int i=0; i<$1; i++) $0[i] = 0;"</span>, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(mxd+1))); <a name="l01213"></a>01213 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[0] = $1;"</span>, vname, exp)); <a name="l01214"></a>01214 <a name="l01215"></a>01215 <span class="comment">// generate post processing copy code to update delay values</span> <a name="l01216"></a>01216 <span class="keywordflow">if</span> (mxd == 1) { <a name="l01217"></a>01217 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a9e4aa8af46e099cdfc0cb2775239620f">addPostCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[1] = $0[0];"</span>, vname)); <a name="l01218"></a>01218 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (mxd == 2) { <a name="l01219"></a>01219 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a9e4aa8af46e099cdfc0cb2775239620f">addPostCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[2] = $0[1]; $0[1] = $0[0];"</span>, vname)); <a name="l01220"></a>01220 } <span class="keywordflow">else</span> { <a name="l01221"></a>01221 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a9e4aa8af46e099cdfc0cb2775239620f">addPostCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"for (int i=$0; i>0; i--) $1[i] = $1[i-1];"</span>, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(mxd), vname)); <a name="l01222"></a>01222 } <a name="l01223"></a>01223 <a name="l01224"></a>01224 } <span class="keywordflow">else</span> { <a name="l01225"></a>01225 <a name="l01226"></a>01226 <span class="comment">// generate code for a long delay : we use a ring buffer of size N = 2**x > mxd</span> <a name="l01227"></a>01227 <span class="keywordtype">int</span> N = <a class="code" href="classScalarCompiler.html#ad2a7768ff9ad2157f15a11686fe70366" title="Compute the minimal power of 2 greater than x.">pow2limit</a>(mxd+1); <a name="l01228"></a>01228 <a name="l01229"></a>01229 <span class="comment">// we need a iota index</span> <a name="l01230"></a>01230 <a class="code" href="classScalarCompiler.html#a4a74bd8a23a1ce8bc21d13eeb20ba821" title="Generate code for a unique IOTA variable increased at each sample and used to index...">ensureIotaCode</a>(); <a name="l01231"></a>01231 <a name="l01232"></a>01232 <span class="comment">// declare and init</span> <a name="l01233"></a>01233 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1[$2];"</span>, ctype, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(N))); <a name="l01234"></a>01234 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"for (int i=0; i<$1; i++) $0[i] = 0;"</span>, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(N))); <a name="l01235"></a>01235 <a name="l01236"></a>01236 <span class="comment">// execute</span> <a name="l01237"></a>01237 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[IOTA&$1] = $2;"</span>, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(N-1), exp)); <a name="l01238"></a>01238 } <a name="l01239"></a>01239 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="adec9012e0c7e1c27b0144e53fcdc4734"></a><!-- doxytag: member="ScalarCompiler::generateDelayVec" ref="adec9012e0c7e1c27b0144e53fcdc4734" args="(Tree sig, const string &exp, const string &ctype, const string &vname, int mxd)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateDelayVec </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>exp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>ctype</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>vname</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>mxd</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Generate code for the delay mecchanism. </p> <p>The generated code depend of the maximum delay attached to exp and the "less temporaries" switch </p> <p>Reimplemented in <a class="el" href="classVectorCompiler.html#a905e49bf887c9689e72ab0bb73afbb80">VectorCompiler</a>.</p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l01137">1137</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8cpp_source.html#l01151">generateDelayVecNoTemp()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, and <a class="el" href="sigtype_8hh_source.html#l00055">kSamp</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00313">generateFConst()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00332">generateFVar()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00295">generateNumber()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l01138"></a>01138 { <a name="l01139"></a>01139 <span class="keywordtype">string</span> s = <a class="code" href="classScalarCompiler.html#a98cf35a790700aa70ec4789245359a4b" title="Generate code for the delay mecchanism without using temporary variables.">generateDelayVecNoTemp</a>(sig, exp, ctype, vname, mxd); <a name="l01140"></a>01140 <span class="keywordflow">if</span> (<a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(sig)->variability() < <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a>) { <a name="l01141"></a>01141 <span class="keywordflow">return</span> exp; <a name="l01142"></a>01142 } <span class="keywordflow">else</span> { <a name="l01143"></a>01143 <span class="keywordflow">return</span> s; <a name="l01144"></a>01144 } <a name="l01145"></a>01145 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a98cf35a790700aa70ec4789245359a4b"></a><!-- doxytag: member="ScalarCompiler::generateDelayVecNoTemp" ref="a98cf35a790700aa70ec4789245359a4b" args="(Tree sig, const string &exp, const string &ctype, const string &vname, int mxd)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateDelayVecNoTemp </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>exp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>ctype</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>vname</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>mxd</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Generate code for the delay mecchanism without using temporary variables. </p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l01151">1151</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00158">Klass::addExecCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="klass_8hh_source.html#l00159">Klass::addPostCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01245">ensureIotaCode()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="main_8cpp_source.html#l00124">gMaxCopyDelay</a>, <a class="el" href="compile__scal_8cpp_source.html#l01065">pow2limit()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01041">setVectorNameProperty()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, and <a class="el" href="Text_8cpp_source.html#l00163">T()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l01137">generateDelayVec()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l01152"></a>01152 { <a name="l01153"></a>01153 assert(mxd > 0); <a name="l01154"></a>01154 <a name="l01155"></a>01155 <span class="comment">//bool odocc = fOccMarkup.retrieve(sig)->hasOutDelayOccurences();</span> <a name="l01156"></a>01156 <a name="l01157"></a>01157 <span class="keywordflow">if</span> (mxd < <a class="code" href="doc__compile_8cpp.html#a278e0cda879c0108aff047853ab0214c">gMaxCopyDelay</a>) { <a name="l01158"></a>01158 <a name="l01159"></a>01159 <span class="comment">// short delay : we copy</span> <a name="l01160"></a>01160 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1[$2];"</span>, ctype, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(mxd+1))); <a name="l01161"></a>01161 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"for (int i=0; i<$1; i++) $0[i] = 0;"</span>, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(mxd+1))); <a name="l01162"></a>01162 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[0] = $1;"</span>, vname, exp)); <a name="l01163"></a>01163 <a name="l01164"></a>01164 <span class="comment">// generate post processing copy code to update delay values</span> <a name="l01165"></a>01165 <span class="keywordflow">if</span> (mxd == 1) { <a name="l01166"></a>01166 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a9e4aa8af46e099cdfc0cb2775239620f">addPostCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[1] = $0[0];"</span>, vname)); <a name="l01167"></a>01167 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (mxd == 2) { <a name="l01168"></a>01168 <span class="comment">//fClass->addPostCode(subst("$0[2] = $0[1];", vname));</span> <a name="l01169"></a>01169 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a9e4aa8af46e099cdfc0cb2775239620f">addPostCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[2] = $0[1]; $0[1] = $0[0];"</span>, vname)); <a name="l01170"></a>01170 } <span class="keywordflow">else</span> { <a name="l01171"></a>01171 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a9e4aa8af46e099cdfc0cb2775239620f">addPostCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"for (int i=$0; i>0; i--) $1[i] = $1[i-1];"</span>, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(mxd), vname)); <a name="l01172"></a>01172 } <a name="l01173"></a>01173 <a class="code" href="classScalarCompiler.html#a81c64ccef445fdf557fc7b3ce6a786a7" title="Set the vector name property of a signal, the name of the vector used to store the...">setVectorNameProperty</a>(sig, vname); <a name="l01174"></a>01174 <span class="keywordflow">return</span> <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[0]"</span>, vname); <a name="l01175"></a>01175 <a name="l01176"></a>01176 } <span class="keywordflow">else</span> { <a name="l01177"></a>01177 <a name="l01178"></a>01178 <span class="comment">// generate code for a long delay : we use a ring buffer of size N = 2**x > mxd</span> <a name="l01179"></a>01179 <span class="keywordtype">int</span> N = <a class="code" href="classScalarCompiler.html#ad2a7768ff9ad2157f15a11686fe70366" title="Compute the minimal power of 2 greater than x.">pow2limit</a>(mxd+1); <a name="l01180"></a>01180 <a name="l01181"></a>01181 <span class="comment">// we need a iota index</span> <a name="l01182"></a>01182 <a class="code" href="classScalarCompiler.html#a4a74bd8a23a1ce8bc21d13eeb20ba821" title="Generate code for a unique IOTA variable increased at each sample and used to index...">ensureIotaCode</a>(); <a name="l01183"></a>01183 <a name="l01184"></a>01184 <span class="comment">// declare and init</span> <a name="l01185"></a>01185 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1[$2];"</span>, ctype, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(N))); <a name="l01186"></a>01186 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"for (int i=0; i<$1; i++) $0[i] = 0;"</span>, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(N))); <a name="l01187"></a>01187 <a name="l01188"></a>01188 <span class="comment">// execute</span> <a name="l01189"></a>01189 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[IOTA&$1] = $2;"</span>, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(N-1), exp)); <a name="l01190"></a>01190 <a class="code" href="classScalarCompiler.html#a81c64ccef445fdf557fc7b3ce6a786a7" title="Set the vector name property of a signal, the name of the vector used to store the...">setVectorNameProperty</a>(sig, vname); <a name="l01191"></a>01191 <span class="keywordflow">return</span> <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[IOTA&$1]"</span>, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(N-1)); <a name="l01192"></a>01192 } <a name="l01193"></a>01193 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="abb3f8901987a78d9285d724b3e19f7d3"></a><!-- doxytag: member="ScalarCompiler::generateFConst" ref="abb3f8901987a78d9285d724b3e19f7d3" args="(Tree sig, const string &file, const string &name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateFConst </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>file</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>name</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00313">313</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile_8hh_source.html#l00077">Compiler::addIncludeFile()</a>, <a class="el" href="compile__scal_8hh_source.html#l00047">fOccMarkup</a>, <a class="el" href="compile__scal_8cpp_source.html#l01137">generateDelayVec()</a>, <a class="el" href="occurences_8cpp_source.html#l00054">Occurences::getMaxDelay()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00401">getTypedNames()</a>, and <a class="el" href="occurences_8cpp_source.html#l00081">OccMarkup::retrieve()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00314"></a>00314 { <a name="l00315"></a>00315 <span class="keywordtype">string</span> ctype, vname; <a name="l00316"></a>00316 <a class="code" href="classOccurences.html">Occurences</a>* o = <a class="code" href="classScalarCompiler.html#a01d66ece3660a3151f270d7e7a79cb77">fOccMarkup</a>.<a class="code" href="classOccMarkup.html#ade9cb60264fd5e727cfb69568cb49efa" title="occurences of subtree t within root tree">retrieve</a>(sig); <a name="l00317"></a>00317 <a name="l00318"></a>00318 <a class="code" href="classCompiler.html#a7682294288c38e7d56ef262052213779">addIncludeFile</a>(file); <a name="l00319"></a>00319 <a name="l00320"></a>00320 <span class="keywordflow">if</span> (o-><a class="code" href="classOccurences.html#ae7a8f070a5ad9597882c9e813b801cd7" title="return the maximal delay collected">getMaxDelay</a>()>0) { <a name="l00321"></a>00321 <a class="code" href="classScalarCompiler.html#ac33a3eb7d6bb601ab957871bd860b632">getTypedNames</a>(<a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(sig), <span class="stringliteral">"Vec"</span>, ctype, vname); <a name="l00322"></a>00322 <a class="code" href="classScalarCompiler.html#adec9012e0c7e1c27b0144e53fcdc4734" title="Generate code for the delay mecchanism.">generateDelayVec</a>(sig, exp, ctype, vname, o-><a class="code" href="classOccurences.html#ae7a8f070a5ad9597882c9e813b801cd7" title="return the maximal delay collected">getMaxDelay</a>()); <a name="l00323"></a>00323 } <a name="l00324"></a>00324 <span class="keywordflow">return</span> exp; <a name="l00325"></a>00325 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a92f3d40967413418444d272a271b5d5e"></a><!-- doxytag: member="ScalarCompiler::generateFFun" ref="a92f3d40967413418444d272a271b5d5e" args="(Tree sig, Tree ff, Tree largs)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateFFun </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>ff</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>largs</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00379">379</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile_8hh_source.html#l00077">Compiler::addIncludeFile()</a>, <a class="el" href="compile_8hh_source.html#l00078">Compiler::addLibrary()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="prim2_8cpp_source.html#l00064">ffarity()</a>, <a class="el" href="prim2_8cpp_source.html#l00044">ffincfile()</a>, <a class="el" href="prim2_8cpp_source.html#l00049">fflibfile()</a>, <a class="el" href="prim2_8cpp_source.html#l00059">ffname()</a>, and <a class="el" href="list_8cpp_source.html#l00182">nth()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00380"></a>00380 { <a name="l00381"></a>00381 <a class="code" href="classCompiler.html#a7682294288c38e7d56ef262052213779">addIncludeFile</a>(<a class="code" href="prim2_8cpp.html#a8638f964f03548fff574ed4601d7f4e1">ffincfile</a>(ff)); <span class="comment">//printf("inc file %s\n", ffincfile(ff));</span> <a name="l00382"></a>00382 <a class="code" href="classCompiler.html#a5a2cfd7e795a98e66b31543e2b5225b5">addLibrary</a>(<a class="code" href="prim2_8cpp.html#ab10dc4b4af50f0a082eb629526eb5a09">fflibfile</a>(ff)); <span class="comment">//printf("lib file %s\n", fflibfile(ff));</span> <a name="l00383"></a>00383 <a name="l00384"></a>00384 <span class="keywordtype">string</span> code = <a class="code" href="prim2_8cpp.html#a9293046e818b432cfa8a7d418679eff3">ffname</a>(ff); <a name="l00385"></a>00385 code += <span class="charliteral">'('</span>; <a name="l00386"></a>00386 <span class="keywordtype">string</span> sep = <span class="stringliteral">""</span>; <a name="l00387"></a>00387 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i< <a class="code" href="prim2_8cpp.html#af82147adb6d445cb8f8878f6dcedba64">ffarity</a>(ff); i++) { <a name="l00388"></a>00388 code += sep; <a name="l00389"></a>00389 code += <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(<a class="code" href="list_8cpp.html#a928095576946f64a78ea78fbb65fb8d6">nth</a>(largs, i)); <a name="l00390"></a>00390 sep = <span class="stringliteral">", "</span>; <a name="l00391"></a>00391 } <a name="l00392"></a>00392 code += <span class="charliteral">')'</span>; <a name="l00393"></a>00393 <span class="keywordflow">return</span> code; <a name="l00394"></a>00394 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a114a804894cbeb775c205de2410fb5a9"></a><!-- doxytag: member="ScalarCompiler::generateFixDelay" ref="a114a804894cbeb775c205de2410fb5a9" args="(Tree sig, Tree arg, Tree size)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateFixDelay </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>exp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>delay</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Generate code for accessing a delayed signal. </p> <p>The generated code depend of the maximum delay attached to exp and the gLessTempSwitch. </p> <p>Reimplemented in <a class="el" href="classVectorCompiler.html#a38318c939418370575a9b49707109655">VectorCompiler</a>.</p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l01098">1098</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="compile__scal_8hh_source.html#l00047">fOccMarkup</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="occurences_8cpp_source.html#l00054">Occurences::getMaxDelay()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01055">getVectorNameProperty()</a>, <a class="el" href="main_8cpp_source.html#l00124">gMaxCopyDelay</a>, <a class="el" href="signals_8cpp_source.html#l00041">isSigInt()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01065">pow2limit()</a>, <a class="el" href="occurences_8cpp_source.html#l00081">OccMarkup::retrieve()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, and <a class="el" href="Text_8cpp_source.html#l00163">T()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l01099"></a>01099 { <a name="l01100"></a>01100 <span class="keywordtype">int</span> mxd, d; <a name="l01101"></a>01101 <span class="keywordtype">string</span> vecname; <a name="l01102"></a>01102 <a name="l01103"></a>01103 <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(exp); <span class="comment">// ensure exp is compiled to have a vector name</span> <a name="l01104"></a>01104 <a name="l01105"></a>01105 mxd = <a class="code" href="classScalarCompiler.html#a01d66ece3660a3151f270d7e7a79cb77">fOccMarkup</a>.<a class="code" href="classOccMarkup.html#ade9cb60264fd5e727cfb69568cb49efa" title="occurences of subtree t within root tree">retrieve</a>(exp)-><a class="code" href="classOccurences.html#ae7a8f070a5ad9597882c9e813b801cd7" title="return the maximal delay collected">getMaxDelay</a>(); <a name="l01106"></a>01106 <a name="l01107"></a>01107 <span class="keywordflow">if</span> (! <a class="code" href="classScalarCompiler.html#a12cd9487cf729b06cbece49552bc632e" title="Get the vector name property of a signal, the name of the vector used to store the...">getVectorNameProperty</a>(exp, vecname)) { <a name="l01108"></a>01108 cerr << <span class="stringliteral">"No vector name for : "</span> << <a class="code" href="classppsig.html">ppsig</a>(exp) << endl; <a name="l01109"></a>01109 assert(0); <a name="l01110"></a>01110 } <a name="l01111"></a>01111 <a name="l01112"></a>01112 <span class="keywordflow">if</span> (mxd == 0) { <a name="l01113"></a>01113 <span class="comment">// not a real vector name but a scalar name</span> <a name="l01114"></a>01114 <span class="keywordflow">return</span> vecname; <a name="l01115"></a>01115 <a name="l01116"></a>01116 } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (mxd < <a class="code" href="doc__compile_8cpp.html#a278e0cda879c0108aff047853ab0214c">gMaxCopyDelay</a>) { <a name="l01117"></a>01117 <span class="keywordflow">if</span> (<a class="code" href="signals_8cpp.html#a75cc925deac1e031e75ae72271dd5995">isSigInt</a>(delay, &d)) { <a name="l01118"></a>01118 <span class="keywordflow">return</span> <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[$1]"</span>, vecname, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(delay)); <a name="l01119"></a>01119 } <span class="keywordflow">else</span> { <a name="l01120"></a>01120 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[$1]"</span>, vecname, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(delay))); <a name="l01121"></a>01121 } <a name="l01122"></a>01122 <a name="l01123"></a>01123 } <span class="keywordflow">else</span> { <a name="l01124"></a>01124 <a name="l01125"></a>01125 <span class="comment">// long delay : we use a ring buffer of size 2^x</span> <a name="l01126"></a>01126 <span class="keywordtype">int</span> N = <a class="code" href="classScalarCompiler.html#ad2a7768ff9ad2157f15a11686fe70366" title="Compute the minimal power of 2 greater than x.">pow2limit</a>( mxd+1 ); <a name="l01127"></a>01127 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[(IOTA-$1)&$2]"</span>, vecname, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(delay), <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(N-1))); <a name="l01128"></a>01128 } <a name="l01129"></a>01129 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a1f836f4c9fd1ebade4892a1ce56e2d9d"></a><!-- doxytag: member="ScalarCompiler::generateFloatCast" ref="a1f836f4c9fd1ebade4892a1ce56e2d9d" args="(Tree sig, Tree x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateFloatCast </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>x</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00489">489</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="floats_8cpp_source.html#l00046">ifloat()</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00490"></a>00490 { <a name="l00491"></a>00491 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$1($0)"</span>, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(x), <a class="code" href="floats_8cpp.html#af21a266634ce24abcd265188e774ba4a">ifloat</a>())); <a name="l00492"></a>00492 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a3beb833085a4e20decf3783a78a18b05"></a><!-- doxytag: member="ScalarCompiler::generateFVar" ref="a3beb833085a4e20decf3783a78a18b05" args="(Tree sig, const string &file, const string &name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateFVar </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>file</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>name</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00332">332</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile_8hh_source.html#l00077">Compiler::addIncludeFile()</a>, <a class="el" href="compile__scal_8hh_source.html#l00047">fOccMarkup</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01137">generateDelayVec()</a>, <a class="el" href="occurences_8cpp_source.html#l00054">Occurences::getMaxDelay()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00401">getTypedNames()</a>, and <a class="el" href="occurences_8cpp_source.html#l00081">OccMarkup::retrieve()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00333"></a>00333 { <a name="l00334"></a>00334 <span class="keywordtype">string</span> ctype, vname; <a name="l00335"></a>00335 <a class="code" href="classOccurences.html">Occurences</a>* o = <a class="code" href="classScalarCompiler.html#a01d66ece3660a3151f270d7e7a79cb77">fOccMarkup</a>.<a class="code" href="classOccMarkup.html#ade9cb60264fd5e727cfb69568cb49efa" title="occurences of subtree t within root tree">retrieve</a>(sig); <a name="l00336"></a>00336 <a name="l00337"></a>00337 <a class="code" href="classCompiler.html#a7682294288c38e7d56ef262052213779">addIncludeFile</a>(file); <a name="l00338"></a>00338 <a name="l00339"></a>00339 <span class="keywordflow">if</span> (o-><a class="code" href="classOccurences.html#ae7a8f070a5ad9597882c9e813b801cd7" title="return the maximal delay collected">getMaxDelay</a>()>0) { <a name="l00340"></a>00340 <a class="code" href="classScalarCompiler.html#ac33a3eb7d6bb601ab957871bd860b632">getTypedNames</a>(<a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(sig), <span class="stringliteral">"Vec"</span>, ctype, vname); <a name="l00341"></a>00341 <a class="code" href="classScalarCompiler.html#adec9012e0c7e1c27b0144e53fcdc4734" title="Generate code for the delay mecchanism.">generateDelayVec</a>(sig, exp, ctype, vname, o-><a class="code" href="classOccurences.html#ae7a8f070a5ad9597882c9e813b801cd7" title="return the maximal delay collected">getMaxDelay</a>()); <a name="l00342"></a>00342 } <a name="l00343"></a>00343 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, exp); <a name="l00344"></a>00344 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a88f90a11fc6bb95aff713977fd34166d"></a><!-- doxytag: member="ScalarCompiler::generateHBargraph" ref="a88f90a11fc6bb95aff713977fd34166d" args="(Tree sig, Tree label, Tree min, Tree max, const string &exp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateHBargraph </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>label</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>min</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>max</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>exp</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00572">572</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00158">Klass::addExecCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="compile_8cpp_source.html#l00123">Compiler::addUIWidget()</a>, <a class="el" href="klass_8hh_source.html#l00152">Klass::addZone2()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kBlock</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kKonst</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kSamp</a>, <a class="el" href="list_8cpp_source.html#l00240">reverse()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, <a class="el" href="list_8hh_source.html#l00134">tl()</a>, <a class="el" href="tree_8hh_source.html#l00173">tree()</a>, <a class="el" href="uitree_8cpp_source.html#l00140">uiWidget()</a>, and <a class="el" href="floats_8cpp_source.html#l00049">xfloat()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00573"></a>00573 { <a name="l00574"></a>00574 <span class="keywordtype">string</span> varname = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"fbargraph"</span>); <a name="l00575"></a>00575 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$1 \t$0;"</span>, varname, <a class="code" href="floats_8cpp.html#a2da2ae6649f9479320f115342675b275">xfloat</a>())); <a name="l00576"></a>00576 <a class="code" href="classCompiler.html#a4532f2ccb5ae6b5bcef23029a01a86c2" title="Add a widget with a certain path to the user interface tree.">addUIWidget</a>(<a class="code" href="list_8cpp.html#a8e15f8d6fcc6cd319059c2e0544145bb">reverse</a>(<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(path)), <a class="code" href="uitree_8cpp.html#a57e5e173f6563110a36543ae576322cb">uiWidget</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(path), <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(varname), sig)); <a name="l00577"></a>00577 <a name="l00578"></a>00578 <a class="code" href="classP.html">Type</a> t = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(sig); <a name="l00579"></a>00579 <span class="keywordflow">switch</span> (t->variability()) { <a name="l00580"></a>00580 <a name="l00581"></a>00581 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a> : <a name="l00582"></a>00582 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = $1;"</span>, varname, exp)); <a name="l00583"></a>00583 <span class="keywordflow">break</span>; <a name="l00584"></a>00584 <a name="l00585"></a>00585 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a2efe081feb92c3bc30a7ae2dca084901">kBlock</a> : <a name="l00586"></a>00586 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a28f906237d7648909e66f593ac19ec82">addZone2</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = $1;"</span>, varname, exp)); <a name="l00587"></a>00587 <span class="keywordflow">break</span>; <a name="l00588"></a>00588 <a name="l00589"></a>00589 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a> : <a name="l00590"></a>00590 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = $1;"</span>, varname, exp)); <a name="l00591"></a>00591 <span class="keywordflow">break</span>; <a name="l00592"></a>00592 } <a name="l00593"></a>00593 <a name="l00594"></a>00594 <span class="comment">//return varname;</span> <a name="l00595"></a>00595 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, varname); <a name="l00596"></a>00596 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="aa840902417516d180182273d59a302ef"></a><!-- doxytag: member="ScalarCompiler::generateHSlider" ref="aa840902417516d180182273d59a302ef" args="(Tree sig, Tree label, Tree cur, Tree min, Tree max, Tree step)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateHSlider </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>label</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>cur</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>min</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>max</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>step</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00526">526</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="compile_8cpp_source.html#l00123">Compiler::addUIWidget()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="list_8cpp_source.html#l00240">reverse()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, <a class="el" href="Text_8cpp_source.html#l00163">T()</a>, <a class="el" href="list_8hh_source.html#l00134">tl()</a>, <a class="el" href="tree_8hh_source.html#l00173">tree()</a>, <a class="el" href="tree_8cpp_source.html#l00260">tree2float()</a>, <a class="el" href="uitree_8cpp_source.html#l00140">uiWidget()</a>, and <a class="el" href="floats_8cpp_source.html#l00049">xfloat()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00527"></a>00527 { <a name="l00528"></a>00528 <span class="keywordtype">string</span> varname = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"fslider"</span>); <a name="l00529"></a>00529 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$1 \t$0;"</span>, varname, <a class="code" href="floats_8cpp.html#a2da2ae6649f9479320f115342675b275">xfloat</a>())); <a name="l00530"></a>00530 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = $1;"</span>, varname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(<a class="code" href="tree_8cpp.html#ad01262fc04f661b162d36b786419a849" title="if t has a node of type float, return it otherwise error">tree2float</a>(cur)))); <a name="l00531"></a>00531 <a class="code" href="classCompiler.html#a4532f2ccb5ae6b5bcef23029a01a86c2" title="Add a widget with a certain path to the user interface tree.">addUIWidget</a>(<a class="code" href="list_8cpp.html#a8e15f8d6fcc6cd319059c2e0544145bb">reverse</a>(<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(path)), <a class="code" href="uitree_8cpp.html#a57e5e173f6563110a36543ae576322cb">uiWidget</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(path), <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(varname), sig)); <a name="l00532"></a>00532 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, varname); <a name="l00533"></a>00533 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a6c2bc57c93e7b7aeef5fc6d9e0563161"></a><!-- doxytag: member="ScalarCompiler::generateInput" ref="a6c2bc57c93e7b7aeef5fc6d9e0563161" args="(Tree sig, const string &idx)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateInput </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>idx</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00351">351</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="floats_8cpp_source.html#l00047">icast()</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00352"></a>00352 { <a name="l00353"></a>00353 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$1input$0[i]"</span>, idx, <a class="code" href="floats_8cpp.html#ab43c58d96e339afe4b28a632ba1186b6">icast</a>())); <a name="l00354"></a>00354 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a69b85f3ec1a38ec05bd21d245b98a60f"></a><!-- doxytag: member="ScalarCompiler::generateIntCast" ref="a69b85f3ec1a38ec05bd21d245b98a60f" args="(Tree sig, Tree x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateIntCast </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>x</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00484">484</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00485"></a>00485 { <a name="l00486"></a>00486 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"int($0)"</span>, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(x))); <a name="l00487"></a>00487 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ae3daa4b707e6037295c89d6d2d741fd7"></a><!-- doxytag: member="ScalarCompiler::generateIota" ref="ae3daa4b707e6037295c89d6d2d741fd7" args="(Tree sig, Tree arg)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateIota </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>arg</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00847">847</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00158">Klass::addExecCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00842">isPowerOf2()</a>, <a class="el" href="signals_8cpp_source.html#l00041">isSigInt()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, and <a class="el" href="Text_8cpp_source.html#l00163">T()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00848"></a>00848 { <a name="l00849"></a>00849 <span class="keywordtype">int</span> size; <a name="l00850"></a>00850 <span class="keywordflow">if</span> (!<a class="code" href="signals_8cpp.html#a75cc925deac1e031e75ae72271dd5995">isSigInt</a>(n, &size)) { fprintf(stderr, <span class="stringliteral">"error in generateIota\n"</span>); exit(1); } <a name="l00851"></a>00851 <a name="l00852"></a>00852 <span class="keywordtype">string</span> vperm = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"iota"</span>); <a name="l00853"></a>00853 <a name="l00854"></a>00854 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"int \t$0;"</span>, vperm)); <a name="l00855"></a>00855 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = 0;"</span>, vperm)); <a name="l00856"></a>00856 <a name="l00857"></a>00857 <span class="keywordflow">if</span> (<a class="code" href="compile__scal_8cpp.html#a322b15c6cf72d06559fee6dfb4c0dfae">isPowerOf2</a>(size)) { <a name="l00858"></a>00858 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = ($0+1)&$1;"</span>, vperm, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(size-1))); <a name="l00859"></a>00859 } <span class="keywordflow">else</span> { <a name="l00860"></a>00860 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"if (++$0 == $1) $0=0;"</span>, vperm, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(size))); <a name="l00861"></a>00861 } <a name="l00862"></a>00862 <span class="keywordflow">return</span> vperm; <a name="l00863"></a>00863 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a14b0b24942c22ad01e6429dba926f55d"></a><!-- doxytag: member="ScalarCompiler::generateNumber" ref="a14b0b24942c22ad01e6429dba926f55d" args="(Tree sig, const string &exp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateNumber </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>exp</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00295">295</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8hh_source.html#l00047">fOccMarkup</a>, <a class="el" href="compile__scal_8cpp_source.html#l01137">generateDelayVec()</a>, <a class="el" href="occurences_8cpp_source.html#l00054">Occurences::getMaxDelay()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00401">getTypedNames()</a>, and <a class="el" href="occurences_8cpp_source.html#l00081">OccMarkup::retrieve()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00296"></a>00296 { <a name="l00297"></a>00297 <span class="keywordtype">string</span> ctype, vname; <a name="l00298"></a>00298 <a class="code" href="classOccurences.html">Occurences</a>* o = <a class="code" href="classScalarCompiler.html#a01d66ece3660a3151f270d7e7a79cb77">fOccMarkup</a>.<a class="code" href="classOccMarkup.html#ade9cb60264fd5e727cfb69568cb49efa" title="occurences of subtree t within root tree">retrieve</a>(sig); <a name="l00299"></a>00299 <a name="l00300"></a>00300 <span class="comment">// check for number occuring in delays</span> <a name="l00301"></a>00301 <span class="keywordflow">if</span> (o-><a class="code" href="classOccurences.html#ae7a8f070a5ad9597882c9e813b801cd7" title="return the maximal delay collected">getMaxDelay</a>()>0) { <a name="l00302"></a>00302 <a class="code" href="classScalarCompiler.html#ac33a3eb7d6bb601ab957871bd860b632">getTypedNames</a>(<a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(sig), <span class="stringliteral">"Vec"</span>, ctype, vname); <a name="l00303"></a>00303 <a class="code" href="classScalarCompiler.html#adec9012e0c7e1c27b0144e53fcdc4734" title="Generate code for the delay mecchanism.">generateDelayVec</a>(sig, exp, ctype, vname, o-><a class="code" href="classOccurences.html#ae7a8f070a5ad9597882c9e813b801cd7" title="return the maximal delay collected">getMaxDelay</a>()); <a name="l00304"></a>00304 } <a name="l00305"></a>00305 <span class="keywordflow">return</span> exp; <a name="l00306"></a>00306 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a1db9a71b00c04ac777a7f206c1359cb2"></a><!-- doxytag: member="ScalarCompiler::generateNumEntry" ref="a1db9a71b00c04ac777a7f206c1359cb2" args="(Tree sig, Tree label, Tree cur, Tree min, Tree max, Tree step)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateNumEntry </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>label</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>cur</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>min</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>max</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>step</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00535">535</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="compile_8cpp_source.html#l00123">Compiler::addUIWidget()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="list_8cpp_source.html#l00240">reverse()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, <a class="el" href="Text_8cpp_source.html#l00163">T()</a>, <a class="el" href="list_8hh_source.html#l00134">tl()</a>, <a class="el" href="tree_8hh_source.html#l00173">tree()</a>, <a class="el" href="tree_8cpp_source.html#l00260">tree2float()</a>, <a class="el" href="uitree_8cpp_source.html#l00140">uiWidget()</a>, and <a class="el" href="floats_8cpp_source.html#l00049">xfloat()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00536"></a>00536 { <a name="l00537"></a>00537 <span class="keywordtype">string</span> varname = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"fentry"</span>); <a name="l00538"></a>00538 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$1 \t$0;"</span>, varname, <a class="code" href="floats_8cpp.html#a2da2ae6649f9479320f115342675b275">xfloat</a>())); <a name="l00539"></a>00539 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = $1;"</span>, varname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(<a class="code" href="tree_8cpp.html#ad01262fc04f661b162d36b786419a849" title="if t has a node of type float, return it otherwise error">tree2float</a>(cur)))); <a name="l00540"></a>00540 <a class="code" href="classCompiler.html#a4532f2ccb5ae6b5bcef23029a01a86c2" title="Add a widget with a certain path to the user interface tree.">addUIWidget</a>(<a class="code" href="list_8cpp.html#a8e15f8d6fcc6cd319059c2e0544145bb">reverse</a>(<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(path)), <a class="code" href="uitree_8cpp.html#a57e5e173f6563110a36543ae576322cb">uiWidget</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(path), <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(varname), sig)); <a name="l00541"></a>00541 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, varname); <a name="l00542"></a>00542 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="aa79b3ecf25b9022861bbda454e160a3f"></a><!-- doxytag: member="ScalarCompiler::generateOutput" ref="aa79b3ecf25b9022861bbda454e160a3f" args="(Tree sig, const string &idx, const string &arg1)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateOutput </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>idx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>arg1</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00357">357</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00158">Klass::addExecCode()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, and <a class="el" href="floats_8cpp_source.html#l00050">xcast()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00358"></a>00358 { <a name="l00359"></a>00359 <span class="keywordtype">string</span> dst = <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"output$0[i]"</span>, idx); <a name="l00360"></a>00360 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = $2$1;"</span>, dst, arg, <a class="code" href="floats_8cpp.html#a73d3935ab38244e8006fbaa2b7caf33c">xcast</a>())); <a name="l00361"></a>00361 <span class="keywordflow">return</span> dst; <a name="l00362"></a>00362 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ab42de3c4f62f672808a9db186702fa07"></a><!-- doxytag: member="ScalarCompiler::generatePrefix" ref="ab42de3c4f62f672808a9db186702fa07" args="(Tree sig, Tree x, Tree e)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generatePrefix </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>x</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>e</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00821">821</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00158">Klass::addExecCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="sigtype_8cpp_source.html#l00292">cType()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00822"></a>00822 { <a name="l00823"></a>00823 <a class="code" href="classP.html">Type</a> te = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(sig);<span class="comment">//, tEnv);</span> <a name="l00824"></a>00824 <a name="l00825"></a>00825 <span class="keywordtype">string</span> vperm = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"M"</span>); <a name="l00826"></a>00826 <span class="keywordtype">string</span> vtemp = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"T"</span>); <a name="l00827"></a>00827 <a name="l00828"></a>00828 <span class="keywordtype">string</span> type = <a class="code" href="sigtype_8cpp.html#a1add1ece6baaeac60b4e46978f5955f4">cType</a>(te); <a name="l00829"></a>00829 <a name="l00830"></a>00830 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1;"</span>, type, vperm)); <a name="l00831"></a>00831 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = $1;"</span>, vperm, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(x))); <a name="l00832"></a>00832 <a name="l00833"></a>00833 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 $1 = $2;"</span>, type, vtemp, vperm)); <a name="l00834"></a>00834 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = $1;"</span>, vperm, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(e))); <a name="l00835"></a>00835 <span class="keywordflow">return</span> vtemp; <a name="l00836"></a>00836 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a37ad94c097c4d2343e71f1748129f74d"></a><!-- doxytag: member="ScalarCompiler::generateRDTbl" ref="a37ad94c097c4d2343e71f1748129f74d" args="(Tree sig, Tree tbl, Tree idx)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateRDTbl </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>tbl</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>idx</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00735">735</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00674">generateStaticTable()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00180">getCompiledExpression()</a>, <a class="el" href="signals_8cpp_source.html#l00085">isSigTable()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00191">setCompiledExpression()</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00736"></a>00736 { <a name="l00737"></a>00737 <span class="comment">// YO le 21/04/05 : La lecture des tables n'�ait pas mise dans le cache</span> <a name="l00738"></a>00738 <span class="comment">// et donc le code �ait dupliqu�(dans tester.dsp par exemple)</span> <a name="l00739"></a>00739 <span class="comment">//return subst("$0[$1]", CS(tEnv, tbl), CS(tEnv, idx));</span> <a name="l00740"></a>00740 <a name="l00741"></a>00741 <span class="comment">//cerr << "generateRDTable " << *sig << endl;</span> <a name="l00742"></a>00742 <span class="comment">// test the special case of a read only table that can be compiled</span> <a name="l00743"></a>00743 <span class="comment">// has a static member</span> <a name="l00744"></a>00744 <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a> id, size, content; <a name="l00745"></a>00745 <span class="keywordflow">if</span>( <a class="code" href="signals_8cpp.html#aa9b2ad7a65566fbc382d60e315b42740">isSigTable</a>(tbl, <span class="keywordtype">id</span>, size, content) ) { <a name="l00746"></a>00746 <span class="keywordtype">string</span> tblname; <a name="l00747"></a>00747 <span class="keywordflow">if</span> (!<a class="code" href="classScalarCompiler.html#ab9526b36f9f5c40e5780c6015312eed4" title="Test if a signal is already compiled.">getCompiledExpression</a>(tbl, tblname)) { <a name="l00748"></a>00748 tblname = <a class="code" href="classScalarCompiler.html#a47e098af6e5857d4577371e459cd6df4" title="Set the string of a compiled expression is already compiled.">setCompiledExpression</a>(tbl, <a class="code" href="classScalarCompiler.html#ad21be208043a8c934441c78fd2e19a48">generateStaticTable</a>(tbl, size, content)); <a name="l00749"></a>00749 } <a name="l00750"></a>00750 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[$1]"</span>, tblname, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(idx))); <a name="l00751"></a>00751 } <span class="keywordflow">else</span> { <a name="l00752"></a>00752 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[$1]"</span>, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(tbl), <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(idx))); <a name="l00753"></a>00753 } <a name="l00754"></a>00754 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a635ee95d9c94ec8fed0e2587fbb95eba"></a><!-- doxytag: member="ScalarCompiler::generateRec" ref="a635ee95d9c94ec8fed0e2587fbb95eba" args="(Tree sig, Tree var, Tree le)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ScalarCompiler::generateRec </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>var</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>le</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Generate code for a group of mutually recursive definitions. </p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00783">783</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="compile__scal_8hh_source.html#l00047">fOccMarkup</a>, <a class="el" href="compile__scal_8cpp_source.html#l01199">generateDelayLine()</a>, <a class="el" href="occurences_8cpp_source.html#l00054">Occurences::getMaxDelay()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00401">getTypedNames()</a>, <a class="el" href="list_8cpp_source.html#l00198">len()</a>, <a class="el" href="list_8cpp_source.html#l00182">nth()</a>, <a class="el" href="occurences_8cpp_source.html#l00081">OccMarkup::retrieve()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01041">setVectorNameProperty()</a>, and <a class="el" href="signals_8cpp_source.html#l00150">sigProj()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00766">generateRecProj()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00784"></a>00784 { <a name="l00785"></a>00785 <span class="keywordtype">int</span> N = <a class="code" href="list_8cpp.html#a0b58ea1a5d8649e8afb0f70c48776347">len</a>(le); <a name="l00786"></a>00786 <a name="l00787"></a>00787 vector<bool> used(N); <a name="l00788"></a>00788 vector<int> delay(N); <a name="l00789"></a>00789 vector<string> vname(N); <a name="l00790"></a>00790 vector<string> ctype(N); <a name="l00791"></a>00791 <a name="l00792"></a>00792 <span class="comment">// prepare each element of a recursive definition</span> <a name="l00793"></a>00793 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<N; i++) { <a name="l00794"></a>00794 <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a> e = <a class="code" href="signals_8cpp.html#a179e69f65c0cd6f6b9e855cbd9ae5e08">sigProj</a>(i,sig); <span class="comment">// recreate each recursive definition</span> <a name="l00795"></a>00795 <span class="keywordflow">if</span> (<a class="code" href="classScalarCompiler.html#a01d66ece3660a3151f270d7e7a79cb77">fOccMarkup</a>.<a class="code" href="classOccMarkup.html#ade9cb60264fd5e727cfb69568cb49efa" title="occurences of subtree t within root tree">retrieve</a>(e)) { <a name="l00796"></a>00796 <span class="comment">// this projection is used</span> <a name="l00797"></a>00797 used[i] = <span class="keyword">true</span>; <a name="l00798"></a>00798 <a class="code" href="classScalarCompiler.html#ac33a3eb7d6bb601ab957871bd860b632">getTypedNames</a>(<a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(e), <span class="stringliteral">"Rec"</span>, ctype[i], vname[i]); <a name="l00799"></a>00799 <a class="code" href="classScalarCompiler.html#a81c64ccef445fdf557fc7b3ce6a786a7" title="Set the vector name property of a signal, the name of the vector used to store the...">setVectorNameProperty</a>(e, vname[i]); <a name="l00800"></a>00800 delay[i] = <a class="code" href="classScalarCompiler.html#a01d66ece3660a3151f270d7e7a79cb77">fOccMarkup</a>.<a class="code" href="classOccMarkup.html#ade9cb60264fd5e727cfb69568cb49efa" title="occurences of subtree t within root tree">retrieve</a>(e)-><a class="code" href="classOccurences.html#ae7a8f070a5ad9597882c9e813b801cd7" title="return the maximal delay collected">getMaxDelay</a>(); <a name="l00801"></a>00801 } <span class="keywordflow">else</span> { <a name="l00802"></a>00802 <span class="comment">// this projection is not used therefore</span> <a name="l00803"></a>00803 <span class="comment">// we should not generte code for it</span> <a name="l00804"></a>00804 used[i] = <span class="keyword">false</span>; <a name="l00805"></a>00805 } <a name="l00806"></a>00806 } <a name="l00807"></a>00807 <a name="l00808"></a>00808 <span class="comment">// generate delayline for each element of a recursive definition</span> <a name="l00809"></a>00809 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<N; i++) { <a name="l00810"></a>00810 <span class="keywordflow">if</span> (used[i]) { <a name="l00811"></a>00811 <a class="code" href="classScalarCompiler.html#a0fee342e1ab991f0f75169290afe36cd" title="Generate code for the delay mecchanism without using temporary variables.">generateDelayLine</a>(ctype[i], vname[i], delay[i], <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(<a class="code" href="list_8cpp.html#a928095576946f64a78ea78fbb65fb8d6">nth</a>(le,i))); <a name="l00812"></a>00812 } <a name="l00813"></a>00813 } <a name="l00814"></a>00814 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ac6ac92b3f9b29101dc0e09ca7d9f01e3"></a><!-- doxytag: member="ScalarCompiler::generateRecProj" ref="ac6ac92b3f9b29101dc0e09ca7d9f01e3" args="(Tree sig, Tree exp, int i)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateRecProj </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>exp</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>i</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Generate code for a projection of a group of mutually recursive definitions. </p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00766">766</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8cpp_source.html#l00783">generateRec()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01055">getVectorNameProperty()</a>, <a class="el" href="recursive-tree_8cpp_source.html#l00059">isRec()</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00767"></a>00767 { <a name="l00768"></a>00768 <span class="keywordtype">string</span> vname; <a name="l00769"></a>00769 <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a> var, le; <a name="l00770"></a>00770 <a name="l00771"></a>00771 <span class="keywordflow">if</span> ( ! <a class="code" href="classScalarCompiler.html#a12cd9487cf729b06cbece49552bc632e" title="Get the vector name property of a signal, the name of the vector used to store the...">getVectorNameProperty</a>(sig, vname)) { <a name="l00772"></a>00772 assert(<a class="code" href="recursive-tree_8cpp.html#a4cb44c6e41e21da830e748dc35f16ba5" title="is t a de Bruijn recursive tree">isRec</a>(r, var, le)); <a name="l00773"></a>00773 <a class="code" href="classScalarCompiler.html#a635ee95d9c94ec8fed0e2587fbb95eba" title="Generate code for a group of mutually recursive definitions.">generateRec</a>(r, var, le); <a name="l00774"></a>00774 assert(<a class="code" href="classScalarCompiler.html#a12cd9487cf729b06cbece49552bc632e" title="Get the vector name property of a signal, the name of the vector used to store the...">getVectorNameProperty</a>(sig, vname)); <a name="l00775"></a>00775 } <a name="l00776"></a>00776 <span class="keywordflow">return</span> <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[0]"</span>, vname); <a name="l00777"></a>00777 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a2e070a0f894bf348049b111b094f8a3e"></a><!-- doxytag: member="ScalarCompiler::generateSelect2" ref="a2e070a0f894bf348049b111b094f8a3e" args="(Tree sig, Tree sel, Tree s1, Tree s2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateSelect2 </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sel</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>s1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>s2</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Generate a select2 code. </p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00874">874</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00158">Klass::addExecCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="klass_8hh_source.html#l00148">Klass::addSharedDecl()</a>, <a class="el" href="klass_8hh_source.html#l00151">Klass::addZone1()</a>, <a class="el" href="klass_8hh_source.html#l00153">Klass::addZone2b()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="sigtype_8cpp_source.html#l00292">cType()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kBlock</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kKonst</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kSamp</a>, <a class="el" href="interval_8hh_source.html#l00059">min()</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00875"></a>00875 { <a name="l00876"></a>00876 <a class="code" href="classP.html">Type</a> t = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(sig); <a name="l00877"></a>00877 <a class="code" href="classP.html">Type</a> t1 = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(s1); <a name="l00878"></a>00878 <a class="code" href="classP.html">Type</a> t2 = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(s2); <a name="l00879"></a>00879 <a class="code" href="classP.html">Type</a> w = <a class="code" href="interval_8hh.html#a2f8edc4561e9744ed4233b205fa7ec32">min</a>(t1,t2); <a name="l00880"></a>00880 <a name="l00881"></a>00881 <span class="keywordtype">string</span> type = <a class="code" href="sigtype_8cpp.html#a1add1ece6baaeac60b4e46978f5955f4">cType</a>(t); <a name="l00882"></a>00882 <span class="keywordtype">string</span> var = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"S"</span>); <a name="l00883"></a>00883 <a name="l00884"></a>00884 <span class="keywordflow">switch</span> (w->variability()) <a name="l00885"></a>00885 { <a name="l00886"></a>00886 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a> : <a name="l00887"></a>00887 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1[2];"</span>, type, var)); <a name="l00888"></a>00888 <span class="keywordflow">break</span>; <a name="l00889"></a>00889 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a2efe081feb92c3bc30a7ae2dca084901">kBlock</a> : <a name="l00890"></a>00890 <span class="comment">//fClass->addLocalDecl(type, subst("$0[2]", var));</span> <a name="l00891"></a>00891 <span class="comment">//fClass->addLocalVecDecl(type, var, 2);</span> <a name="l00892"></a>00892 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a9cbf32b697f222569fa953a740c0eb4c">addSharedDecl</a>(var); <a name="l00893"></a>00893 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0e346099132df472ff00fc44c4a02a9a">addZone1</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1[2];"</span>, type, var)); <a name="l00894"></a>00894 <span class="keywordflow">break</span>; <a name="l00895"></a>00895 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a> : <a name="l00896"></a>00896 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1[2];"</span>, type, var)); <a name="l00897"></a>00897 <span class="keywordflow">break</span>; <a name="l00898"></a>00898 } <a name="l00899"></a>00899 <a name="l00900"></a>00900 <span class="keywordflow">switch</span> (t1->variability()) <a name="l00901"></a>00901 { <a name="l00902"></a>00902 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a> : <a name="l00903"></a>00903 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[0] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s1))); <a name="l00904"></a>00904 <span class="keywordflow">break</span>; <a name="l00905"></a>00905 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a2efe081feb92c3bc30a7ae2dca084901">kBlock</a> : <a name="l00906"></a>00906 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a48854a29efb08fa5f9eb0e1a23874ee5">addZone2b</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[0] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s1))); <a name="l00907"></a>00907 <span class="keywordflow">break</span>; <a name="l00908"></a>00908 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a> : <a name="l00909"></a>00909 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[0] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s1))); <a name="l00910"></a>00910 <span class="keywordflow">break</span>; <a name="l00911"></a>00911 } <a name="l00912"></a>00912 <a name="l00913"></a>00913 <span class="keywordflow">switch</span> (t2->variability()) <a name="l00914"></a>00914 { <a name="l00915"></a>00915 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a> : <a name="l00916"></a>00916 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[1] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s2))); <a name="l00917"></a>00917 <span class="keywordflow">break</span>; <a name="l00918"></a>00918 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a2efe081feb92c3bc30a7ae2dca084901">kBlock</a> : <a name="l00919"></a>00919 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a48854a29efb08fa5f9eb0e1a23874ee5">addZone2b</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[1] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s2))); <a name="l00920"></a>00920 <span class="keywordflow">break</span>; <a name="l00921"></a>00921 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a> : <a name="l00922"></a>00922 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[1] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s2))); <a name="l00923"></a>00923 <span class="keywordflow">break</span>; <a name="l00924"></a>00924 } <a name="l00925"></a>00925 <a name="l00926"></a>00926 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[$1]"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(sel))); <a name="l00927"></a>00927 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a0651bbed181dd7f68c53ef94f2bafd1f"></a><!-- doxytag: member="ScalarCompiler::generateSelect3" ref="a0651bbed181dd7f68c53ef94f2bafd1f" args="(Tree sig, Tree sel, Tree s1, Tree s2, Tree s3)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateSelect3 </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sel</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>s1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>s2</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>s3</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Generate a select3 code. </p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00933">933</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00158">Klass::addExecCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="klass_8hh_source.html#l00148">Klass::addSharedDecl()</a>, <a class="el" href="klass_8hh_source.html#l00151">Klass::addZone1()</a>, <a class="el" href="klass_8hh_source.html#l00153">Klass::addZone2b()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="sigtype_8cpp_source.html#l00292">cType()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kBlock</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kKonst</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kSamp</a>, <a class="el" href="interval_8hh_source.html#l00059">min()</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00934"></a>00934 { <a name="l00935"></a>00935 <a class="code" href="classP.html">Type</a> t = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(sig); <a name="l00936"></a>00936 <a class="code" href="classP.html">Type</a> t1 = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(s1); <a name="l00937"></a>00937 <a class="code" href="classP.html">Type</a> t2 = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(s2); <a name="l00938"></a>00938 <a class="code" href="classP.html">Type</a> t3 = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(s3); <a name="l00939"></a>00939 <a class="code" href="classP.html">Type</a> w = <a class="code" href="interval_8hh.html#a2f8edc4561e9744ed4233b205fa7ec32">min</a>(t1,<a class="code" href="interval_8hh.html#a2f8edc4561e9744ed4233b205fa7ec32">min</a>(t2,t3)); <a name="l00940"></a>00940 <a name="l00941"></a>00941 <span class="keywordtype">string</span> type = <a class="code" href="sigtype_8cpp.html#a1add1ece6baaeac60b4e46978f5955f4">cType</a>(t); <a name="l00942"></a>00942 <span class="keywordtype">string</span> var = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"S"</span>); <a name="l00943"></a>00943 <a name="l00944"></a>00944 <span class="keywordflow">switch</span> (w->variability()) <a name="l00945"></a>00945 { <a name="l00946"></a>00946 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a> : <a name="l00947"></a>00947 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1[3];"</span>, type, var)); <a name="l00948"></a>00948 <span class="keywordflow">break</span>; <a name="l00949"></a>00949 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a2efe081feb92c3bc30a7ae2dca084901">kBlock</a> : <a name="l00950"></a>00950 <span class="comment">//fClass->addLocalDecl(type, subst("$0[3]", var));</span> <a name="l00951"></a>00951 <span class="comment">//fClass->addLocalVecDecl(type, var, 3);</span> <a name="l00952"></a>00952 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a9cbf32b697f222569fa953a740c0eb4c">addSharedDecl</a>(var); <a name="l00953"></a>00953 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0e346099132df472ff00fc44c4a02a9a">addZone1</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1[3];"</span>, type, var)); <a name="l00954"></a>00954 <span class="keywordflow">break</span>; <a name="l00955"></a>00955 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a> : <a name="l00956"></a>00956 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1[3];"</span>, type, var)); <a name="l00957"></a>00957 <span class="keywordflow">break</span>; <a name="l00958"></a>00958 } <a name="l00959"></a>00959 <a name="l00960"></a>00960 <span class="keywordflow">switch</span> (t1->variability()) <a name="l00961"></a>00961 { <a name="l00962"></a>00962 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a> : <a name="l00963"></a>00963 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[0] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s1))); <a name="l00964"></a>00964 <span class="keywordflow">break</span>; <a name="l00965"></a>00965 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a2efe081feb92c3bc30a7ae2dca084901">kBlock</a> : <a name="l00966"></a>00966 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a48854a29efb08fa5f9eb0e1a23874ee5">addZone2b</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[0] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s1))); <a name="l00967"></a>00967 <span class="keywordflow">break</span>; <a name="l00968"></a>00968 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a> : <a name="l00969"></a>00969 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[0] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s1))); <a name="l00970"></a>00970 <span class="keywordflow">break</span>; <a name="l00971"></a>00971 } <a name="l00972"></a>00972 <a name="l00973"></a>00973 <span class="keywordflow">switch</span> (t2->variability()) <a name="l00974"></a>00974 { <a name="l00975"></a>00975 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a> : <a name="l00976"></a>00976 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[1] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s2))); <a name="l00977"></a>00977 <span class="keywordflow">break</span>; <a name="l00978"></a>00978 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a2efe081feb92c3bc30a7ae2dca084901">kBlock</a> : <a name="l00979"></a>00979 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a48854a29efb08fa5f9eb0e1a23874ee5">addZone2b</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[1] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s2))); <a name="l00980"></a>00980 <span class="keywordflow">break</span>; <a name="l00981"></a>00981 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a> : <a name="l00982"></a>00982 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[1] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s2))); <a name="l00983"></a>00983 <span class="keywordflow">break</span>; <a name="l00984"></a>00984 } <a name="l00985"></a>00985 <a name="l00986"></a>00986 <span class="keywordflow">switch</span> (t3->variability()) <a name="l00987"></a>00987 { <a name="l00988"></a>00988 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a> : <a name="l00989"></a>00989 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[2] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s3))); <a name="l00990"></a>00990 <span class="keywordflow">break</span>; <a name="l00991"></a>00991 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a2efe081feb92c3bc30a7ae2dca084901">kBlock</a> : <a name="l00992"></a>00992 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a48854a29efb08fa5f9eb0e1a23874ee5">addZone2b</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[2] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s3))); <a name="l00993"></a>00993 <span class="keywordflow">break</span>; <a name="l00994"></a>00994 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a> : <a name="l00995"></a>00995 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[2] = $1;"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(s3))); <a name="l00996"></a>00996 <span class="keywordflow">break</span>; <a name="l00997"></a>00997 } <a name="l00998"></a>00998 <a name="l00999"></a>00999 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[$1]"</span>, var, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(sel))); <a name="l01000"></a>01000 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a1caabad696e1b182349065cb9805d768"></a><!-- doxytag: member="ScalarCompiler::generateSigGen" ref="a1caabad696e1b182349065cb9805d768" args="(Tree sig, Tree content)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateSigGen </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>content</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00611">611</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="klass_8hh_source.html#l00130">Klass::addSubKlass()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00056">signal2klass()</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00612"></a>00612 { <a name="l00613"></a>00613 <span class="keywordtype">string</span> klassname = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"SIG"</span>); <a name="l00614"></a>00614 <span class="keywordtype">string</span> signame = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"sig"</span>); <a name="l00615"></a>00615 <a name="l00616"></a>00616 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#ab632bfedd9b79c0490408512c52e50af">addSubKlass</a>(<a class="code" href="compile__scal_8cpp.html#aad565b4516266c0d4e01ee7f2233fad3">signal2klass</a>(klassname, content)); <a name="l00617"></a>00617 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 $1;"</span>, klassname, signame)); <a name="l00618"></a>00618 <a name="l00619"></a>00619 <span class="keywordflow">return</span> signame; <a name="l00620"></a>00620 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a7d79795953aa1a6de561b8ebd6d2db9b"></a><!-- doxytag: member="ScalarCompiler::generateStaticSigGen" ref="a7d79795953aa1a6de561b8ebd6d2db9b" args="(Tree sig, Tree content)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateStaticSigGen </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>content</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00622">622</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00136">Klass::addStaticInitCode()</a>, <a class="el" href="klass_8hh_source.html#l00130">Klass::addSubKlass()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00056">signal2klass()</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00674">generateStaticTable()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00623"></a>00623 { <a name="l00624"></a>00624 <span class="keywordtype">string</span> klassname = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"SIG"</span>); <a name="l00625"></a>00625 <span class="keywordtype">string</span> signame = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"sig"</span>); <a name="l00626"></a>00626 <a name="l00627"></a>00627 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#ab632bfedd9b79c0490408512c52e50af">addSubKlass</a>(<a class="code" href="compile__scal_8cpp.html#aad565b4516266c0d4e01ee7f2233fad3">signal2klass</a>(klassname, content)); <a name="l00628"></a>00628 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a3f9c554b7e80e81b97d50ff772a089b5">addStaticInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 $1;"</span>, klassname, signame)); <a name="l00629"></a>00629 <a name="l00630"></a>00630 <span class="keywordflow">return</span> signame; <a name="l00631"></a>00631 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ad21be208043a8c934441c78fd2e19a48"></a><!-- doxytag: member="ScalarCompiler::generateStaticTable" ref="ad21be208043a8c934441c78fd2e19a48" args="(Tree sig, Tree tsize, Tree content)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateStaticTable </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>tsize</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>content</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00674">674</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00138">Klass::addStaticFields()</a>, <a class="el" href="klass_8hh_source.html#l00136">Klass::addStaticInitCode()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00622">generateStaticSigGen()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00180">getCompiledExpression()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="floats_8cpp_source.html#l00046">ifloat()</a>, <a class="el" href="signals_8cpp_source.html#l00091">isSigGen()</a>, <a class="el" href="signals_8cpp_source.html#l00041">isSigInt()</a>, <a class="el" href="sigtype_8hh_source.html#l00053">kInt</a>, <a class="el" href="compile__scal_8cpp_source.html#l00191">setCompiledExpression()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, and <a class="el" href="Text_8cpp_source.html#l00163">T()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00735">generateRDTbl()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00675"></a>00675 { <a name="l00676"></a>00676 <span class="comment">//string generator(CS(content));</span> <a name="l00677"></a>00677 <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a> g; <a name="l00678"></a>00678 <span class="keywordtype">string</span> cexp; <a name="l00679"></a>00679 <span class="keywordtype">string</span> ctype, vname; <a name="l00680"></a>00680 <span class="keywordtype">int</span> size; <a name="l00681"></a>00681 <a name="l00682"></a>00682 assert ( <a class="code" href="signals_8cpp.html#a771720237ca174a55a6823cc6623d602">isSigGen</a>(content, g) ); <a name="l00683"></a>00683 <span class="keywordflow">if</span> (!<a class="code" href="classScalarCompiler.html#ab9526b36f9f5c40e5780c6015312eed4" title="Test if a signal is already compiled.">getCompiledExpression</a>(content, cexp)) { <a name="l00684"></a>00684 cexp = <a class="code" href="classScalarCompiler.html#a47e098af6e5857d4577371e459cd6df4" title="Set the string of a compiled expression is already compiled.">setCompiledExpression</a>(content, <a class="code" href="classScalarCompiler.html#a7d79795953aa1a6de561b8ebd6d2db9b">generateStaticSigGen</a>(content, g)); <a name="l00685"></a>00685 } <a name="l00686"></a>00686 <a name="l00687"></a>00687 <span class="keywordflow">if</span> (!<a class="code" href="signals_8cpp.html#a75cc925deac1e031e75ae72271dd5995">isSigInt</a>(tsize, &size)) { <a name="l00688"></a>00688 <span class="comment">//fprintf(stderr, "error in ScalarCompiler::generateTable()\n"); exit(1);</span> <a name="l00689"></a>00689 cerr << <span class="stringliteral">"error in ScalarCompiler::generateTable() : "</span> <a name="l00690"></a>00690 << *tsize <a name="l00691"></a>00691 << <span class="stringliteral">" is not an integer expression "</span> <a name="l00692"></a>00692 << endl; <a name="l00693"></a>00693 } <a name="l00694"></a>00694 <span class="comment">// definition du nom et du type de la table</span> <a name="l00695"></a>00695 <span class="comment">// A REVOIR !!!!!!!!!</span> <a name="l00696"></a>00696 <a class="code" href="classP.html">Type</a> t = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(content);<span class="comment">//, tEnv);</span> <a name="l00697"></a>00697 <span class="keywordflow">if</span> (t->nature() == <a class="code" href="sigtype_8hh.html#adc29c2ff13d900c2f185ee95427fb06ca9bb31be73c01d40428195449f62588ac">kInt</a>) { <a name="l00698"></a>00698 vname = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"itbl"</span>); <a name="l00699"></a>00699 ctype = <span class="stringliteral">"int"</span>; <a name="l00700"></a>00700 } <span class="keywordflow">else</span> { <a name="l00701"></a>00701 vname = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"ftbl"</span>); <a name="l00702"></a>00702 ctype = <a class="code" href="floats_8cpp.html#af21a266634ce24abcd265188e774ba4a">ifloat</a>(); <a name="l00703"></a>00703 } <a name="l00704"></a>00704 <a name="l00705"></a>00705 <span class="comment">// declaration de la table</span> <a name="l00706"></a>00706 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"static $0 \t$1[$2];"</span>, ctype, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(size))); <a name="l00707"></a>00707 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a163f2e67d1f8b7a6e5cb93ae5f14611b">addStaticFields</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \tmydsp::$1[$2];"</span>, ctype, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(size))); <a name="l00708"></a>00708 <a name="l00709"></a>00709 <span class="comment">// initialisation du generateur de contenu</span> <a name="l00710"></a>00710 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a3f9c554b7e80e81b97d50ff772a089b5">addStaticInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0.init(samplingFreq);"</span>, cexp)); <a name="l00711"></a>00711 <span class="comment">// remplissage de la table</span> <a name="l00712"></a>00712 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a3f9c554b7e80e81b97d50ff772a089b5">addStaticInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0.fill($1,$2);"</span>, cexp, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(size), vname)); <a name="l00713"></a>00713 <a name="l00714"></a>00714 <span class="comment">// on retourne le nom de la table</span> <a name="l00715"></a>00715 <span class="keywordflow">return</span> vname; <a name="l00716"></a>00716 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a2c51c50e63758ec32c7c205ff4123446"></a><!-- doxytag: member="ScalarCompiler::generateTable" ref="a2c51c50e63758ec32c7c205ff4123446" args="(Tree sig, Tree tsize, Tree content)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateTable </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>tsize</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>content</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00638">638</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="floats_8cpp_source.html#l00046">ifloat()</a>, <a class="el" href="signals_8cpp_source.html#l00041">isSigInt()</a>, <a class="el" href="sigtype_8hh_source.html#l00053">kInt</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, and <a class="el" href="Text_8cpp_source.html#l00163">T()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00639"></a>00639 { <a name="l00640"></a>00640 <span class="keywordtype">string</span> generator(<a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(content)); <a name="l00641"></a>00641 <span class="keywordtype">string</span> ctype, vname; <a name="l00642"></a>00642 <span class="keywordtype">int</span> size; <a name="l00643"></a>00643 <a name="l00644"></a>00644 <span class="keywordflow">if</span> (!<a class="code" href="signals_8cpp.html#a75cc925deac1e031e75ae72271dd5995">isSigInt</a>(tsize, &size)) { <a name="l00645"></a>00645 <span class="comment">//fprintf(stderr, "error in ScalarCompiler::generateTable()\n"); exit(1);</span> <a name="l00646"></a>00646 cerr << <span class="stringliteral">"error in ScalarCompiler::generateTable() : "</span> <a name="l00647"></a>00647 << *tsize <a name="l00648"></a>00648 << <span class="stringliteral">" is not an integer expression "</span> <a name="l00649"></a>00649 << endl; <a name="l00650"></a>00650 } <a name="l00651"></a>00651 <span class="comment">// definition du nom et du type de la table</span> <a name="l00652"></a>00652 <span class="comment">// A REVOIR !!!!!!!!!</span> <a name="l00653"></a>00653 <a class="code" href="classP.html">Type</a> t = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(content);<span class="comment">//, tEnv);</span> <a name="l00654"></a>00654 <span class="keywordflow">if</span> (t->nature() == <a class="code" href="sigtype_8hh.html#adc29c2ff13d900c2f185ee95427fb06ca9bb31be73c01d40428195449f62588ac">kInt</a>) { <a name="l00655"></a>00655 vname = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"itbl"</span>); <a name="l00656"></a>00656 ctype = <span class="stringliteral">"int"</span>; <a name="l00657"></a>00657 } <span class="keywordflow">else</span> { <a name="l00658"></a>00658 vname = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"ftbl"</span>); <a name="l00659"></a>00659 ctype = <a class="code" href="floats_8cpp.html#af21a266634ce24abcd265188e774ba4a">ifloat</a>(); <a name="l00660"></a>00660 } <a name="l00661"></a>00661 <a name="l00662"></a>00662 <span class="comment">// declaration de la table</span> <a name="l00663"></a>00663 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1[$2];"</span>, ctype, vname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(size))); <a name="l00664"></a>00664 <a name="l00665"></a>00665 <span class="comment">// initialisation du generateur de contenu</span> <a name="l00666"></a>00666 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0.init(samplingFreq);"</span>, generator)); <a name="l00667"></a>00667 <span class="comment">// remplissage de la table</span> <a name="l00668"></a>00668 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0.fill($1,$2);"</span>, generator, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(size), vname)); <a name="l00669"></a>00669 <a name="l00670"></a>00670 <span class="comment">// on retourne le nom de la table</span> <a name="l00671"></a>00671 <span class="keywordflow">return</span> vname; <a name="l00672"></a>00672 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a6774794b9cc217001586c0eb7b4ebb80"></a><!-- doxytag: member="ScalarCompiler::generateVariableStore" ref="a6774794b9cc217001586c0eb7b4ebb80" args="(Tree sig, const string &exp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateVariableStore </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>exp</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Reimplemented in <a class="el" href="classVectorCompiler.html#a37bb71786922656262d3452a85e12c9d">VectorCompiler</a>.</p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00448">448</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00158">Klass::addExecCode()</a>, <a class="el" href="klass_8hh_source.html#l00149">Klass::addFirstPrivateDecl()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="klass_8hh_source.html#l00152">Klass::addZone2()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00401">getTypedNames()</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kBlock</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kKonst</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kSamp</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00449"></a>00449 { <a name="l00450"></a>00450 <span class="keywordtype">string</span> vname, ctype; <a name="l00451"></a>00451 <a class="code" href="classP.html">Type</a> t = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(sig); <a name="l00452"></a>00452 <a name="l00453"></a>00453 <span class="keywordflow">switch</span> (t->variability()) { <a name="l00454"></a>00454 <a name="l00455"></a>00455 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a> : <a name="l00456"></a>00456 <a name="l00457"></a>00457 <a class="code" href="classScalarCompiler.html#ac33a3eb7d6bb601ab957871bd860b632">getTypedNames</a>(t, <span class="stringliteral">"Const"</span>, ctype, vname); <a name="l00458"></a>00458 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1;"</span>, ctype, vname)); <a name="l00459"></a>00459 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = $1;"</span>, vname, exp)); <a name="l00460"></a>00460 <span class="keywordflow">break</span>; <a name="l00461"></a>00461 <a name="l00462"></a>00462 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a2efe081feb92c3bc30a7ae2dca084901">kBlock</a> : <a name="l00463"></a>00463 <a name="l00464"></a>00464 <a class="code" href="classScalarCompiler.html#ac33a3eb7d6bb601ab957871bd860b632">getTypedNames</a>(t, <span class="stringliteral">"Slow"</span>, ctype, vname); <a name="l00465"></a>00465 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a85cbd66d7268d87442a19b4371a15272">addFirstPrivateDecl</a>(vname); <a name="l00466"></a>00466 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a28f906237d7648909e66f593ac19ec82">addZone2</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 \t$1 = $2;"</span>, ctype, vname, exp)); <a name="l00467"></a>00467 <span class="keywordflow">break</span>; <a name="l00468"></a>00468 <a name="l00469"></a>00469 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a> : <a name="l00470"></a>00470 <a name="l00471"></a>00471 <a class="code" href="classScalarCompiler.html#ac33a3eb7d6bb601ab957871bd860b632">getTypedNames</a>(t, <span class="stringliteral">"Temp"</span>, ctype, vname); <a name="l00472"></a>00472 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 $1 = $2;"</span>, ctype, vname, exp)); <a name="l00473"></a>00473 <span class="keywordflow">break</span>; <a name="l00474"></a>00474 } <a name="l00475"></a>00475 <span class="keywordflow">return</span> vname; <a name="l00476"></a>00476 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="add2b616f1aa52f7c3e5fea14b84a341e"></a><!-- doxytag: member="ScalarCompiler::generateVBargraph" ref="add2b616f1aa52f7c3e5fea14b84a341e" args="(Tree sig, Tree label, Tree min, Tree max, const string &exp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateVBargraph </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>label</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>min</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>max</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>exp</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00545">545</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00158">Klass::addExecCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="compile_8cpp_source.html#l00123">Compiler::addUIWidget()</a>, <a class="el" href="klass_8hh_source.html#l00152">Klass::addZone2()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kBlock</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kKonst</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kSamp</a>, <a class="el" href="list_8cpp_source.html#l00240">reverse()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, <a class="el" href="list_8hh_source.html#l00134">tl()</a>, <a class="el" href="tree_8hh_source.html#l00173">tree()</a>, <a class="el" href="uitree_8cpp_source.html#l00140">uiWidget()</a>, and <a class="el" href="floats_8cpp_source.html#l00049">xfloat()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00546"></a>00546 { <a name="l00547"></a>00547 <span class="keywordtype">string</span> varname = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"fbargraph"</span>); <a name="l00548"></a>00548 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$1 \t$0;"</span>, varname, <a class="code" href="floats_8cpp.html#a2da2ae6649f9479320f115342675b275">xfloat</a>())); <a name="l00549"></a>00549 <a class="code" href="classCompiler.html#a4532f2ccb5ae6b5bcef23029a01a86c2" title="Add a widget with a certain path to the user interface tree.">addUIWidget</a>(<a class="code" href="list_8cpp.html#a8e15f8d6fcc6cd319059c2e0544145bb">reverse</a>(<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(path)), <a class="code" href="uitree_8cpp.html#a57e5e173f6563110a36543ae576322cb">uiWidget</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(path), <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(varname), sig)); <a name="l00550"></a>00550 <a name="l00551"></a>00551 <a class="code" href="classP.html">Type</a> t = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(sig); <a name="l00552"></a>00552 <span class="keywordflow">switch</span> (t->variability()) { <a name="l00553"></a>00553 <a name="l00554"></a>00554 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a21138ad5418c2d97ac10a35fd48c0503">kKonst</a> : <a name="l00555"></a>00555 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = $1;"</span>, varname, exp)); <a name="l00556"></a>00556 <span class="keywordflow">break</span>; <a name="l00557"></a>00557 <a name="l00558"></a>00558 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a2efe081feb92c3bc30a7ae2dca084901">kBlock</a> : <a name="l00559"></a>00559 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a28f906237d7648909e66f593ac19ec82">addZone2</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = $1;"</span>, varname, exp)); <a name="l00560"></a>00560 <span class="keywordflow">break</span>; <a name="l00561"></a>00561 <a name="l00562"></a>00562 <span class="keywordflow">case</span> <a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a> : <a name="l00563"></a>00563 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = $1;"</span>, varname, exp)); <a name="l00564"></a>00564 <span class="keywordflow">break</span>; <a name="l00565"></a>00565 } <a name="l00566"></a>00566 <a name="l00567"></a>00567 <span class="comment">//return varname;</span> <a name="l00568"></a>00568 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, varname); <a name="l00569"></a>00569 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a3c022fb9c391b7da22e2bc9c75a370a4"></a><!-- doxytag: member="ScalarCompiler::generateVSlider" ref="a3c022fb9c391b7da22e2bc9c75a370a4" args="(Tree sig, Tree label, Tree cur, Tree min, Tree max, Tree step)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateVSlider </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>label</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>cur</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>min</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>max</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>step</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00517">517</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00132">Klass::addDeclCode()</a>, <a class="el" href="klass_8hh_source.html#l00134">Klass::addInitCode()</a>, <a class="el" href="compile_8cpp_source.html#l00123">Compiler::addUIWidget()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="list_8cpp_source.html#l00240">reverse()</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, <a class="el" href="Text_8cpp_source.html#l00163">T()</a>, <a class="el" href="list_8hh_source.html#l00134">tl()</a>, <a class="el" href="tree_8hh_source.html#l00173">tree()</a>, <a class="el" href="tree_8cpp_source.html#l00260">tree2float()</a>, <a class="el" href="uitree_8cpp_source.html#l00140">uiWidget()</a>, and <a class="el" href="floats_8cpp_source.html#l00049">xfloat()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00518"></a>00518 { <a name="l00519"></a>00519 <span class="keywordtype">string</span> varname = <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(<span class="stringliteral">"fslider"</span>); <a name="l00520"></a>00520 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#acb05aee5dfd9fbc3f14215292bb2c18e">addDeclCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$1 \t$0;"</span>, varname, <a class="code" href="floats_8cpp.html#a2da2ae6649f9479320f115342675b275">xfloat</a>())); <a name="l00521"></a>00521 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#a0a95cda1c8e5e601dd67b80573105af3">addInitCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = $1;"</span>, varname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(<a class="code" href="tree_8cpp.html#ad01262fc04f661b162d36b786419a849" title="if t has a node of type float, return it otherwise error">tree2float</a>(cur)))); <a name="l00522"></a>00522 <a class="code" href="classCompiler.html#a4532f2ccb5ae6b5bcef23029a01a86c2" title="Add a widget with a certain path to the user interface tree.">addUIWidget</a>(<a class="code" href="list_8cpp.html#a8e15f8d6fcc6cd319059c2e0544145bb">reverse</a>(<a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(path)), <a class="code" href="uitree_8cpp.html#a57e5e173f6563110a36543ae576322cb">uiWidget</a>(<a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(path), <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(varname), sig)); <a name="l00523"></a>00523 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, varname); <a name="l00524"></a>00524 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a839b060c8ac3792bb888225352533dd8"></a><!-- doxytag: member="ScalarCompiler::generateWRTbl" ref="a839b060c8ac3792bb888225352533dd8" args="(Tree sig, Tree tbl, Tree idx, Tree data)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateWRTbl </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>tbl</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>idx</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>data</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00723">723</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="klass_8hh_source.html#l00158">Klass::addExecCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00724"></a>00724 { <a name="l00725"></a>00725 <span class="keywordtype">string</span> tblName(<a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(tbl)); <a name="l00726"></a>00726 <a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[$1] = $2;"</span>, tblName, <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(idx), <a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(data))); <a name="l00727"></a>00727 <span class="keywordflow">return</span> tblName; <a name="l00728"></a>00728 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ad3aa914094a53cc9451e2526c37ddfe3"></a><!-- doxytag: member="ScalarCompiler::generateXtended" ref="ad3aa914094a53cc9451e2526c37ddfe3" args="(Tree sig)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::generateXtended </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em></td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>retrieve the type annotation of sig </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sig</em> </td><td>the signal we want to know the type </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l01007">1007</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="tree_8hh_source.html#l00142">CTree::arity()</a>, <a class="el" href="tree_8hh_source.html#l00143">CTree::branch()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="compile_8hh_source.html#l00053">Compiler::fClass</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="classxtended.html#a859e32300d9ac541e961c222896ea3f9">xtended::generateCode()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="symbol_8hh_source.html#l00100">getUserData()</a>, and <a class="el" href="classxtended.html#adf5e69b249396b41bf4d4d2a842a279b">xtended::needCache()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00227">generateCode()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l01008"></a>01008 { <a name="l01009"></a>01009 <a class="code" href="classxtended.html">xtended</a>* p = (<a class="code" href="classxtended.html">xtended</a>*) <a class="code" href="symbol_8hh.html#a603fcb6c07eacf2688c2a8470637d0ff" title="Returns user data.">getUserData</a>(sig); <a name="l01010"></a>01010 vector<string> args; <a name="l01011"></a>01011 vector<Type> types; <a name="l01012"></a>01012 <a name="l01013"></a>01013 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<sig-><a class="code" href="classCTree.html#a68f2be5e845407bc956a2893fe6f0d03" title="return the number of branches (subtrees) of a tree">arity</a>(); i++) { <a name="l01014"></a>01014 args.push_back(<a class="code" href="classScalarCompiler.html#aac679ae86346a78d59a4779c9bc5d988" title="Compile a signal.">CS</a>(sig-><a class="code" href="classCTree.html#a06c1513b23dc7b0d9da9c930c6dc43c5" title="return the ith branch (subtree) of a tree">branch</a>(i))); <a name="l01015"></a>01015 types.push_back(<a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(sig-><a class="code" href="classCTree.html#a06c1513b23dc7b0d9da9c930c6dc43c5" title="return the ith branch (subtree) of a tree">branch</a>(i))); <a name="l01016"></a>01016 } <a name="l01017"></a>01017 <a name="l01018"></a>01018 <span class="keywordflow">if</span> (p-><a class="code" href="classxtended.html#adf5e69b249396b41bf4d4d2a842a279b">needCache</a>()) { <a name="l01019"></a>01019 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a96c58f44c4a1d1ac3bd648b542bd0afa">generateCacheCode</a>(sig, p-><a class="code" href="classxtended.html#a859e32300d9ac541e961c222896ea3f9">generateCode</a>(<a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>, args, types)); <a name="l01020"></a>01020 } <span class="keywordflow">else</span> { <a name="l01021"></a>01021 <span class="keywordflow">return</span> p-><a class="code" href="classxtended.html#a859e32300d9ac541e961c222896ea3f9">generateCode</a>(<a class="code" href="classCompiler.html#abd99a780b9c082000158f15f20439a20">fClass</a>, args, types); <a name="l01022"></a>01022 } <a name="l01023"></a>01023 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ab9526b36f9f5c40e5780c6015312eed4"></a><!-- doxytag: member="ScalarCompiler::getCompiledExpression" ref="ab9526b36f9f5c40e5780c6015312eed4" args="(Tree sig, string &name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool ScalarCompiler::getCompiledExpression </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">string & </td> <td class="paramname"> <em>cexp</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Test if a signal is already compiled. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sig</em> </td><td>the signal expression to compile. </td></tr> <tr><td valign="top"></td><td valign="top"><em>name</em> </td><td>the string representing the compiled expression. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true is already compiled </dd></dl> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00180">180</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8hh_source.html#l00042">fCompileProperty</a>.</p> <p>Referenced by <a class="el" href="compile__vect_8cpp_source.html#l00081">VectorCompiler::CS()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00735">generateRDTbl()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00674">generateStaticTable()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00181"></a>00181 { <a name="l00182"></a>00182 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a5a9a34892a42d9fc3b55af5da5a44176">fCompileProperty</a>.get(sig, cexp); <a name="l00183"></a>00183 } </pre></div></p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ac4c7f408808aeecc65eb069eb55e7aea"></a><!-- doxytag: member="ScalarCompiler::getFreshID" ref="ac4c7f408808aeecc65eb069eb55e7aea" args="(const string &prefix)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::getFreshID </td> <td>(</td> <td class="paramtype">const string & </td> <td class="paramname"> <em>prefix</em></td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00081">81</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8hh_source.html#l00045">fIDCounters</a>, <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>, and <a class="el" href="Text_8cpp_source.html#l00163">T()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00498">generateButton()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00507">generateCheckbox()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00572">generateHBargraph()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00526">generateHSlider()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00847">generateIota()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00535">generateNumEntry()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00821">generatePrefix()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00874">generateSelect2()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00933">generateSelect3()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00611">generateSigGen()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00622">generateStaticSigGen()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00674">generateStaticTable()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00638">generateTable()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00545">generateVBargraph()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00517">generateVSlider()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00401">getTypedNames()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00082"></a>00082 { <a name="l00083"></a>00083 <span class="keywordflow">if</span> (<a class="code" href="classScalarCompiler.html#aaeb282c0d2d1e2a3f4f35c8ead8aecdb">fIDCounters</a>.find(prefix) == <a class="code" href="classScalarCompiler.html#aaeb282c0d2d1e2a3f4f35c8ead8aecdb">fIDCounters</a>.end()) { <a name="l00084"></a>00084 <a class="code" href="classScalarCompiler.html#aaeb282c0d2d1e2a3f4f35c8ead8aecdb">fIDCounters</a>[prefix]=0; <a name="l00085"></a>00085 } <a name="l00086"></a>00086 <span class="keywordtype">int</span> n = <a class="code" href="classScalarCompiler.html#aaeb282c0d2d1e2a3f4f35c8ead8aecdb">fIDCounters</a>[prefix]; <a name="l00087"></a>00087 <a class="code" href="classScalarCompiler.html#aaeb282c0d2d1e2a3f4f35c8ead8aecdb">fIDCounters</a>[prefix] = n+1; <a name="l00088"></a>00088 <span class="keywordflow">return</span> <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0$1"</span>, prefix, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(n)); <a name="l00089"></a>00089 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a7bf169572df60b9383297d85f36e2506"></a><!-- doxytag: member="ScalarCompiler::getSharingCount" ref="a7bf169572df60b9383297d85f36e2506" args="(Tree t)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int ScalarCompiler::getSharingCount </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>t</em></td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="sharing_8cpp_source.html#l00062">62</a> of file <a class="el" href="sharing_8cpp_source.html">sharing.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8hh_source.html#l00046">fSharingKey</a>, <a class="el" href="node_8hh_source.html#l00098">Node::getInt()</a>, <a class="el" href="list_8cpp_source.html#l00423">getProperty()</a>, and <a class="el" href="tree_8hh_source.html#l00141">CTree::node()</a>.</p> <p>Referenced by <a class="el" href="compile__vect_8cpp_source.html#l00155">VectorCompiler::generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__vect_8cpp_source.html#l00218">VectorCompiler::needSeparateLoop()</a>, and <a class="el" href="sharing_8cpp_source.html#l00106">sharingAnnotation()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00063"></a>00063 { <a name="l00064"></a>00064 <span class="comment">//cerr << "getSharingCount of : " << *sig << " = ";</span> <a name="l00065"></a>00065 <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a> c; <a name="l00066"></a>00066 <span class="keywordflow">if</span> (<a class="code" href="list_8cpp.html#a665745948013d012bb123e9577c094bd">getProperty</a>(sig, <a class="code" href="classScalarCompiler.html#ac2dfd867bce185ff73b8f0625fcd640e">fSharingKey</a>, c)) { <a name="l00067"></a>00067 <span class="comment">//cerr << c->node().getInt() << endl;</span> <a name="l00068"></a>00068 <span class="keywordflow">return</span> c-><a class="code" href="classCTree.html#a8de786fec095c8304b9ffa7c1c316237" title="return the content of the tree">node</a>().<a class="code" href="classNode.html#a0ac89402d0e51d19bed062529a375efe">getInt</a>(); <a name="l00069"></a>00069 } <span class="keywordflow">else</span> { <a name="l00070"></a>00070 <span class="comment">//cerr << 0 << endl;</span> <a name="l00071"></a>00071 <span class="keywordflow">return</span> 0; <a name="l00072"></a>00072 } <a name="l00073"></a>00073 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ac33a3eb7d6bb601ab957871bd860b632"></a><!-- doxytag: member="ScalarCompiler::getTypedNames" ref="ac33a3eb7d6bb601ab957871bd860b632" args="(Type t, const string &prefix, string &ctype, string &vname)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ScalarCompiler::getTypedNames </td> <td>(</td> <td class="paramtype"><a class="el" href="classP.html">Type</a> </td> <td class="paramname"> <em>t</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>prefix</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">string & </td> <td class="paramname"> <em>ctype</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">string & </td> <td class="paramname"> <em>vname</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00401">401</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>, <a class="el" href="floats_8cpp_source.html#l00046">ifloat()</a>, <a class="el" href="sigtype_8hh_source.html#l00053">kInt</a>, and <a class="el" href="Text_8cpp_source.html#l00060">subst()</a>.</p> <p>Referenced by <a class="el" href="compile__vect_8cpp_source.html#l00155">VectorCompiler::generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00313">generateFConst()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00332">generateFVar()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00295">generateNumber()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00783">generateRec()</a>, <a class="el" href="compile__vect_8cpp_source.html#l00268">VectorCompiler::generateVariableStore()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00448">generateVariableStore()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00402"></a>00402 { <a name="l00403"></a>00403 <span class="keywordflow">if</span> (t->nature() == <a class="code" href="sigtype_8hh.html#adc29c2ff13d900c2f185ee95427fb06ca9bb31be73c01d40428195449f62588ac">kInt</a>) { <a name="l00404"></a>00404 ctype = <span class="stringliteral">"int"</span>; vname = <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"i$0"</span>, <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(prefix)); <a name="l00405"></a>00405 } <span class="keywordflow">else</span> { <a name="l00406"></a>00406 ctype = <a class="code" href="floats_8cpp.html#af21a266634ce24abcd265188e774ba4a">ifloat</a>(); vname = <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"f$0"</span>, <a class="code" href="classScalarCompiler.html#ac4c7f408808aeecc65eb069eb55e7aea">getFreshID</a>(prefix)); <a name="l00407"></a>00407 } <a name="l00408"></a>00408 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a12cd9487cf729b06cbece49552bc632e"></a><!-- doxytag: member="ScalarCompiler::getVectorNameProperty" ref="a12cd9487cf729b06cbece49552bc632e" args="(Tree sig, string &vecname)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool ScalarCompiler::getVectorNameProperty </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">string & </td> <td class="paramname"> <em>vecname</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Get the vector name property of a signal, the name of the vector used to store the previous values of the signal to implement a delay. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sig</em> </td><td>the signal expression. </td></tr> <tr><td valign="top"></td><td valign="top"><em>vecname</em> </td><td>the string where to store the vector name. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true if the signal has this property, false otherwise </dd></dl> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l01055">1055</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8hh_source.html#l00043">fVectorProperty</a>.</p> <p>Referenced by <a class="el" href="compile__vect_8cpp_source.html#l00288">VectorCompiler::generateFixDelay()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01098">generateFixDelay()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00766">generateRecProj()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l01056"></a>01056 { <a name="l01057"></a>01057 <span class="keywordflow">return</span> <a class="code" href="classScalarCompiler.html#a6ce8c9b467aee733e29260c7f6f889f7">fVectorProperty</a>.get(sig, vecname); <a name="l01058"></a>01058 } </pre></div></p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ad2a7768ff9ad2157f15a11686fe70366"></a><!-- doxytag: member="ScalarCompiler::pow2limit" ref="ad2a7768ff9ad2157f15a11686fe70366" args="(int x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int ScalarCompiler::pow2limit </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>x</em></td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Compute the minimal power of 2 greater than x. </p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l01065">1065</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l01199">generateDelayLine()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01151">generateDelayVecNoTemp()</a>, <a class="el" href="compile__vect_8cpp_source.html#l00288">VectorCompiler::generateFixDelay()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l01098">generateFixDelay()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l01066"></a>01066 { <a name="l01067"></a>01067 <span class="keywordtype">int</span> n = 2; <a name="l01068"></a>01068 <span class="keywordflow">while</span> (n < x) { n = 2*n; } <a name="l01069"></a>01069 <span class="keywordflow">return</span> n; <a name="l01070"></a>01070 } </pre></div></p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a7144aea17822337a175d660cd6def014"></a><!-- doxytag: member="ScalarCompiler::prepare" ref="a7144aea17822337a175d660cd6def014" args="(Tree L0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCTree.html">Tree</a> ScalarCompiler::prepare </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>L0</em></td> <td> ) </td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Implements <a class="el" href="classCompiler.html#a825249700edc26eac7eaa52790186f70">Compiler</a>.</p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00096">96</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="recursive-tree_8cpp_source.html#l00223">deBruijn2Sym()</a>, <a class="el" href="timing_8cpp_source.html#l00049">endTiming()</a>, <a class="el" href="compile__scal_8hh_source.html#l00047">fOccMarkup</a>, <a class="el" href="occurences_8cpp_source.html#l00063">OccMarkup::mark()</a>, <a class="el" href="privatise_8cpp_source.html#l00045">privatise()</a>, <a class="el" href="recursivness_8cpp_source.html#l00051">recursivnessAnnotation()</a>, <a class="el" href="sharing_8cpp_source.html#l00088">sharingAnalysis()</a>, <a class="el" href="simplify_8cpp_source.html#l00072">simplify()</a>, <a class="el" href="timing_8cpp_source.html#l00046">startTiming()</a>, and <a class="el" href="sigtyperules_8cpp_source.html#l00171">typeAnnotation()</a>.</p> <p>Referenced by <a class="el" href="compile__vect_8cpp_source.html#l00032">VectorCompiler::compileMultiSignal()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00129">compileMultiSignal()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00097"></a>00097 { <a name="l00098"></a>00098 <a class="code" href="timing_8cpp.html#a8b3ae592fe54580b95171a2bdabb2641">startTiming</a>(<span class="stringliteral">"ScalarCompiler::prepare"</span>); <a name="l00099"></a>00099 <a class="code" href="timing_8cpp.html#a8b3ae592fe54580b95171a2bdabb2641">startTiming</a>(<span class="stringliteral">"deBruijn2Sym"</span>); <a name="l00100"></a>00100 <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a> L1 = <a class="code" href="recursive-tree_8cpp.html#ab896f65486e6d80d4440721f2f89ff96">deBruijn2Sym</a>(LS); <span class="comment">// convert debruijn recursion into symbolic recursion</span> <a name="l00101"></a>00101 <a class="code" href="timing_8cpp.html#ac5c8a9d488cf5c7d786c833565e093e9">endTiming</a>(<span class="stringliteral">"deBruijn2Sym"</span>); <a name="l00102"></a>00102 <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a> L2 = <a class="code" href="simplify_8cpp.html#aa58ab1a209023cba186f077cfdcc5339">simplify</a>(L1); <span class="comment">// simplify by executing every computable operation</span> <a name="l00103"></a>00103 <a class="code" href="classCTree.html" title="A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches...">Tree</a> L3 = <a class="code" href="privatise_8cpp.html#a72412a8ab2da211259af2ad2bbfec902">privatise</a>(L2); <span class="comment">// Un-share tables with multiple writers</span> <a name="l00104"></a>00104 <a name="l00105"></a>00105 <a class="code" href="recursivness_8cpp.html#ad6d53633cf1982b7d7b094188c7bfe17" title="Annotate a signal with recursivness.">recursivnessAnnotation</a>(L3); <span class="comment">// Annotate L3 with recursivness information</span> <a name="l00106"></a>00106 <a class="code" href="sigtyperules_8cpp.html#a85dbc6a3f96f643e82a0b45d785ce341" title="fully annotate every subtree of term with type information">typeAnnotation</a>(L3); <span class="comment">// Annotate L3 with type information</span> <a name="l00107"></a>00107 <a class="code" href="classScalarCompiler.html#a3266c7302f512a4198aa4a047e55f80d">sharingAnalysis</a>(L3); <span class="comment">// annotate L3 with sharing count</span> <a name="l00108"></a>00108 <a class="code" href="classScalarCompiler.html#a01d66ece3660a3151f270d7e7a79cb77">fOccMarkup</a>.<a class="code" href="classOccMarkup.html#aaba1b76dc4c0f320f1639ec0f02e68e1" title="start markup of root tree with new unique key">mark</a>(L3); <span class="comment">// annotate L3 with occurences analysis</span> <a name="l00109"></a>00109 <a class="code" href="timing_8cpp.html#ac5c8a9d488cf5c7d786c833565e093e9">endTiming</a>(<span class="stringliteral">"ScalarCompiler::prepare"</span>); <a name="l00110"></a>00110 <span class="keywordflow">return</span> L3; <a name="l00111"></a>00111 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a38de9ca99a78eb0e82f149bbf4e03783"></a><!-- doxytag: member="ScalarCompiler::prepare2" ref="a38de9ca99a78eb0e82f149bbf4e03783" args="(Tree L0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCTree.html">Tree</a> ScalarCompiler::prepare2 </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>L0</em></td> <td> ) </td> <td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Implements <a class="el" href="classCompiler.html#a07c227f3f0e6751545c3c0af3b299d5d">Compiler</a>.</p> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00113">113</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="timing_8cpp_source.html#l00049">endTiming()</a>, <a class="el" href="compile__scal_8hh_source.html#l00047">fOccMarkup</a>, <a class="el" href="occurences_8cpp_source.html#l00063">OccMarkup::mark()</a>, <a class="el" href="recursivness_8cpp_source.html#l00051">recursivnessAnnotation()</a>, <a class="el" href="sharing_8cpp_source.html#l00088">sharingAnalysis()</a>, <a class="el" href="timing_8cpp_source.html#l00046">startTiming()</a>, and <a class="el" href="sigtyperules_8cpp_source.html#l00171">typeAnnotation()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00157">compileSingleSignal()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00114"></a>00114 { <a name="l00115"></a>00115 <a class="code" href="timing_8cpp.html#a8b3ae592fe54580b95171a2bdabb2641">startTiming</a>(<span class="stringliteral">"ScalarCompiler::prepare2"</span>); <a name="l00116"></a>00116 <a class="code" href="recursivness_8cpp.html#ad6d53633cf1982b7d7b094188c7bfe17" title="Annotate a signal with recursivness.">recursivnessAnnotation</a>(L0); <span class="comment">// Annotate L0 with recursivness information</span> <a name="l00117"></a>00117 <a class="code" href="sigtyperules_8cpp.html#a85dbc6a3f96f643e82a0b45d785ce341" title="fully annotate every subtree of term with type information">typeAnnotation</a>(L0); <span class="comment">// Annotate L0 with type information</span> <a name="l00118"></a>00118 <a class="code" href="classScalarCompiler.html#a3266c7302f512a4198aa4a047e55f80d">sharingAnalysis</a>(L0); <span class="comment">// annotate L0 with sharing count</span> <a name="l00119"></a>00119 <a class="code" href="classScalarCompiler.html#a01d66ece3660a3151f270d7e7a79cb77">fOccMarkup</a>.<a class="code" href="classOccMarkup.html#aaba1b76dc4c0f320f1639ec0f02e68e1" title="start markup of root tree with new unique key">mark</a>(L0); <span class="comment">// annotate L0 with occurences analysis</span> <a name="l00120"></a>00120 <a class="code" href="timing_8cpp.html#ac5c8a9d488cf5c7d786c833565e093e9">endTiming</a>(<span class="stringliteral">"ScalarCompiler::prepare2"</span>); <a name="l00121"></a>00121 <a name="l00122"></a>00122 <span class="keywordflow">return</span> L0; <a name="l00123"></a>00123 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a47e098af6e5857d4577371e459cd6df4"></a><!-- doxytag: member="ScalarCompiler::setCompiledExpression" ref="a47e098af6e5857d4577371e459cd6df4" args="(Tree sig, const string &name)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">string ScalarCompiler::setCompiledExpression </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>cexp</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Set the string of a compiled expression is already compiled. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sig</em> </td><td>the signal expression to compile. </td></tr> <tr><td valign="top"></td><td valign="top"><em>cexp</em> </td><td>the string representing the compiled expression. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>the cexp (for commodity) </dd></dl> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l00191">191</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8hh_source.html#l00042">fCompileProperty</a>.</p> <p>Referenced by <a class="el" href="compile__vect_8cpp_source.html#l00081">VectorCompiler::CS()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00202">CS()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00735">generateRDTbl()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00674">generateStaticTable()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00192"></a>00192 { <a name="l00193"></a>00193 <a class="code" href="classScalarCompiler.html#a5a9a34892a42d9fc3b55af5da5a44176">fCompileProperty</a>.set(sig, cexp); <a name="l00194"></a>00194 <span class="keywordflow">return</span> cexp; <a name="l00195"></a>00195 } </pre></div></p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a547b625712373da8332abff2c9b90142"></a><!-- doxytag: member="ScalarCompiler::setSharingCount" ref="a547b625712373da8332abff2c9b90142" args="(Tree t, int count)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ScalarCompiler::setSharingCount </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>t</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>count</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="sharing_8cpp_source.html#l00075">75</a> of file <a class="el" href="sharing_8cpp_source.html">sharing.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8hh_source.html#l00046">fSharingKey</a>, <a class="el" href="list_8cpp_source.html#l00418">setProperty()</a>, and <a class="el" href="tree_8hh_source.html#l00173">tree()</a>.</p> <p>Referenced by <a class="el" href="sharing_8cpp_source.html#l00106">sharingAnnotation()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00076"></a>00076 { <a name="l00077"></a>00077 <span class="comment">//cerr << "setSharingCount of : " << *sig << " <- " << count << endl;</span> <a name="l00078"></a>00078 <a class="code" href="list_8cpp.html#a5ead5a3e91af18d8f94e0974990a3c5a">setProperty</a>(sig, <a class="code" href="classScalarCompiler.html#ac2dfd867bce185ff73b8f0625fcd640e">fSharingKey</a>, <a class="code" href="tree_8hh.html#a61c13e9361cfa80bbb3cd6ce60a8f595">tree</a>(count)); <a name="l00079"></a>00079 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a81c64ccef445fdf557fc7b3ce6a786a7"></a><!-- doxytag: member="ScalarCompiler::setVectorNameProperty" ref="a81c64ccef445fdf557fc7b3ce6a786a7" args="(Tree sig, const string &vecname)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ScalarCompiler::setVectorNameProperty </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>sig</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>vecname</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Set the vector name property of a signal, the name of the vector used to store the previous values of the signal to implement a delay. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>sig</em> </td><td>the signal expression. </td></tr> <tr><td valign="top"></td><td valign="top"><em>vecname</em> </td><td>the string representing the vector name. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true is already compiled </dd></dl> <p>Definition at line <a class="el" href="compile__scal_8cpp_source.html#l01041">1041</a> of file <a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8hh_source.html#l00043">fVectorProperty</a>.</p> <p>Referenced by <a class="el" href="compile__vect_8cpp_source.html#l00155">VectorCompiler::generateCacheCode()</a>, <a class="el" href="compile__vect_8cpp_source.html#l00342">VectorCompiler::generateDelayVec()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01151">generateDelayVecNoTemp()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00783">generateRec()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l01042"></a>01042 { <a name="l01043"></a>01043 <a class="code" href="classScalarCompiler.html#a6ce8c9b467aee733e29260c7f6f889f7">fVectorProperty</a>.set(sig, vecname); <a name="l01044"></a>01044 } </pre></div></p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="a3266c7302f512a4198aa4a047e55f80d"></a><!-- doxytag: member="ScalarCompiler::sharingAnalysis" ref="a3266c7302f512a4198aa4a047e55f80d" args="(Tree t)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ScalarCompiler::sharingAnalysis </td> <td>(</td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>t</em></td> <td> ) </td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="sharing_8cpp_source.html#l00088">88</a> of file <a class="el" href="sharing_8cpp_source.html">sharing.cpp</a>.</p> <p>References <a class="el" href="compile__scal_8hh_source.html#l00046">fSharingKey</a>, <a class="el" href="list_8hh_source.html#l00133">hd()</a>, <a class="el" href="list_8hh_source.html#l00138">isList()</a>, <a class="el" href="sigtype_8hh_source.html#l00055">kSamp</a>, <a class="el" href="sharing_8cpp_source.html#l00106">sharingAnnotation()</a>, <a class="el" href="shlysis_8cpp_source.html#l00069">shprkey()</a>, and <a class="el" href="list_8hh_source.html#l00134">tl()</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00096">prepare()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00113">prepare2()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00089"></a>00089 { <a name="l00090"></a>00090 <a class="code" href="classScalarCompiler.html#ac2dfd867bce185ff73b8f0625fcd640e">fSharingKey</a> = <a class="code" href="shlysis_8cpp.html#a827cae6cc8102ab89e60ae2996fbdbf4" title="Create a specific property key for the sharing count of subtrees of t.">shprkey</a>(t); <a name="l00091"></a>00091 <span class="keywordflow">if</span> (<a class="code" href="list_8hh.html#a8bdd73641276e0c0f999f504348eacc1">isList</a>(t)) { <a name="l00092"></a>00092 <span class="keywordflow">while</span> (<a class="code" href="list_8hh.html#a8bdd73641276e0c0f999f504348eacc1">isList</a>(t)) { <a name="l00093"></a>00093 <a class="code" href="classScalarCompiler.html#ac30012ee9420900ecf8a28c4e0752142">sharingAnnotation</a>(<a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a>, <a class="code" href="list_8hh.html#a067ad6f83087b420a1c44e48e56be389">hd</a>(t)); <a name="l00094"></a>00094 t = <a class="code" href="list_8hh.html#a4075748f5c7156306ec898795313a2e0">tl</a>(t); <a name="l00095"></a>00095 } <a name="l00096"></a>00096 } <span class="keywordflow">else</span> { <a name="l00097"></a>00097 <a class="code" href="classScalarCompiler.html#ac30012ee9420900ecf8a28c4e0752142">sharingAnnotation</a>(<a class="code" href="sigtype_8hh.html#a726ca809ffd3d67ab4b8476646f26635a415bf3edc164c8f259f328ff6dc0529a">kSamp</a>, t); <a name="l00098"></a>00098 } <a name="l00099"></a>00099 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <a class="anchor" id="ac30012ee9420900ecf8a28c4e0752142"></a><!-- doxytag: member="ScalarCompiler::sharingAnnotation" ref="ac30012ee9420900ecf8a28c4e0752142" args="(int vctxt, Tree t)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void ScalarCompiler::sharingAnnotation </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>vctxt</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classCTree.html">Tree</a> </td> <td class="paramname"> <em>t</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="sharing_8cpp_source.html#l00106">106</a> of file <a class="el" href="sharing_8cpp_source.html">sharing.cpp</a>.</p> <p>References <a class="el" href="sharing_8cpp_source.html#l00062">getSharingCount()</a>, <a class="el" href="sigtyperules_8cpp_source.html#l00082">getSigType()</a>, <a class="el" href="subsignals_8cpp_source.html#l00010">getSubSignals()</a>, <a class="el" href="signals_8cpp_source.html#l00091">isSigGen()</a>, and <a class="el" href="sharing_8cpp_source.html#l00075">setSharingCount()</a>.</p> <p>Referenced by <a class="el" href="sharing_8cpp_source.html#l00088">sharingAnalysis()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00107"></a>00107 { <a name="l00108"></a>00108 <span class="comment">//cerr << "START sharing annotation of " << *sig << endl;</span> <a name="l00109"></a>00109 <span class="keywordtype">int</span> count = <a class="code" href="classScalarCompiler.html#a7bf169572df60b9383297d85f36e2506">getSharingCount</a>(sig); <a name="l00110"></a>00110 <a name="l00111"></a>00111 <span class="keywordflow">if</span> (count > 0) { <a name="l00112"></a>00112 <span class="comment">// it is not our first visit</span> <a name="l00113"></a>00113 <a class="code" href="classScalarCompiler.html#a547b625712373da8332abff2c9b90142">setSharingCount</a>(sig, count+1); <a name="l00114"></a>00114 <a name="l00115"></a>00115 } <span class="keywordflow">else</span> { <a name="l00116"></a>00116 <span class="comment">// it is our first visit,</span> <a name="l00117"></a>00117 <span class="keywordtype">int</span> v = <a class="code" href="sigtyperules_8cpp.html#a1f41188e4150f54b2fb2caf28a948785" title="retrieve the type annotation of sig">getSigType</a>(sig)->variability(); <a name="l00118"></a>00118 <a name="l00119"></a>00119 <span class="comment">// check "time sharing" cases</span> <a name="l00120"></a>00120 <span class="keywordflow">if</span> (v < vctxt) { <a name="l00121"></a>00121 <a class="code" href="classScalarCompiler.html#a547b625712373da8332abff2c9b90142">setSharingCount</a>(sig, 2); <span class="comment">// time sharing occurence : slower expression in faster context</span> <a name="l00122"></a>00122 } <span class="keywordflow">else</span> { <a name="l00123"></a>00123 <a class="code" href="classScalarCompiler.html#a547b625712373da8332abff2c9b90142">setSharingCount</a>(sig, 1); <span class="comment">// regular occurence</span> <a name="l00124"></a>00124 } <a name="l00125"></a>00125 <a name="l00126"></a>00126 <span class="comment">// Annotate the sub signals</span> <a name="l00127"></a>00127 vector<Tree> subsig; <a name="l00128"></a>00128 <span class="keywordtype">int</span> n = <a class="code" href="signals_8hh.html#ae5dd2bb17d8df90f5561bb8084b3f10f" title="Extract the sub signals of a signal expression, that is not necesseraly all the subtrees...">getSubSignals</a>(sig, subsig); <a name="l00129"></a>00129 <span class="keywordflow">if</span> (n>0 && ! <a class="code" href="signals_8cpp.html#a771720237ca174a55a6823cc6623d602">isSigGen</a>(sig)) { <a name="l00130"></a>00130 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<n; i++) <a class="code" href="classScalarCompiler.html#ac30012ee9420900ecf8a28c4e0752142">sharingAnnotation</a>(v, subsig[i]); <a name="l00131"></a>00131 } <a name="l00132"></a>00132 } <a name="l00133"></a>00133 <span class="comment">//cerr << "END sharing annotation of " << *sig << endl;</span> <a name="l00134"></a>00134 } </pre></div></p> <p><div class="dynheader"> Here is the call graph for this function:</div> <div class="dynsection"> </div> </p> <p><div class="dynheader"> Here is the caller graph for this function:</div> <div class="dynsection"> </div> </p> </div> </div> <hr/><h2>Member Data Documentation</h2> <a class="anchor" id="a5a9a34892a42d9fc3b55af5da5a44176"></a><!-- doxytag: member="ScalarCompiler::fCompileProperty" ref="a5a9a34892a42d9fc3b55af5da5a44176" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classproperty.html">property</a><string> <a class="el" href="classScalarCompiler.html#a5a9a34892a42d9fc3b55af5da5a44176">ScalarCompiler::fCompileProperty</a><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8hh_source.html#l00042">42</a> of file <a class="el" href="compile__scal_8hh_source.html">compile_scal.hh</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00180">getCompiledExpression()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00191">setCompiledExpression()</a>.</p> </div> </div> <a class="anchor" id="af31cb95a6eca2df4a03bcb59f80d095b"></a><!-- doxytag: member="ScalarCompiler::fHasIota" ref="af31cb95a6eca2df4a03bcb59f80d095b" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool <a class="el" href="classScalarCompiler.html#af31cb95a6eca2df4a03bcb59f80d095b">ScalarCompiler::fHasIota</a><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8hh_source.html#l00048">48</a> of file <a class="el" href="compile__scal_8hh_source.html">compile_scal.hh</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l01245">ensureIotaCode()</a>.</p> </div> </div> <a class="anchor" id="aaeb282c0d2d1e2a3f4f35c8ead8aecdb"></a><!-- doxytag: member="ScalarCompiler::fIDCounters" ref="aaeb282c0d2d1e2a3f4f35c8ead8aecdb" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">map< string, int > <a class="el" href="classScalarCompiler.html#aaeb282c0d2d1e2a3f4f35c8ead8aecdb">ScalarCompiler::fIDCounters</a><code> [static, protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8hh_source.html#l00045">45</a> of file <a class="el" href="compile__scal_8hh_source.html">compile_scal.hh</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l00081">getFreshID()</a>.</p> </div> </div> <a class="anchor" id="a01d66ece3660a3151f270d7e7a79cb77"></a><!-- doxytag: member="ScalarCompiler::fOccMarkup" ref="a01d66ece3660a3151f270d7e7a79cb77" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classOccMarkup.html">OccMarkup</a> <a class="el" href="classScalarCompiler.html#a01d66ece3660a3151f270d7e7a79cb77">ScalarCompiler::fOccMarkup</a><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8hh_source.html#l00047">47</a> of file <a class="el" href="compile__scal_8hh_source.html">compile_scal.hh</a>.</p> <p>Referenced by <a class="el" href="compile__vect_8cpp_source.html#l00155">VectorCompiler::generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00313">generateFConst()</a>, <a class="el" href="compile__vect_8cpp_source.html#l00288">VectorCompiler::generateFixDelay()</a>, <a class="el" href="compile__scal_8cpp_source.html#l01098">generateFixDelay()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00332">generateFVar()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00295">generateNumber()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00783">generateRec()</a>, <a class="el" href="compile__vect_8cpp_source.html#l00218">VectorCompiler::needSeparateLoop()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00096">prepare()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l00113">prepare2()</a>.</p> </div> </div> <a class="anchor" id="ac2dfd867bce185ff73b8f0625fcd640e"></a><!-- doxytag: member="ScalarCompiler::fSharingKey" ref="ac2dfd867bce185ff73b8f0625fcd640e" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCTree.html">Tree</a> <a class="el" href="classScalarCompiler.html#ac2dfd867bce185ff73b8f0625fcd640e">ScalarCompiler::fSharingKey</a><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8hh_source.html#l00046">46</a> of file <a class="el" href="compile__scal_8hh_source.html">compile_scal.hh</a>.</p> <p>Referenced by <a class="el" href="sharing_8cpp_source.html#l00062">getSharingCount()</a>, <a class="el" href="sharing_8cpp_source.html#l00075">setSharingCount()</a>, and <a class="el" href="sharing_8cpp_source.html#l00088">sharingAnalysis()</a>.</p> </div> </div> <a class="anchor" id="a6ce8c9b467aee733e29260c7f6f889f7"></a><!-- doxytag: member="ScalarCompiler::fVectorProperty" ref="a6ce8c9b467aee733e29260c7f6f889f7" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classproperty.html">property</a><string> <a class="el" href="classScalarCompiler.html#a6ce8c9b467aee733e29260c7f6f889f7">ScalarCompiler::fVectorProperty</a><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="compile__scal_8hh_source.html#l00043">43</a> of file <a class="el" href="compile__scal_8hh_source.html">compile_scal.hh</a>.</p> <p>Referenced by <a class="el" href="compile__scal_8cpp_source.html#l01055">getVectorNameProperty()</a>, and <a class="el" href="compile__scal_8cpp_source.html#l01041">setVectorNameProperty()</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="compile__scal_8hh_source.html">compile_scal.hh</a></li> <li><a class="el" href="compile__scal_8cpp_source.html">compile_scal.cpp</a></li> <li><a class="el" href="sharing_8cpp_source.html">sharing.cpp</a></li> </ul> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:23 2010 for FAUST compiler by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>