<!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: Occurences 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>Occurences Class Reference</h1><!-- doxytag: class="Occurences" --> <p><code>#include <<a class="el" href="occurences_8hh_source.html">occurences.hh</a>></code></p> <p><a href="classOccurences-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="classOccurences.html#a4a5c6d16406d9646c02c3df7309bead6">Occurences</a> (int v, int r)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classOccurences.html">Occurences</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classOccurences.html#ae8c2ebe876a58caa0f4868f0eb531a20">incOccurences</a> (int v, int r, int d)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">inc occurences in context v,r,d <a href="#ae8c2ebe876a58caa0f4868f0eb531a20"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classOccurences.html#a31447fb0c41844e179c3721fe1882be8">hasMultiOccurences</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">true if multiple occurences or occ. in higher ctxt <a href="#a31447fb0c41844e179c3721fe1882be8"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classOccurences.html#ad043cf177d5be5d87a2a62a4e5411cb2">hasOutDelayOccurences</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">true if has occurences outside a a delay <a href="#ad043cf177d5be5d87a2a62a4e5411cb2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classOccurences.html#ae7a8f070a5ad9597882c9e813b801cd7">getMaxDelay</a> () const </td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">return the maximal delay collected <a href="#ae7a8f070a5ad9597882c9e813b801cd7"></a><br/></td></tr> <tr><td colspan="2"><h2>Private Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classOccurences.html#a34f4e09ff035cc3fc4b2ed431b2773f0">fXVariability</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Extended Variability of the expression. <a href="#a34f4e09ff035cc3fc4b2ed431b2773f0"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classOccurences.html#a7c988ced4671d9971328b3f9242999b4">fOccurences</a> [4]</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classOccurences.html">Occurences</a> count according to Contexts. <a href="#a7c988ced4671d9971328b3f9242999b4"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classOccurences.html#a8617374c061522669b4b9edb767ec64a">fMultiOcc</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">True when exp has multiple occ. or occ. in higher ctxt. <a href="#a8617374c061522669b4b9edb767ec64a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classOccurences.html#ae5688d450d44601d55818bc9f149acf1">fOutDelayOcc</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">True when exp has at least one occ. outside a delay. <a href="#ae5688d450d44601d55818bc9f149acf1"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classOccurences.html#ad39c05f110ace7adca36524daf89161f">fMaxDelay</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Maximal fix delay usage. <a href="#ad39c05f110ace7adca36524daf89161f"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>Definition at line <a class="el" href="occurences_8hh_source.html#l00007">7</a> of file <a class="el" href="occurences_8hh_source.html">occurences.hh</a>.</p> <hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a4a5c6d16406d9646c02c3df7309bead6"></a><!-- doxytag: member="Occurences::Occurences" ref="a4a5c6d16406d9646c02c3df7309bead6" args="(int v, int r)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Occurences::Occurences </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>v</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>r</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="occurences_8cpp_source.html#l00027">27</a> of file <a class="el" href="occurences_8cpp_source.html">occurences.cpp</a>.</p> <p>References <a class="el" href="occurences_8hh_source.html#l00013">fMaxDelay</a>, <a class="el" href="occurences_8hh_source.html#l00011">fMultiOcc</a>, <a class="el" href="occurences_8hh_source.html#l00010">fOccurences</a>, and <a class="el" href="occurences_8hh_source.html#l00012">fOutDelayOcc</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00027"></a>00027 : <a class="code" href="classOccurences.html#a34f4e09ff035cc3fc4b2ed431b2773f0" title="Extended Variability of the expression.">fXVariability</a>(<a class="code" href="occurences_8cpp.html#a2f6322a763105adcb9cefcf365d6769f" title="Extended Variability with recursiveness indication.">xVariability</a>(v,r)) { <a name="l00028"></a>00028 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0; i<4; i++) <a class="code" href="classOccurences.html#a7c988ced4671d9971328b3f9242999b4" title="Occurences count according to Contexts.">fOccurences</a>[i]=0; <a name="l00029"></a>00029 <a class="code" href="classOccurences.html#a8617374c061522669b4b9edb767ec64a" title="True when exp has multiple occ. or occ. in higher ctxt.">fMultiOcc</a> = <span class="keyword">false</span>; <a name="l00030"></a>00030 <a class="code" href="classOccurences.html#ad39c05f110ace7adca36524daf89161f" title="Maximal fix delay usage.">fMaxDelay</a> = 0; <a name="l00031"></a>00031 <a class="code" href="classOccurences.html#ae5688d450d44601d55818bc9f149acf1" title="True when exp has at least one occ. outside a delay.">fOutDelayOcc</a> = <span class="keyword">false</span>; <a name="l00032"></a>00032 } </pre></div></p> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="ae7a8f070a5ad9597882c9e813b801cd7"></a><!-- doxytag: member="Occurences::getMaxDelay" ref="ae7a8f070a5ad9597882c9e813b801cd7" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int Occurences::getMaxDelay </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>return the maximal delay collected </p> <p>Definition at line <a class="el" href="occurences_8cpp_source.html#l00054">54</a> of file <a class="el" href="occurences_8cpp_source.html">occurences.cpp</a>.</p> <p>References <a class="el" href="occurences_8hh_source.html#l00013">fMaxDelay</a>.</p> <p>Referenced by <a class="el" href="doc__compile_8cpp_source.html#l00521">DocCompiler::generateCacheCode()</a>, <a class="el" href="compile__vect_8cpp_source.html#l00155">VectorCompiler::generateCacheCode()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00410">ScalarCompiler::generateCacheCode()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00298">DocCompiler::generateFConst()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00313">ScalarCompiler::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">ScalarCompiler::generateFixDelay()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00323">DocCompiler::generateFVar()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00332">ScalarCompiler::generateFVar()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00278">DocCompiler::generateNumber()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00295">ScalarCompiler::generateNumber()</a>, <a class="el" href="doc__compile_8cpp_source.html#l00902">DocCompiler::generateRec()</a>, <a class="el" href="compile__scal_8cpp_source.html#l00783">ScalarCompiler::generateRec()</a>, and <a class="el" href="compile__vect_8cpp_source.html#l00218">VectorCompiler::needSeparateLoop()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00055"></a>00055 { <a name="l00056"></a>00056 <span class="keywordflow">return</span> <a class="code" href="classOccurences.html#ad39c05f110ace7adca36524daf89161f" title="Maximal fix delay usage.">fMaxDelay</a>; <a name="l00057"></a>00057 } </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="a31447fb0c41844e179c3721fe1882be8"></a><!-- doxytag: member="Occurences::hasMultiOccurences" ref="a31447fb0c41844e179c3721fe1882be8" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Occurences::hasMultiOccurences </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>true if multiple occurences or occ. in higher ctxt </p> <p>Definition at line <a class="el" href="occurences_8cpp_source.html#l00050">50</a> of file <a class="el" href="occurences_8cpp_source.html">occurences.cpp</a>.</p> <p>References <a class="el" href="occurences_8hh_source.html#l00011">fMultiOcc</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00050"></a>00050 { <span class="keywordflow">return</span> <a class="code" href="classOccurences.html#a8617374c061522669b4b9edb767ec64a" title="True when exp has multiple occ. or occ. in higher ctxt.">fMultiOcc</a>; } </pre></div></p> </div> </div> <a class="anchor" id="ad043cf177d5be5d87a2a62a4e5411cb2"></a><!-- doxytag: member="Occurences::hasOutDelayOccurences" ref="ad043cf177d5be5d87a2a62a4e5411cb2" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Occurences::hasOutDelayOccurences </td> <td>(</td> <td class="paramname"></td> <td> ) </td> <td> const</td> </tr> </table> </div> <div class="memdoc"> <p>true if has occurences outside a a delay </p> <p>Definition at line <a class="el" href="occurences_8cpp_source.html#l00052">52</a> of file <a class="el" href="occurences_8cpp_source.html">occurences.cpp</a>.</p> <p>References <a class="el" href="occurences_8hh_source.html#l00012">fOutDelayOcc</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00052"></a>00052 { <span class="keywordflow">return</span> <a class="code" href="classOccurences.html#ae5688d450d44601d55818bc9f149acf1" title="True when exp has at least one occ. outside a delay.">fOutDelayOcc</a>; } </pre></div></p> </div> </div> <a class="anchor" id="ae8c2ebe876a58caa0f4868f0eb531a20"></a><!-- doxytag: member="Occurences::incOccurences" ref="ae8c2ebe876a58caa0f4868f0eb531a20" args="(int v, int r, int d)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classOccurences.html">Occurences</a> * Occurences::incOccurences </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>v</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>r</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>d</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>inc occurences in context v,r,d </p> <p>Definition at line <a class="el" href="occurences_8cpp_source.html#l00034">34</a> of file <a class="el" href="occurences_8cpp_source.html">occurences.cpp</a>.</p> <p>References <a class="el" href="occurences_8hh_source.html#l00013">fMaxDelay</a>, <a class="el" href="occurences_8hh_source.html#l00011">fMultiOcc</a>, <a class="el" href="occurences_8hh_source.html#l00010">fOccurences</a>, <a class="el" href="occurences_8hh_source.html#l00012">fOutDelayOcc</a>, <a class="el" href="occurences_8hh_source.html#l00009">fXVariability</a>, and <a class="el" href="occurences_8cpp_source.html#l00014">xVariability()</a>.</p> <p>Referenced by <a class="el" href="occurences_8cpp_source.html#l00095">OccMarkup::incOcc()</a>.</p> <p><div class="fragment"><pre class="fragment"><a name="l00034"></a>00034 { <a name="l00035"></a>00035 <span class="keywordtype">int</span> ctxt = <a class="code" href="occurences_8cpp.html#a2f6322a763105adcb9cefcf365d6769f" title="Extended Variability with recursiveness indication.">xVariability</a>(v,r); <a name="l00036"></a>00036 <span class="comment">//assert (ctxt >= fXVariability);</span> <a name="l00037"></a>00037 <a class="code" href="classOccurences.html#a7c988ced4671d9971328b3f9242999b4" title="Occurences count according to Contexts.">fOccurences</a>[ctxt] += 1; <a name="l00038"></a>00038 <a class="code" href="classOccurences.html#a8617374c061522669b4b9edb767ec64a" title="True when exp has multiple occ. or occ. in higher ctxt.">fMultiOcc</a> = <a class="code" href="classOccurences.html#a8617374c061522669b4b9edb767ec64a" title="True when exp has multiple occ. or occ. in higher ctxt.">fMultiOcc</a> | (ctxt > <a class="code" href="classOccurences.html#a34f4e09ff035cc3fc4b2ed431b2773f0" title="Extended Variability of the expression.">fXVariability</a>) | (<a class="code" href="classOccurences.html#a7c988ced4671d9971328b3f9242999b4" title="Occurences count according to Contexts.">fOccurences</a>[ctxt] > 1); <a name="l00039"></a>00039 <span class="keywordflow">if</span> (d == 0) { <a name="l00040"></a>00040 <span class="comment">//cerr << "Occurence outside a delay " << endl;</span> <a name="l00041"></a>00041 <a class="code" href="classOccurences.html#ae5688d450d44601d55818bc9f149acf1" title="True when exp has at least one occ. outside a delay.">fOutDelayOcc</a> = <span class="keyword">true</span>; <a name="l00042"></a>00042 } <a name="l00043"></a>00043 <span class="keywordflow">if</span> (d > <a class="code" href="classOccurences.html#ad39c05f110ace7adca36524daf89161f" title="Maximal fix delay usage.">fMaxDelay</a>) { <a name="l00044"></a>00044 <span class="comment">//cerr << "Max delay : " << fMaxDelay << " <- " << d << endl;</span> <a name="l00045"></a>00045 <a class="code" href="classOccurences.html#ad39c05f110ace7adca36524daf89161f" title="Maximal fix delay usage.">fMaxDelay</a> = d; <a name="l00046"></a>00046 } <a name="l00047"></a>00047 <span class="keywordflow">return</span> <span class="keyword">this</span>; <a name="l00048"></a>00048 } </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="ad39c05f110ace7adca36524daf89161f"></a><!-- doxytag: member="Occurences::fMaxDelay" ref="ad39c05f110ace7adca36524daf89161f" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="classOccurences.html#ad39c05f110ace7adca36524daf89161f">Occurences::fMaxDelay</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Maximal fix delay usage. </p> <p>Definition at line <a class="el" href="occurences_8hh_source.html#l00013">13</a> of file <a class="el" href="occurences_8hh_source.html">occurences.hh</a>.</p> <p>Referenced by <a class="el" href="occurences_8cpp_source.html#l00054">getMaxDelay()</a>, <a class="el" href="occurences_8cpp_source.html#l00034">incOccurences()</a>, and <a class="el" href="occurences_8cpp_source.html#l00027">Occurences()</a>.</p> </div> </div> <a class="anchor" id="a8617374c061522669b4b9edb767ec64a"></a><!-- doxytag: member="Occurences::fMultiOcc" ref="a8617374c061522669b4b9edb767ec64a" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool <a class="el" href="classOccurences.html#a8617374c061522669b4b9edb767ec64a">Occurences::fMultiOcc</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>True when exp has multiple occ. or occ. in higher ctxt. </p> <p>Definition at line <a class="el" href="occurences_8hh_source.html#l00011">11</a> of file <a class="el" href="occurences_8hh_source.html">occurences.hh</a>.</p> <p>Referenced by <a class="el" href="occurences_8cpp_source.html#l00050">hasMultiOccurences()</a>, <a class="el" href="occurences_8cpp_source.html#l00034">incOccurences()</a>, and <a class="el" href="occurences_8cpp_source.html#l00027">Occurences()</a>.</p> </div> </div> <a class="anchor" id="a7c988ced4671d9971328b3f9242999b4"></a><!-- doxytag: member="Occurences::fOccurences" ref="a7c988ced4671d9971328b3f9242999b4" args="[4]" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="classOccurences.html#a7c988ced4671d9971328b3f9242999b4">Occurences::fOccurences</a>[4]<code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p><a class="el" href="classOccurences.html">Occurences</a> count according to Contexts. </p> <p>Definition at line <a class="el" href="occurences_8hh_source.html#l00010">10</a> of file <a class="el" href="occurences_8hh_source.html">occurences.hh</a>.</p> <p>Referenced by <a class="el" href="occurences_8cpp_source.html#l00034">incOccurences()</a>, and <a class="el" href="occurences_8cpp_source.html#l00027">Occurences()</a>.</p> </div> </div> <a class="anchor" id="ae5688d450d44601d55818bc9f149acf1"></a><!-- doxytag: member="Occurences::fOutDelayOcc" ref="ae5688d450d44601d55818bc9f149acf1" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool <a class="el" href="classOccurences.html#ae5688d450d44601d55818bc9f149acf1">Occurences::fOutDelayOcc</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>True when exp has at least one occ. outside a delay. </p> <p>Definition at line <a class="el" href="occurences_8hh_source.html#l00012">12</a> of file <a class="el" href="occurences_8hh_source.html">occurences.hh</a>.</p> <p>Referenced by <a class="el" href="occurences_8cpp_source.html#l00052">hasOutDelayOccurences()</a>, <a class="el" href="occurences_8cpp_source.html#l00034">incOccurences()</a>, and <a class="el" href="occurences_8cpp_source.html#l00027">Occurences()</a>.</p> </div> </div> <a class="anchor" id="a34f4e09ff035cc3fc4b2ed431b2773f0"></a><!-- doxytag: member="Occurences::fXVariability" ref="a34f4e09ff035cc3fc4b2ed431b2773f0" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const int <a class="el" href="classOccurences.html#a34f4e09ff035cc3fc4b2ed431b2773f0">Occurences::fXVariability</a><code> [private]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Extended Variability of the expression. </p> <p>Definition at line <a class="el" href="occurences_8hh_source.html#l00009">9</a> of file <a class="el" href="occurences_8hh_source.html">occurences.hh</a>.</p> <p>Referenced by <a class="el" href="occurences_8cpp_source.html#l00034">incOccurences()</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following files:<ul> <li><a class="el" href="occurences_8hh_source.html">occurences.hh</a></li> <li><a class="el" href="occurences_8cpp_source.html">occurences.cpp</a></li> </ul> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Apr 29 00:00:21 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>