<!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: delayline.cpp File 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><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>delayline.cpp File Reference</h1><code>#include "<a class="el" href="delayline_8cpp_source.html">delayline.hh</a>"</code><br/> <code>#include <string></code><br/> <code>#include "<a class="el" href="sigtype_8hh_source.html">sigtype.hh</a>"</code><br/> <code>#include "<a class="el" href="klass_8hh_source.html">klass.hh</a>"</code><br/> <code>#include "<a class="el" href="Text_8hh_source.html">Text.hh</a>"</code><br/> <div class="dynheader"> Include dependency graph for delayline.cpp:</div> <div class="dynsection"> </div> <div class="dynheader"> This graph shows which files directly or indirectly include this file:</div> <div class="dynsection"> </div> <p><a href="delayline_8cpp_source.html">Go to the source code of this file.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="delayline_8cpp.html#ad4e732d2d6dffb33a5667ab5f13661dd">pow2limit</a> (int x)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="delayline_8cpp.html#a4105777e2d8b59892f42b9a157002e9e">vectorLoop</a> (<a class="el" href="classKlass.html">Klass</a> *k, const string &tname, const string &vecname, const string &cexp)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate the code for a (short) delay line. <a href="#a4105777e2d8b59892f42b9a157002e9e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="delayline_8cpp.html#aeeff01069783bf9c6ec3f18fda583a42">dlineLoop</a> (<a class="el" href="classKlass.html">Klass</a> *k, const string &tname, const string &dlname, int delay, const string &cexp)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generate the code for a (short) delay line. <a href="#aeeff01069783bf9c6ec3f18fda583a42"></a><br/></td></tr> <tr><td colspan="2"><h2>Variables</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="delayline_8cpp.html#a6913f43c820ecbf6076c31d40598b7ee">gVecSize</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="delayline_8cpp.html#a278e0cda879c0108aff047853ab0214c">gMaxCopyDelay</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="delayline_8cpp.html#a9dcf8d0143248403c712fafbaa0ecc25">gSchedulerSwitch</a></td></tr> </table> <hr/><h2>Function Documentation</h2> <a class="anchor" id="aeeff01069783bf9c6ec3f18fda583a42"></a><!-- doxytag: member="delayline.cpp::dlineLoop" ref="aeeff01069783bf9c6ec3f18fda583a42" args="(Klass *k, const string &tname, const string &dlname, int delay, const string &cexp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void dlineLoop </td> <td>(</td> <td class="paramtype"><a class="el" href="classKlass.html">Klass</a> * </td> <td class="paramname"> <em>k</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>tname</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>dlname</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>delay</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></td> </tr> </table> </div> <div class="memdoc"> <p>Generate the code for a (short) delay line. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>k</em> </td><td>the c++ class where the delay line will be placed. </td></tr> <tr><td valign="top"></td><td valign="top"><em>l</em> </td><td>the loop where the code will be placed. </td></tr> <tr><td valign="top"></td><td valign="top"><em>tname</em> </td><td>the name of the C++ type (float or int) </td></tr> <tr><td valign="top"></td><td valign="top"><em>dlname</em> </td><td>the name of the delay line (vector) to be used. </td></tr> <tr><td valign="top"></td><td valign="top"><em>delay</em> </td><td>the maximum delay </td></tr> <tr><td valign="top"></td><td valign="top"><em>cexp</em> </td><td>the content of the signal as a C++ expression </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="delayline_8cpp_source.html#l00051">51</a> of file <a class="el" href="delayline_8cpp_source.html">delayline.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#l00159">Klass::addPostCode()</a>, <a class="el" href="klass_8hh_source.html#l00157">Klass::addPreCode()</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#l00152">Klass::addZone2()</a>, <a class="el" href="main_8cpp_source.html#l00124">gMaxCopyDelay</a>, <a class="el" href="main_8cpp_source.html#l00137">gSchedulerSwitch</a>, <a class="el" href="main_8cpp_source.html#l00133">gVecSize</a>, <a class="el" href="delayline_8cpp_source.html#l00009">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__vect_8cpp_source.html#l00258">VectorCompiler::generateDelayLine()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00052"></a>00052 { <a name="l00053"></a>00053 <span class="keywordflow">if</span> (delay < <a class="code" href="doc__compile_8cpp.html#a278e0cda879c0108aff047853ab0214c">gMaxCopyDelay</a>) { <a name="l00054"></a>00054 <a name="l00055"></a>00055 <span class="comment">// Implementation of a copy based delayline</span> <a name="l00056"></a>00056 <a name="l00057"></a>00057 <span class="comment">// create names for temporary and permanent storage </span> <a name="l00058"></a>00058 <span class="keywordtype">string</span> buf = <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0_tmp"</span>, dlname); <a name="l00059"></a>00059 <span class="keywordtype">string</span> pmem= <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0_perm"</span>, dlname); <a name="l00060"></a>00060 <a name="l00061"></a>00061 <span class="comment">// constraints delay size to be multiple of 4</span> <a name="l00062"></a>00062 delay = (delay+3)&-4; <a name="l00063"></a>00063 <a name="l00064"></a>00064 <span class="comment">// allocate permanent storage for delayed samples</span> <a name="l00065"></a>00065 <span class="keywordtype">string</span> dsize = <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(delay); <a name="l00066"></a>00066 k-><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>, tname, pmem, dsize)); <a name="l00067"></a>00067 <a name="l00068"></a>00068 <span class="comment">// init permanent memory</span> <a name="l00069"></a>00069 k-><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>, pmem, dsize)); <a name="l00070"></a>00070 <a name="l00071"></a>00071 <span class="comment">// compute method</span> <a name="l00072"></a>00072 <a name="l00073"></a>00073 <span class="comment">// -- declare a buffer and a "shifted" vector</span> <a name="l00074"></a>00074 k-><a class="code" href="classKlass.html#a9cbf32b697f222569fa953a740c0eb4c">addSharedDecl</a>(buf); <a name="l00075"></a>00075 <a name="l00076"></a>00076 <span class="comment">// -- variables moved as class fields...</span> <a name="l00077"></a>00077 <span class="keywordflow">if</span> (<a class="code" href="compile__scal_8cpp.html#aed8da6f8f23ca426bf3ea6564e0bd6f2">gSchedulerSwitch</a>) { <a name="l00078"></a>00078 k-><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+$3];"</span>, tname, buf, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(<a class="code" href="compile__vect_8cpp.html#a6913f43c820ecbf6076c31d40598b7ee">gVecSize</a>), dsize)); <a name="l00079"></a>00079 } <span class="keywordflow">else</span> { <a name="l00080"></a>00080 k-><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+$3];"</span>, tname, buf, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(<a class="code" href="compile__vect_8cpp.html#a6913f43c820ecbf6076c31d40598b7ee">gVecSize</a>), dsize)); <a name="l00081"></a>00081 } <a name="l00082"></a>00082 <a name="l00083"></a>00083 k-><a class="code" href="classKlass.html#a85cbd66d7268d87442a19b4371a15272">addFirstPrivateDecl</a>(dlname); <a name="l00084"></a>00084 k-><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[$3];"</span>, tname, dlname, buf, dsize)); <a name="l00085"></a>00085 <a name="l00086"></a>00086 <span class="comment">// -- copy the stored samples to the delay line</span> <a name="l00087"></a>00087 k-><a class="code" href="classKlass.html#ac882bd15af33eef0ec0d90a7c61e88cb">addPreCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"for (int i=0; i<$2; i++) $0[i]=$1[i];"</span>, buf, pmem, dsize)); <a name="l00088"></a>00088 <a name="l00089"></a>00089 <span class="comment">// -- compute the new samples</span> <a name="l00090"></a>00090 k-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[i] = $1;"</span>, dlname, cexp)); <a name="l00091"></a>00091 <a name="l00092"></a>00092 <span class="comment">// -- copy back to stored samples</span> <a name="l00093"></a>00093 k-><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<$2; i++) $0[i]=$1[count+i];"</span>, pmem, buf, dsize)); <a name="l00094"></a>00094 <a name="l00095"></a>00095 } <span class="keywordflow">else</span> { <a name="l00096"></a>00096 <a name="l00097"></a>00097 <span class="comment">// Implementation of a ring-buffer delayline</span> <a name="l00098"></a>00098 <a name="l00099"></a>00099 <span class="comment">// the size should be large enough and aligned on a power of two</span> <a name="l00100"></a>00100 delay = <a class="code" href="delayline_8cpp.html#ad4e732d2d6dffb33a5667ab5f13661dd">pow2limit</a>(delay + <a class="code" href="compile__vect_8cpp.html#a6913f43c820ecbf6076c31d40598b7ee">gVecSize</a>); <a name="l00101"></a>00101 <span class="keywordtype">string</span> dsize = <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(delay); <a name="l00102"></a>00102 <span class="keywordtype">string</span> mask = <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(delay-1); <a name="l00103"></a>00103 <a name="l00104"></a>00104 <span class="comment">// create names for temporary and permanent storage </span> <a name="l00105"></a>00105 <span class="keywordtype">string</span> idx = <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0_idx"</span>, dlname); <a name="l00106"></a>00106 <span class="keywordtype">string</span> idx_save = <a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0_idx_save"</span>, dlname); <a name="l00107"></a>00107 <a name="l00108"></a>00108 <span class="comment">// allocate permanent storage for delayed samples</span> <a name="l00109"></a>00109 k-><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>, tname, dlname, dsize)); <a name="l00110"></a>00110 k-><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>, idx)); <a name="l00111"></a>00111 k-><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>, idx_save)); <a name="l00112"></a>00112 <a name="l00113"></a>00113 <span class="comment">// init permanent memory</span> <a name="l00114"></a>00114 k-><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>, dlname, dsize)); <a name="l00115"></a>00115 k-><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>, idx)); <a name="l00116"></a>00116 k-><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>, idx_save)); <a name="l00117"></a>00117 <a name="l00118"></a>00118 <span class="comment">// -- update index</span> <a name="l00119"></a>00119 k-><a class="code" href="classKlass.html#ac882bd15af33eef0ec0d90a7c61e88cb">addPreCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = ($0+$1)&$2;"</span>, idx, idx_save, mask)); <a name="l00120"></a>00120 <a name="l00121"></a>00121 <span class="comment">// -- compute the new samples</span> <a name="l00122"></a>00122 k-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[($2+i)&$3] = $1;"</span>, dlname, cexp, idx, mask)); <a name="l00123"></a>00123 <a name="l00124"></a>00124 <span class="comment">// -- save index</span> <a name="l00125"></a>00125 k-><a class="code" href="classKlass.html#a9e4aa8af46e099cdfc0cb2775239620f">addPostCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0 = count;"</span>, idx_save)); <a name="l00126"></a>00126 } <a name="l00127"></a>00127 } </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="ad4e732d2d6dffb33a5667ab5f13661dd"></a><!-- doxytag: member="delayline.cpp::pow2limit" ref="ad4e732d2d6dffb33a5667ab5f13661dd" args="(int x)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static int pow2limit </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>x</em></td> <td> ) </td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="delayline_8cpp_source.html#l00009">9</a> of file <a class="el" href="delayline_8cpp_source.html">delayline.cpp</a>.</p> <p>Referenced by <a class="el" href="delayline_8cpp_source.html#l00051">dlineLoop()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00010"></a>00010 { <a name="l00011"></a>00011 <span class="keywordtype">int</span> n = 2; <a name="l00012"></a>00012 <span class="keywordflow">while</span> (n < x) { n = 2*n; } <a name="l00013"></a>00013 <span class="keywordflow">return</span> n; <a name="l00014"></a>00014 } </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="a4105777e2d8b59892f42b9a157002e9e"></a><!-- doxytag: member="delayline.cpp::vectorLoop" ref="a4105777e2d8b59892f42b9a157002e9e" args="(Klass *k, const string &tname, const string &vecname, const string &cexp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void vectorLoop </td> <td>(</td> <td class="paramtype"><a class="el" href="classKlass.html">Klass</a> * </td> <td class="paramname"> <em>k</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>tname</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const string & </td> <td class="paramname"> <em>vecname</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></td> </tr> </table> </div> <div class="memdoc"> <p>Generate the code for a (short) delay line. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>k</em> </td><td>the c++ class where the delay line will be placed. </td></tr> <tr><td valign="top"></td><td valign="top"><em>l</em> </td><td>the loop where the code will be placed. </td></tr> <tr><td valign="top"></td><td valign="top"><em>tname</em> </td><td>the name of the C++ type (float or int) </td></tr> <tr><td valign="top"></td><td valign="top"><em>dlname</em> </td><td>the name of the delay line (vector) to be used. </td></tr> <tr><td valign="top"></td><td valign="top"><em>delay</em> </td><td>the maximum delay </td></tr> <tr><td valign="top"></td><td valign="top"><em>cexp</em> </td><td>the content of the signal as a C++ expression </td></tr> </table> </dd> </dl> <p>Definition at line <a class="el" href="delayline_8cpp_source.html#l00025">25</a> of file <a class="el" href="delayline_8cpp_source.html">delayline.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#l00148">Klass::addSharedDecl()</a>, <a class="el" href="klass_8hh_source.html#l00151">Klass::addZone1()</a>, <a class="el" href="main_8cpp_source.html#l00137">gSchedulerSwitch</a>, <a class="el" href="main_8cpp_source.html#l00133">gVecSize</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__vect_8cpp_source.html#l00258">VectorCompiler::generateDelayLine()</a>, and <a class="el" href="compile__vect_8cpp_source.html#l00268">VectorCompiler::generateVariableStore()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00026"></a>00026 { <a name="l00027"></a>00027 <span class="comment">// -- declare the vector</span> <a name="l00028"></a>00028 k-><a class="code" href="classKlass.html#a9cbf32b697f222569fa953a740c0eb4c">addSharedDecl</a>(vecname); <a name="l00029"></a>00029 <a name="l00030"></a>00030 <span class="comment">// -- variables moved as class fields...</span> <a name="l00031"></a>00031 <span class="keywordflow">if</span> (<a class="code" href="compile__scal_8cpp.html#aed8da6f8f23ca426bf3ea6564e0bd6f2">gSchedulerSwitch</a>) { <a name="l00032"></a>00032 k-><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>, tname, vecname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(<a class="code" href="compile__vect_8cpp.html#a6913f43c820ecbf6076c31d40598b7ee">gVecSize</a>))); <a name="l00033"></a>00033 } <span class="keywordflow">else</span> { <a name="l00034"></a>00034 k-><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>, tname, vecname, <a class="code" href="Text_8cpp.html#a16bacb907294be37af81cdf9aff4449a">T</a>(<a class="code" href="compile__vect_8cpp.html#a6913f43c820ecbf6076c31d40598b7ee">gVecSize</a>))); <a name="l00035"></a>00035 } <a name="l00036"></a>00036 <a name="l00037"></a>00037 <span class="comment">// -- compute the new samples</span> <a name="l00038"></a>00038 k-><a class="code" href="classKlass.html#afb18d2c8b90b89695d866dfa4d4ff52e">addExecCode</a>(<a class="code" href="Text_8cpp.html#af50e951c134c2c98c4c75d687f8fca7a">subst</a>(<span class="stringliteral">"$0[i] = $1;"</span>, vecname, cexp)); <a name="l00039"></a>00039 } </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>Variable Documentation</h2> <a class="anchor" id="a278e0cda879c0108aff047853ab0214c"></a><!-- doxytag: member="delayline.cpp::gMaxCopyDelay" ref="a278e0cda879c0108aff047853ab0214c" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="delayline_8cpp.html#a278e0cda879c0108aff047853ab0214c">gMaxCopyDelay</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="main_8cpp_source.html#l00124">124</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p> </div> </div> <a class="anchor" id="a9dcf8d0143248403c712fafbaa0ecc25"></a><!-- doxytag: member="delayline.cpp::gSchedulerSwitch" ref="a9dcf8d0143248403c712fafbaa0ecc25" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="delayline_8cpp.html#a9dcf8d0143248403c712fafbaa0ecc25">gSchedulerSwitch</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="main_8cpp_source.html#l00137">137</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p> </div> </div> <a class="anchor" id="a6913f43c820ecbf6076c31d40598b7ee"></a><!-- doxytag: member="delayline.cpp::gVecSize" ref="a6913f43c820ecbf6076c31d40598b7ee" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="delayline_8cpp.html#a6913f43c820ecbf6076c31d40598b7ee">gVecSize</a></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="main_8cpp_source.html#l00133">133</a> of file <a class="el" href="main_8cpp_source.html">main.cpp</a>.</p> </div> </div> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:03 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>