Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 6 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 7 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 8 | <title>ArmNN: MockStreamCounterBuffer Class Reference</title> |
| 9 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 10 | <script type="text/javascript" src="jquery.js"></script> |
| 11 | <script type="text/javascript" src="dynsections.js"></script> |
| 12 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 13 | <script type="text/javascript" src="resize.js"></script> |
| 14 | <script type="text/javascript" src="navtreedata.js"></script> |
| 15 | <script type="text/javascript" src="navtree.js"></script> |
| 16 | <script type="text/javascript"> |
| 17 | $(document).ready(initResizable); |
| 18 | </script> |
| 19 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 20 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 21 | <script type="text/javascript" src="search/search.js"></script> |
| 22 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 23 | </head> |
| 24 | <body> |
| 25 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 26 | <div id="titlearea"> |
| 27 | <table cellspacing="0" cellpadding="0"> |
| 28 | <tbody> |
| 29 | <tr style="height: 56px;"> |
| 30 | <td id="projectalign" style="padding-left: 0.5em;"> |
| 31 | <div id="projectname">ArmNN |
| 32 |  <span id="projectnumber">NotReleased</span> |
| 33 | </div> |
| 34 | </td> |
| 35 | </tr> |
| 36 | </tbody> |
| 37 | </table> |
| 38 | </div> |
| 39 | <!-- end header part --> |
| 40 | <!-- Generated by Doxygen 1.8.13 --> |
| 41 | <script type="text/javascript"> |
| 42 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 43 | </script> |
| 44 | <script type="text/javascript" src="menudata.js"></script> |
| 45 | <script type="text/javascript" src="menu.js"></script> |
| 46 | <script type="text/javascript"> |
| 47 | $(function() { |
| 48 | initMenu('',true,false,'search.php','Search'); |
| 49 | $(document).ready(function() { init_search(); }); |
| 50 | }); |
| 51 | </script> |
| 52 | <div id="main-nav"></div> |
| 53 | </div><!-- top --> |
| 54 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 55 | <div id="nav-tree"> |
| 56 | <div id="nav-tree-contents"> |
| 57 | <div id="nav-sync" class="sync"></div> |
| 58 | </div> |
| 59 | </div> |
| 60 | <div id="splitbar" style="-moz-user-select:none;" |
| 61 | class="ui-resizable-handle"> |
| 62 | </div> |
| 63 | </div> |
| 64 | <script type="text/javascript"> |
| 65 | $(document).ready(function(){initNavTree('classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html','');}); |
| 66 | </script> |
| 67 | <div id="doc-content"> |
| 68 | <!-- window showing the filter options --> |
| 69 | <div id="MSearchSelectWindow" |
| 70 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 71 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 72 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 73 | </div> |
| 74 | |
| 75 | <!-- iframe showing the search results (closed by default) --> |
| 76 | <div id="MSearchResultsWindow"> |
| 77 | <iframe src="javascript:void(0)" frameborder="0" |
| 78 | name="MSearchResults" id="MSearchResults"> |
| 79 | </iframe> |
| 80 | </div> |
| 81 | |
| 82 | <div class="header"> |
| 83 | <div class="summary"> |
| 84 | <a href="#pub-methods">Public Member Functions</a> | |
| 85 | <a href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer-members.html">List of all members</a> </div> |
| 86 | <div class="headertitle"> |
| 87 | <div class="title">MockStreamCounterBuffer Class Reference</div> </div> |
| 88 | </div><!--header--> |
| 89 | <div class="contents"> |
| 90 | |
| 91 | <p><code>#include <<a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>></code></p> |
| 92 | <div class="dynheader"> |
| 93 | Inheritance diagram for MockStreamCounterBuffer:</div> |
| 94 | <div class="dyncontent"> |
| 95 | <div class="center"> |
| 96 | <img src="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.png" usemap="#MockStreamCounterBuffer_map" alt=""/> |
| 97 | <map id="MockStreamCounterBuffer_map" name="MockStreamCounterBuffer_map"> |
| 98 | <area href="classarmnn_1_1profiling_1_1_i_buffer_manager.html" alt="IBufferManager" shape="rect" coords="0,0,162,24"/> |
| 99 | </map> |
| 100 | </div></div> |
| 101 | <table class="memberdecls"> |
| 102 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| 103 | Public Member Functions</h2></td></tr> |
| 104 | <tr class="memitem:add78c1a7dbde9d871b4193345e250d96"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#add78c1a7dbde9d871b4193345e250d96">MockStreamCounterBuffer</a> (unsigned int maxBufferSize=4096)</td></tr> |
| 105 | <tr class="separator:add78c1a7dbde9d871b4193345e250d96"><td class="memSeparator" colspan="2"> </td></tr> |
| 106 | <tr class="memitem:a7e55485c728365ea5d8bd9968cf45356"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#a7e55485c728365ea5d8bd9968cf45356">~MockStreamCounterBuffer</a> ()</td></tr> |
| 107 | <tr class="separator:a7e55485c728365ea5d8bd9968cf45356"><td class="memSeparator" colspan="2"> </td></tr> |
| 108 | <tr class="memitem:ac3f43b4dd3fafd6b13342acc2263bbb4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearmnn_1_1profiling.html#a14328d977cec3abadcfd5935f04f3409">IPacketBufferPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#ac3f43b4dd3fafd6b13342acc2263bbb4">Reserve</a> (unsigned int requestedSize, unsigned int &reservedSize) override</td></tr> |
| 109 | <tr class="separator:ac3f43b4dd3fafd6b13342acc2263bbb4"><td class="memSeparator" colspan="2"> </td></tr> |
| 110 | <tr class="memitem:a183eaa37ccd326bd82179bed901c7122"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#a183eaa37ccd326bd82179bed901c7122">Commit</a> (<a class="el" href="namespacearmnn_1_1profiling.html#a14328d977cec3abadcfd5935f04f3409">IPacketBufferPtr</a> &packetBuffer, unsigned int size, bool notifyConsumer=<a class="el" href="_ref_layer_tests_8cpp.html#a37f1c3ccc9fc906be85185350dd83d48">true</a>) override</td></tr> |
| 111 | <tr class="separator:a183eaa37ccd326bd82179bed901c7122"><td class="memSeparator" colspan="2"> </td></tr> |
| 112 | <tr class="memitem:a226108649851aa1b1a8168560c5228b5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#a226108649851aa1b1a8168560c5228b5">Release</a> (<a class="el" href="namespacearmnn_1_1profiling.html#a14328d977cec3abadcfd5935f04f3409">IPacketBufferPtr</a> &packetBuffer) override</td></tr> |
| 113 | <tr class="separator:a226108649851aa1b1a8168560c5228b5"><td class="memSeparator" colspan="2"> </td></tr> |
| 114 | <tr class="memitem:abce8709dc1b666a26f427ba7ff08b737"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearmnn_1_1profiling.html#a14328d977cec3abadcfd5935f04f3409">IPacketBufferPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#abce8709dc1b666a26f427ba7ff08b737">GetReadableBuffer</a> () override</td></tr> |
| 115 | <tr class="separator:abce8709dc1b666a26f427ba7ff08b737"><td class="memSeparator" colspan="2"> </td></tr> |
| 116 | <tr class="memitem:ae717263b3243e9f88f4caea6d31b0652"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#ae717263b3243e9f88f4caea6d31b0652">MarkRead</a> (<a class="el" href="namespacearmnn_1_1profiling.html#a14328d977cec3abadcfd5935f04f3409">IPacketBufferPtr</a> &packetBuffer) override</td></tr> |
| 117 | <tr class="separator:ae717263b3243e9f88f4caea6d31b0652"><td class="memSeparator" colspan="2"> </td></tr> |
| 118 | <tr class="memitem:ad675ff4e9053375bd41d0aad6b3bbb63"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#ad675ff4e9053375bd41d0aad6b3bbb63">SetConsumer</a> (<a class="el" href="classarmnn_1_1profiling_1_1_i_consumer.html">IConsumer</a> *consumer) override</td></tr> |
| 119 | <tr class="separator:ad675ff4e9053375bd41d0aad6b3bbb63"><td class="memSeparator" colspan="2"> </td></tr> |
| 120 | <tr class="memitem:af22fdc7450c285c4d7449425c8fe994f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#af22fdc7450c285c4d7449425c8fe994f">FlushReadList</a> () override</td></tr> |
| 121 | <tr class="separator:af22fdc7450c285c4d7449425c8fe994f"><td class="memSeparator" colspan="2"> </td></tr> |
| 122 | <tr class="memitem:a0a0b47bcd9b2b00de2c82761705cfd58"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#a0a0b47bcd9b2b00de2c82761705cfd58">GetCommittedSize</a> () const</td></tr> |
| 123 | <tr class="separator:a0a0b47bcd9b2b00de2c82761705cfd58"><td class="memSeparator" colspan="2"> </td></tr> |
| 124 | <tr class="memitem:ab158e7cd554e5f65e77bad0c4d448474"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#ab158e7cd554e5f65e77bad0c4d448474">GetReadableSize</a> () const</td></tr> |
| 125 | <tr class="separator:ab158e7cd554e5f65e77bad0c4d448474"><td class="memSeparator" colspan="2"> </td></tr> |
| 126 | <tr class="memitem:a7233f6a0ab843a226dc07c72edd76168"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#a7233f6a0ab843a226dc07c72edd76168">GetReadSize</a> () const</td></tr> |
| 127 | <tr class="separator:a7233f6a0ab843a226dc07c72edd76168"><td class="memSeparator" colspan="2"> </td></tr> |
| 128 | <tr class="inherit_header pub_methods_classarmnn_1_1profiling_1_1_i_buffer_manager"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarmnn_1_1profiling_1_1_i_buffer_manager')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classarmnn_1_1profiling_1_1_i_buffer_manager.html">IBufferManager</a></td></tr> |
| 129 | <tr class="memitem:a18c16b4ff70efb2663a4c4c1144babee inherit pub_methods_classarmnn_1_1profiling_1_1_i_buffer_manager"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_i_buffer_manager.html#a18c16b4ff70efb2663a4c4c1144babee">~IBufferManager</a> ()</td></tr> |
| 130 | <tr class="separator:a18c16b4ff70efb2663a4c4c1144babee inherit pub_methods_classarmnn_1_1profiling_1_1_i_buffer_manager"><td class="memSeparator" colspan="2"> </td></tr> |
| 131 | </table> |
| 132 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 133 | <div class="textblock"> |
| 134 | <p class="definition">Definition at line <a class="el" href="_profiling_mocks_8hpp_source.html#l00273">273</a> of file <a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>.</p> |
| 135 | </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 136 | <a id="add78c1a7dbde9d871b4193345e250d96"></a> |
| 137 | <h2 class="memtitle"><span class="permalink"><a href="#add78c1a7dbde9d871b4193345e250d96">◆ </a></span>MockStreamCounterBuffer()</h2> |
| 138 | |
| 139 | <div class="memitem"> |
| 140 | <div class="memproto"> |
| 141 | <table class="mlabels"> |
| 142 | <tr> |
| 143 | <td class="mlabels-left"> |
| 144 | <table class="memname"> |
| 145 | <tr> |
| 146 | <td class="memname"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html">MockStreamCounterBuffer</a> </td> |
| 147 | <td>(</td> |
| 148 | <td class="paramtype">unsigned int </td> |
| 149 | <td class="paramname"><em>maxBufferSize</em> = <code>4096</code></td><td>)</td> |
| 150 | <td></td> |
| 151 | </tr> |
| 152 | </table> |
| 153 | </td> |
| 154 | <td class="mlabels-right"> |
| 155 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 156 | </tr> |
| 157 | </table> |
| 158 | </div><div class="memdoc"> |
| 159 | |
| 160 | <p class="definition">Definition at line <a class="el" href="_profiling_mocks_8hpp_source.html#l00276">276</a> of file <a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>.</p> |
| 161 | <div class="fragment"><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  : m_MaxBufferSize(maxBufferSize)</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  , m_BufferList()</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  , m_CommittedSize(0)</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  , m_ReadableSize(0)</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  , m_ReadSize(0)</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  {}</div></div><!-- fragment --> |
| 162 | </div> |
| 163 | </div> |
| 164 | <a id="a7e55485c728365ea5d8bd9968cf45356"></a> |
| 165 | <h2 class="memtitle"><span class="permalink"><a href="#a7e55485c728365ea5d8bd9968cf45356">◆ </a></span>~MockStreamCounterBuffer()</h2> |
| 166 | |
| 167 | <div class="memitem"> |
| 168 | <div class="memproto"> |
| 169 | <table class="mlabels"> |
| 170 | <tr> |
| 171 | <td class="mlabels-left"> |
| 172 | <table class="memname"> |
| 173 | <tr> |
| 174 | <td class="memname">~<a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html">MockStreamCounterBuffer</a> </td> |
| 175 | <td>(</td> |
| 176 | <td class="paramname"></td><td>)</td> |
| 177 | <td></td> |
| 178 | </tr> |
| 179 | </table> |
| 180 | </td> |
| 181 | <td class="mlabels-right"> |
| 182 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 183 | </tr> |
| 184 | </table> |
| 185 | </div><div class="memdoc"> |
| 186 | |
| 187 | <p class="definition">Definition at line <a class="el" href="_profiling_mocks_8hpp_source.html#l00283">283</a> of file <a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>.</p> |
| 188 | <div class="fragment"><div class="line"><a name="l00283"></a><span class="lineno"> 283</span> {}</div></div><!-- fragment --> |
| 189 | </div> |
| 190 | </div> |
| 191 | <h2 class="groupheader">Member Function Documentation</h2> |
| 192 | <a id="a183eaa37ccd326bd82179bed901c7122"></a> |
| 193 | <h2 class="memtitle"><span class="permalink"><a href="#a183eaa37ccd326bd82179bed901c7122">◆ </a></span>Commit()</h2> |
| 194 | |
| 195 | <div class="memitem"> |
| 196 | <div class="memproto"> |
| 197 | <table class="mlabels"> |
| 198 | <tr> |
| 199 | <td class="mlabels-left"> |
| 200 | <table class="memname"> |
| 201 | <tr> |
| 202 | <td class="memname">void Commit </td> |
| 203 | <td>(</td> |
| 204 | <td class="paramtype"><a class="el" href="namespacearmnn_1_1profiling.html#a14328d977cec3abadcfd5935f04f3409">IPacketBufferPtr</a> & </td> |
| 205 | <td class="paramname"><em>packetBuffer</em>, </td> |
| 206 | </tr> |
| 207 | <tr> |
| 208 | <td class="paramkey"></td> |
| 209 | <td></td> |
| 210 | <td class="paramtype">unsigned int </td> |
| 211 | <td class="paramname"><em>size</em>, </td> |
| 212 | </tr> |
| 213 | <tr> |
| 214 | <td class="paramkey"></td> |
| 215 | <td></td> |
| 216 | <td class="paramtype">bool </td> |
| 217 | <td class="paramname"><em>notifyConsumer</em> = <code><a class="el" href="_ref_layer_tests_8cpp.html#a37f1c3ccc9fc906be85185350dd83d48">true</a></code> </td> |
| 218 | </tr> |
| 219 | <tr> |
| 220 | <td></td> |
| 221 | <td>)</td> |
| 222 | <td></td><td></td> |
| 223 | </tr> |
| 224 | </table> |
| 225 | </td> |
| 226 | <td class="mlabels-right"> |
| 227 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 228 | </tr> |
| 229 | </table> |
| 230 | </div><div class="memdoc"> |
| 231 | |
| 232 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_buffer_manager.html#ad0faa8a317506b2e72252f087c7f3c46">IBufferManager</a>.</p> |
| 233 | |
| 234 | <p class="definition">Definition at line <a class="el" href="_profiling_mocks_8hpp_source.html#l00299">299</a> of file <a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>.</p> |
| 235 | <div class="fragment"><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  {</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  std::lock_guard<std::mutex> lock(m_Mutex);</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span> </div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  packetBuffer->Commit(size);</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  m_BufferList.push_back(std::move(packetBuffer));</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  m_CommittedSize += size;</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span> </div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="keywordflow">if</span> (notifyConsumer)</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  {</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  <a class="code" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#af22fdc7450c285c4d7449425c8fe994f">FlushReadList</a>();</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  }</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  }</div><div class="ttc" id="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer_html_af22fdc7450c285c4d7449425c8fe994f"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html#af22fdc7450c285c4d7449425c8fe994f">armnn::profiling::MockStreamCounterBuffer::FlushReadList</a></div><div class="ttdeci">void FlushReadList() override</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_mocks_8hpp_source.html#l00350">ProfilingMocks.hpp:350</a></div></div> |
| 236 | </div><!-- fragment --> |
| 237 | </div> |
| 238 | </div> |
| 239 | <a id="af22fdc7450c285c4d7449425c8fe994f"></a> |
| 240 | <h2 class="memtitle"><span class="permalink"><a href="#af22fdc7450c285c4d7449425c8fe994f">◆ </a></span>FlushReadList()</h2> |
| 241 | |
| 242 | <div class="memitem"> |
| 243 | <div class="memproto"> |
| 244 | <table class="mlabels"> |
| 245 | <tr> |
| 246 | <td class="mlabels-left"> |
| 247 | <table class="memname"> |
| 248 | <tr> |
| 249 | <td class="memname">void FlushReadList </td> |
| 250 | <td>(</td> |
| 251 | <td class="paramname"></td><td>)</td> |
| 252 | <td></td> |
| 253 | </tr> |
| 254 | </table> |
| 255 | </td> |
| 256 | <td class="mlabels-right"> |
| 257 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 258 | </tr> |
| 259 | </table> |
| 260 | </div><div class="memdoc"> |
| 261 | |
| 262 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_buffer_manager.html#abb12c72b032fda64ab5a596f5e49fc56">IBufferManager</a>.</p> |
| 263 | |
| 264 | <p class="definition">Definition at line <a class="el" href="_profiling_mocks_8hpp_source.html#l00350">350</a> of file <a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>.</p> |
| 265 | <div class="fragment"><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  {</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  <span class="comment">// notify consumer that packet is ready to read</span></div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <span class="keywordflow">if</span> (m_Consumer != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  {</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  m_Consumer-><a class="code" href="classarmnn_1_1profiling_1_1_i_consumer.html#a4b4fe1cfea0198d9defd88178f073365">SetReadyToRead</a>();</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  }</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  }</div><div class="ttc" id="classarmnn_1_1profiling_1_1_i_consumer_html_a4b4fe1cfea0198d9defd88178f073365"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_i_consumer.html#a4b4fe1cfea0198d9defd88178f073365">armnn::profiling::IConsumer::SetReadyToRead</a></div><div class="ttdeci">virtual void SetReadyToRead()=0</div><div class="ttdoc">Set a "ready to read" flag in the buffer to notify the reading thread to start reading it...</div></div> |
| 266 | </div><!-- fragment --> |
| 267 | </div> |
| 268 | </div> |
| 269 | <a id="a0a0b47bcd9b2b00de2c82761705cfd58"></a> |
| 270 | <h2 class="memtitle"><span class="permalink"><a href="#a0a0b47bcd9b2b00de2c82761705cfd58">◆ </a></span>GetCommittedSize()</h2> |
| 271 | |
| 272 | <div class="memitem"> |
| 273 | <div class="memproto"> |
| 274 | <table class="mlabels"> |
| 275 | <tr> |
| 276 | <td class="mlabels-left"> |
| 277 | <table class="memname"> |
| 278 | <tr> |
| 279 | <td class="memname">unsigned int GetCommittedSize </td> |
| 280 | <td>(</td> |
| 281 | <td class="paramname"></td><td>)</td> |
| 282 | <td> const</td> |
| 283 | </tr> |
| 284 | </table> |
| 285 | </td> |
| 286 | <td class="mlabels-right"> |
| 287 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 288 | </tr> |
| 289 | </table> |
| 290 | </div><div class="memdoc"> |
| 291 | |
| 292 | <p class="definition">Definition at line <a class="el" href="_profiling_mocks_8hpp_source.html#l00359">359</a> of file <a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>.</p> |
| 293 | |
| 294 | <p class="reference">Referenced by <a class="el" href="_send_counter_packet_tests_8cpp_source.html#l01791">BOOST_AUTO_TEST_CASE()</a>.</p> |
| 295 | <div class="fragment"><div class="line"><a name="l00359"></a><span class="lineno"> 359</span> { <span class="keywordflow">return</span> m_CommittedSize; }</div></div><!-- fragment --> |
| 296 | </div> |
| 297 | </div> |
| 298 | <a id="abce8709dc1b666a26f427ba7ff08b737"></a> |
| 299 | <h2 class="memtitle"><span class="permalink"><a href="#abce8709dc1b666a26f427ba7ff08b737">◆ </a></span>GetReadableBuffer()</h2> |
| 300 | |
| 301 | <div class="memitem"> |
| 302 | <div class="memproto"> |
| 303 | <table class="mlabels"> |
| 304 | <tr> |
| 305 | <td class="mlabels-left"> |
| 306 | <table class="memname"> |
| 307 | <tr> |
| 308 | <td class="memname"><a class="el" href="namespacearmnn_1_1profiling.html#a14328d977cec3abadcfd5935f04f3409">IPacketBufferPtr</a> GetReadableBuffer </td> |
| 309 | <td>(</td> |
| 310 | <td class="paramname"></td><td>)</td> |
| 311 | <td></td> |
| 312 | </tr> |
| 313 | </table> |
| 314 | </td> |
| 315 | <td class="mlabels-right"> |
| 316 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 317 | </tr> |
| 318 | </table> |
| 319 | </div><div class="memdoc"> |
| 320 | |
| 321 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_buffer_manager.html#acc2e97eddda6324261ba202634cc8ef8">IBufferManager</a>.</p> |
| 322 | |
| 323 | <p class="definition">Definition at line <a class="el" href="_profiling_mocks_8hpp_source.html#l00320">320</a> of file <a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>.</p> |
| 324 | <div class="fragment"><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  {</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  std::lock_guard<std::mutex> lock(m_Mutex);</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span> </div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  <span class="keywordflow">if</span> (m_BufferList.empty())</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  {</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  }</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  <a class="code" href="namespacearmnn_1_1profiling.html#a14328d977cec3abadcfd5935f04f3409">IPacketBufferPtr</a> buffer = std::move(m_BufferList.back());</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  m_BufferList.pop_back();</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  m_ReadableSize += buffer->GetSize();</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  <span class="keywordflow">return</span> buffer;</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  }</div><div class="ttc" id="namespacearmnn_1_1profiling_html_a14328d977cec3abadcfd5935f04f3409"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a14328d977cec3abadcfd5935f04f3409">armnn::profiling::IPacketBufferPtr</a></div><div class="ttdeci">std::unique_ptr< IPacketBuffer > IPacketBufferPtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_packet_buffer_8hpp_source.html#l00040">IPacketBuffer.hpp:40</a></div></div> |
| 325 | </div><!-- fragment --> |
| 326 | </div> |
| 327 | </div> |
| 328 | <a id="ab158e7cd554e5f65e77bad0c4d448474"></a> |
| 329 | <h2 class="memtitle"><span class="permalink"><a href="#ab158e7cd554e5f65e77bad0c4d448474">◆ </a></span>GetReadableSize()</h2> |
| 330 | |
| 331 | <div class="memitem"> |
| 332 | <div class="memproto"> |
| 333 | <table class="mlabels"> |
| 334 | <tr> |
| 335 | <td class="mlabels-left"> |
| 336 | <table class="memname"> |
| 337 | <tr> |
| 338 | <td class="memname">unsigned int GetReadableSize </td> |
| 339 | <td>(</td> |
| 340 | <td class="paramname"></td><td>)</td> |
| 341 | <td> const</td> |
| 342 | </tr> |
| 343 | </table> |
| 344 | </td> |
| 345 | <td class="mlabels-right"> |
| 346 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 347 | </tr> |
| 348 | </table> |
| 349 | </div><div class="memdoc"> |
| 350 | |
| 351 | <p class="definition">Definition at line <a class="el" href="_profiling_mocks_8hpp_source.html#l00360">360</a> of file <a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>.</p> |
| 352 | |
| 353 | <p class="reference">Referenced by <a class="el" href="_send_counter_packet_tests_8cpp_source.html#l01791">BOOST_AUTO_TEST_CASE()</a>.</p> |
| 354 | <div class="fragment"><div class="line"><a name="l00360"></a><span class="lineno"> 360</span> { <span class="keywordflow">return</span> m_ReadableSize; }</div></div><!-- fragment --> |
| 355 | </div> |
| 356 | </div> |
| 357 | <a id="a7233f6a0ab843a226dc07c72edd76168"></a> |
| 358 | <h2 class="memtitle"><span class="permalink"><a href="#a7233f6a0ab843a226dc07c72edd76168">◆ </a></span>GetReadSize()</h2> |
| 359 | |
| 360 | <div class="memitem"> |
| 361 | <div class="memproto"> |
| 362 | <table class="mlabels"> |
| 363 | <tr> |
| 364 | <td class="mlabels-left"> |
| 365 | <table class="memname"> |
| 366 | <tr> |
| 367 | <td class="memname">unsigned int GetReadSize </td> |
| 368 | <td>(</td> |
| 369 | <td class="paramname"></td><td>)</td> |
| 370 | <td> const</td> |
| 371 | </tr> |
| 372 | </table> |
| 373 | </td> |
| 374 | <td class="mlabels-right"> |
| 375 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 376 | </tr> |
| 377 | </table> |
| 378 | </div><div class="memdoc"> |
| 379 | |
| 380 | <p class="definition">Definition at line <a class="el" href="_profiling_mocks_8hpp_source.html#l00361">361</a> of file <a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>.</p> |
| 381 | |
| 382 | <p class="reference">Referenced by <a class="el" href="_send_counter_packet_tests_8cpp_source.html#l01791">BOOST_AUTO_TEST_CASE()</a>.</p> |
| 383 | <div class="fragment"><div class="line"><a name="l00361"></a><span class="lineno"> 361</span> { <span class="keywordflow">return</span> m_ReadSize; }</div></div><!-- fragment --> |
| 384 | </div> |
| 385 | </div> |
| 386 | <a id="ae717263b3243e9f88f4caea6d31b0652"></a> |
| 387 | <h2 class="memtitle"><span class="permalink"><a href="#ae717263b3243e9f88f4caea6d31b0652">◆ </a></span>MarkRead()</h2> |
| 388 | |
| 389 | <div class="memitem"> |
| 390 | <div class="memproto"> |
| 391 | <table class="mlabels"> |
| 392 | <tr> |
| 393 | <td class="mlabels-left"> |
| 394 | <table class="memname"> |
| 395 | <tr> |
| 396 | <td class="memname">void MarkRead </td> |
| 397 | <td>(</td> |
| 398 | <td class="paramtype"><a class="el" href="namespacearmnn_1_1profiling.html#a14328d977cec3abadcfd5935f04f3409">IPacketBufferPtr</a> & </td> |
| 399 | <td class="paramname"><em>packetBuffer</em></td><td>)</td> |
| 400 | <td></td> |
| 401 | </tr> |
| 402 | </table> |
| 403 | </td> |
| 404 | <td class="mlabels-right"> |
| 405 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 406 | </tr> |
| 407 | </table> |
| 408 | </div><div class="memdoc"> |
| 409 | |
| 410 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_buffer_manager.html#a033cae4e6d00fc1958f79f09216a3437">IBufferManager</a>.</p> |
| 411 | |
| 412 | <p class="definition">Definition at line <a class="el" href="_profiling_mocks_8hpp_source.html#l00334">334</a> of file <a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>.</p> |
| 413 | <div class="fragment"><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  {</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  std::lock_guard<std::mutex> lock(m_Mutex);</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span> </div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  m_ReadSize += packetBuffer->GetSize();</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  packetBuffer->MarkRead();</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  }</div></div><!-- fragment --> |
| 414 | </div> |
| 415 | </div> |
| 416 | <a id="a226108649851aa1b1a8168560c5228b5"></a> |
| 417 | <h2 class="memtitle"><span class="permalink"><a href="#a226108649851aa1b1a8168560c5228b5">◆ </a></span>Release()</h2> |
| 418 | |
| 419 | <div class="memitem"> |
| 420 | <div class="memproto"> |
| 421 | <table class="mlabels"> |
| 422 | <tr> |
| 423 | <td class="mlabels-left"> |
| 424 | <table class="memname"> |
| 425 | <tr> |
| 426 | <td class="memname">void Release </td> |
| 427 | <td>(</td> |
| 428 | <td class="paramtype"><a class="el" href="namespacearmnn_1_1profiling.html#a14328d977cec3abadcfd5935f04f3409">IPacketBufferPtr</a> & </td> |
| 429 | <td class="paramname"><em>packetBuffer</em></td><td>)</td> |
| 430 | <td></td> |
| 431 | </tr> |
| 432 | </table> |
| 433 | </td> |
| 434 | <td class="mlabels-right"> |
| 435 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 436 | </tr> |
| 437 | </table> |
| 438 | </div><div class="memdoc"> |
| 439 | |
| 440 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_buffer_manager.html#a3712fbb9506d016ac2ed7d56b8788a16">IBufferManager</a>.</p> |
| 441 | |
| 442 | <p class="definition">Definition at line <a class="el" href="_profiling_mocks_8hpp_source.html#l00313">313</a> of file <a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>.</p> |
| 443 | <div class="fragment"><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  {</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  std::lock_guard<std::mutex> lock(m_Mutex);</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span> </div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  packetBuffer->Release();</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  }</div></div><!-- fragment --> |
| 444 | </div> |
| 445 | </div> |
| 446 | <a id="ac3f43b4dd3fafd6b13342acc2263bbb4"></a> |
| 447 | <h2 class="memtitle"><span class="permalink"><a href="#ac3f43b4dd3fafd6b13342acc2263bbb4">◆ </a></span>Reserve()</h2> |
| 448 | |
| 449 | <div class="memitem"> |
| 450 | <div class="memproto"> |
| 451 | <table class="mlabels"> |
| 452 | <tr> |
| 453 | <td class="mlabels-left"> |
| 454 | <table class="memname"> |
| 455 | <tr> |
| 456 | <td class="memname"><a class="el" href="namespacearmnn_1_1profiling.html#a14328d977cec3abadcfd5935f04f3409">IPacketBufferPtr</a> Reserve </td> |
| 457 | <td>(</td> |
| 458 | <td class="paramtype">unsigned int </td> |
| 459 | <td class="paramname"><em>requestedSize</em>, </td> |
| 460 | </tr> |
| 461 | <tr> |
| 462 | <td class="paramkey"></td> |
| 463 | <td></td> |
| 464 | <td class="paramtype">unsigned int & </td> |
| 465 | <td class="paramname"><em>reservedSize</em> </td> |
| 466 | </tr> |
| 467 | <tr> |
| 468 | <td></td> |
| 469 | <td>)</td> |
| 470 | <td></td><td></td> |
| 471 | </tr> |
| 472 | </table> |
| 473 | </td> |
| 474 | <td class="mlabels-right"> |
| 475 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 476 | </tr> |
| 477 | </table> |
| 478 | </div><div class="memdoc"> |
| 479 | |
| 480 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_buffer_manager.html#a49c88b0e052621f30462c3bdbf3e4a7a">IBufferManager</a>.</p> |
| 481 | |
| 482 | <p class="definition">Definition at line <a class="el" href="_profiling_mocks_8hpp_source.html#l00285">285</a> of file <a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>.</p> |
| 483 | <div class="fragment"><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  {</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  std::lock_guard<std::mutex> lock(m_Mutex);</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span> </div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  reservedSize = 0;</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="keywordflow">if</span> (requestedSize > m_MaxBufferSize)</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  {</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_invalid_argument_exception.html">armnn::InvalidArgumentException</a>(<span class="stringliteral">"The maximum buffer size that can be requested is ["</span> +</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  std::to_string(m_MaxBufferSize) + <span class="stringliteral">"] bytes"</span>);</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  }</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  reservedSize = requestedSize;</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <span class="keywordflow">return</span> std::make_unique<MockPacketBuffer>(requestedSize);</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  }</div><div class="ttc" id="classarmnn_1_1_invalid_argument_exception_html"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.html">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00080">Exceptions.hpp:80</a></div></div> |
| 484 | </div><!-- fragment --> |
| 485 | </div> |
| 486 | </div> |
| 487 | <a id="ad675ff4e9053375bd41d0aad6b3bbb63"></a> |
| 488 | <h2 class="memtitle"><span class="permalink"><a href="#ad675ff4e9053375bd41d0aad6b3bbb63">◆ </a></span>SetConsumer()</h2> |
| 489 | |
| 490 | <div class="memitem"> |
| 491 | <div class="memproto"> |
| 492 | <table class="mlabels"> |
| 493 | <tr> |
| 494 | <td class="mlabels-left"> |
| 495 | <table class="memname"> |
| 496 | <tr> |
| 497 | <td class="memname">void SetConsumer </td> |
| 498 | <td>(</td> |
| 499 | <td class="paramtype"><a class="el" href="classarmnn_1_1profiling_1_1_i_consumer.html">IConsumer</a> * </td> |
| 500 | <td class="paramname"><em>consumer</em></td><td>)</td> |
| 501 | <td></td> |
| 502 | </tr> |
| 503 | </table> |
| 504 | </td> |
| 505 | <td class="mlabels-right"> |
| 506 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 507 | </tr> |
| 508 | </table> |
| 509 | </div><div class="memdoc"> |
| 510 | |
| 511 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_buffer_manager.html#a2d5f60e55b59ae8667ff593b5bfc5deb">IBufferManager</a>.</p> |
| 512 | |
| 513 | <p class="definition">Definition at line <a class="el" href="_profiling_mocks_8hpp_source.html#l00342">342</a> of file <a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a>.</p> |
| 514 | <div class="fragment"><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  {</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  <span class="keywordflow">if</span> (consumer != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  {</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  m_Consumer = consumer;</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  }</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  }</div></div><!-- fragment --> |
| 515 | </div> |
| 516 | </div> |
| 517 | <hr/>The documentation for this class was generated from the following file:<ul> |
| 518 | <li>src/profiling/test/<a class="el" href="_profiling_mocks_8hpp_source.html">ProfilingMocks.hpp</a></li> |
| 519 | </ul> |
| 520 | </div><!-- contents --> |
| 521 | </div><!-- doc-content --> |
| 522 | <!-- start footer part --> |
| 523 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 524 | <ul> |
| 525 | <li class="navelem"><a class="el" href="namespacearmnn.html">armnn</a></li><li class="navelem"><a class="el" href="namespacearmnn_1_1profiling.html">profiling</a></li><li class="navelem"><a class="el" href="classarmnn_1_1profiling_1_1_mock_stream_counter_buffer.html">MockStreamCounterBuffer</a></li> |
| 526 | <li class="footer">Generated on Fri Mar 13 2020 16:07:06 for ArmNN by |
| 527 | <a href="http://www.doxygen.org/index.html"> |
| 528 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 529 | </ul> |
| 530 | </div> |
| 531 | </body> |
| 532 | </html> |