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: FileOnlyProfilingConnection 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_file_only_profiling_connection.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_file_only_profiling_connection-members.html">List of all members</a> </div> |
| 86 | <div class="headertitle"> |
| 87 | <div class="title">FileOnlyProfilingConnection Class Reference</div> </div> |
| 88 | </div><!--header--> |
| 89 | <div class="contents"> |
| 90 | |
| 91 | <p><code>#include <<a class="el" href="_file_only_profiling_connection_8hpp_source.html">FileOnlyProfilingConnection.hpp</a>></code></p> |
| 92 | <div class="dynheader"> |
| 93 | Inheritance diagram for FileOnlyProfilingConnection:</div> |
| 94 | <div class="dyncontent"> |
| 95 | <div class="center"> |
| 96 | <img src="classarmnn_1_1profiling_1_1_file_only_profiling_connection.png" usemap="#FileOnlyProfilingConnection_map" alt=""/> |
| 97 | <map id="FileOnlyProfilingConnection_map" name="FileOnlyProfilingConnection_map"> |
| 98 | <area href="classarmnn_1_1profiling_1_1_i_profiling_connection.html" alt="IProfilingConnection" shape="rect" coords="0,0,171,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:a5cd8e59fba0c1b4f5e9b09de59a75951"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.html#a5cd8e59fba0c1b4f5e9b09de59a75951">FileOnlyProfilingConnection</a> (const Runtime::CreationOptions::ExternalProfilingOptions &<a class="el" href="_file_only_profiling_decorator_tests_8cpp.html#a6560146509197f3e197d8d36f76c1347">options</a>, const bool quietOp=<a class="el" href="_ref_layer_tests_8cpp.html#a37f1c3ccc9fc906be85185350dd83d48">true</a>)</td></tr> |
| 105 | <tr class="separator:a5cd8e59fba0c1b4f5e9b09de59a75951"><td class="memSeparator" colspan="2"> </td></tr> |
| 106 | <tr class="memitem:af05e56dee203f12a40d407ef64023467"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.html#af05e56dee203f12a40d407ef64023467">~FileOnlyProfilingConnection</a> ()</td></tr> |
| 107 | <tr class="separator:af05e56dee203f12a40d407ef64023467"><td class="memSeparator" colspan="2"> </td></tr> |
| 108 | <tr class="memitem:a91bdc9d5497d47f5d707418beb83b140"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.html#a91bdc9d5497d47f5d707418beb83b140">IsOpen</a> () const override</td></tr> |
| 109 | <tr class="separator:a91bdc9d5497d47f5d707418beb83b140"><td class="memSeparator" colspan="2"> </td></tr> |
| 110 | <tr class="memitem:a0f9aecd570c4e5e6d41337f0e2f1adf5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.html#a0f9aecd570c4e5e6d41337f0e2f1adf5">Close</a> () override</td></tr> |
| 111 | <tr class="separator:a0f9aecd570c4e5e6d41337f0e2f1adf5"><td class="memSeparator" colspan="2"> </td></tr> |
| 112 | <tr class="memitem:a42eb542b5a1d73d00c4ce474140bb78c"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.html#a42eb542b5a1d73d00c4ce474140bb78c">WritePacket</a> (const unsigned char *buffer, uint32_t length) override</td></tr> |
| 113 | <tr class="separator:a42eb542b5a1d73d00c4ce474140bb78c"><td class="memSeparator" colspan="2"> </td></tr> |
| 114 | <tr class="memitem:a1adbda8257d3a74a0566e0d8407ff458"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1profiling_1_1_packet.html">Packet</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.html#a1adbda8257d3a74a0566e0d8407ff458">ReadPacket</a> (uint32_t timeout) override</td></tr> |
| 115 | <tr class="separator:a1adbda8257d3a74a0566e0d8407ff458"><td class="memSeparator" colspan="2"> </td></tr> |
| 116 | <tr class="inherit_header pub_methods_classarmnn_1_1profiling_1_1_i_profiling_connection"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarmnn_1_1profiling_1_1_i_profiling_connection')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection.html">IProfilingConnection</a></td></tr> |
| 117 | <tr class="memitem:a8c5a75b8ee005a7aa9391f3991480d74 inherit pub_methods_classarmnn_1_1profiling_1_1_i_profiling_connection"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection.html#a8c5a75b8ee005a7aa9391f3991480d74">~IProfilingConnection</a> ()</td></tr> |
| 118 | <tr class="separator:a8c5a75b8ee005a7aa9391f3991480d74 inherit pub_methods_classarmnn_1_1profiling_1_1_i_profiling_connection"><td class="memSeparator" colspan="2"> </td></tr> |
| 119 | </table> |
| 120 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 121 | <div class="textblock"> |
| 122 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8hpp_source.html#l00037">37</a> of file <a class="el" href="_file_only_profiling_connection_8hpp_source.html">FileOnlyProfilingConnection.hpp</a>.</p> |
| 123 | </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 124 | <a id="a5cd8e59fba0c1b4f5e9b09de59a75951"></a> |
| 125 | <h2 class="memtitle"><span class="permalink"><a href="#a5cd8e59fba0c1b4f5e9b09de59a75951">◆ </a></span>FileOnlyProfilingConnection()</h2> |
| 126 | |
| 127 | <div class="memitem"> |
| 128 | <div class="memproto"> |
| 129 | <table class="mlabels"> |
| 130 | <tr> |
| 131 | <td class="mlabels-left"> |
| 132 | <table class="memname"> |
| 133 | <tr> |
| 134 | <td class="memname"><a class="el" href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.html">FileOnlyProfilingConnection</a> </td> |
| 135 | <td>(</td> |
| 136 | <td class="paramtype">const Runtime::CreationOptions::ExternalProfilingOptions & </td> |
| 137 | <td class="paramname"><em>options</em>, </td> |
| 138 | </tr> |
| 139 | <tr> |
| 140 | <td class="paramkey"></td> |
| 141 | <td></td> |
| 142 | <td class="paramtype">const bool </td> |
| 143 | <td class="paramname"><em>quietOp</em> = <code><a class="el" href="_ref_layer_tests_8cpp.html#a37f1c3ccc9fc906be85185350dd83d48">true</a></code> </td> |
| 144 | </tr> |
| 145 | <tr> |
| 146 | <td></td> |
| 147 | <td>)</td> |
| 148 | <td></td><td></td> |
| 149 | </tr> |
| 150 | </table> |
| 151 | </td> |
| 152 | <td class="mlabels-right"> |
| 153 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 154 | </tr> |
| 155 | </table> |
| 156 | </div><div class="memdoc"> |
| 157 | |
| 158 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8hpp_source.html#l00040">40</a> of file <a class="el" href="_file_only_profiling_connection_8hpp_source.html">FileOnlyProfilingConnection.hpp</a>.</p> |
| 159 | |
| 160 | <p class="reference">References <a class="el" href="_network_sockets_8cpp_source.html#l00028">armnnUtils::Sockets::Close()</a>.</p> |
| 161 | <div class="fragment"><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  : m_Options(<a class="code" href="_file_only_profiling_decorator_tests_8cpp.html#a6560146509197f3e197d8d36f76c1347">options</a>)</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  , m_QuietOp(quietOp)</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  , m_Endianness(<a class="code" href="namespacearmnn_1_1profiling.html#a006732ecc1f16712db06bf622eb79651ab2db365e5027e9a57988c7054e9bd6b7">TargetEndianness::LeWire</a>) <span class="comment">// Set a sensible default. WaitForStreamMeta will set a real value.</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  {};</div><div class="ttc" id="namespacearmnn_1_1profiling_html_a006732ecc1f16712db06bf622eb79651ab2db365e5027e9a57988c7054e9bd6b7"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a006732ecc1f16712db06bf622eb79651ab2db365e5027e9a57988c7054e9bd6b7">armnn::profiling::TargetEndianness::LeWire</a></div></div> |
| 162 | <div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_html_a6560146509197f3e197d8d36f76c1347"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.html#a6560146509197f3e197d8d36f76c1347">options</a></div><div class="ttdeci">armnn::Runtime::CreationOptions::ExternalProfilingOptions options</div><div class="ttdef"><b>Definition:</b> <a href="_file_only_profiling_decorator_tests_8cpp_source.html#l00045">FileOnlyProfilingDecoratorTests.cpp:45</a></div></div> |
| 163 | </div><!-- fragment --> |
| 164 | </div> |
| 165 | </div> |
| 166 | <a id="af05e56dee203f12a40d407ef64023467"></a> |
| 167 | <h2 class="memtitle"><span class="permalink"><a href="#af05e56dee203f12a40d407ef64023467">◆ </a></span>~FileOnlyProfilingConnection()</h2> |
| 168 | |
| 169 | <div class="memitem"> |
| 170 | <div class="memproto"> |
| 171 | <table class="memname"> |
| 172 | <tr> |
| 173 | <td class="memname">~<a class="el" href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.html">FileOnlyProfilingConnection</a> </td> |
| 174 | <td>(</td> |
| 175 | <td class="paramname"></td><td>)</td> |
| 176 | <td></td> |
| 177 | </tr> |
| 178 | </table> |
| 179 | </div><div class="memdoc"> |
| 180 | |
| 181 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8cpp_source.html#l00021">21</a> of file <a class="el" href="_file_only_profiling_connection_8cpp_source.html">FileOnlyProfilingConnection.cpp</a>.</p> |
| 182 | |
| 183 | <p class="reference">References <a class="el" href="_file_only_profiling_connection_8cpp_source.html#l00032">FileOnlyProfilingConnection::Close()</a>.</p> |
| 184 | <div class="fragment"><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> {</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <a class="code" href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.html#a0f9aecd570c4e5e6d41337f0e2f1adf5">Close</a>();</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> }</div><div class="ttc" id="classarmnn_1_1profiling_1_1_file_only_profiling_connection_html_a0f9aecd570c4e5e6d41337f0e2f1adf5"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.html#a0f9aecd570c4e5e6d41337f0e2f1adf5">armnn::profiling::FileOnlyProfilingConnection::Close</a></div><div class="ttdeci">void Close() override</div><div class="ttdef"><b>Definition:</b> <a href="_file_only_profiling_connection_8cpp_source.html#l00032">FileOnlyProfilingConnection.cpp:32</a></div></div> |
| 185 | </div><!-- fragment --> |
| 186 | </div> |
| 187 | </div> |
| 188 | <h2 class="groupheader">Member Function Documentation</h2> |
| 189 | <a id="a0f9aecd570c4e5e6d41337f0e2f1adf5"></a> |
| 190 | <h2 class="memtitle"><span class="permalink"><a href="#a0f9aecd570c4e5e6d41337f0e2f1adf5">◆ </a></span>Close()</h2> |
| 191 | |
| 192 | <div class="memitem"> |
| 193 | <div class="memproto"> |
| 194 | <table class="mlabels"> |
| 195 | <tr> |
| 196 | <td class="mlabels-left"> |
| 197 | <table class="memname"> |
| 198 | <tr> |
| 199 | <td class="memname">void Close </td> |
| 200 | <td>(</td> |
| 201 | <td class="paramname"></td><td>)</td> |
| 202 | <td></td> |
| 203 | </tr> |
| 204 | </table> |
| 205 | </td> |
| 206 | <td class="mlabels-right"> |
| 207 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 208 | </tr> |
| 209 | </table> |
| 210 | </div><div class="memdoc"> |
| 211 | |
| 212 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection.html#aacb6d0e5e6d570cdc2b0da14c3921ff0">IProfilingConnection</a>.</p> |
| 213 | |
| 214 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8cpp_source.html#l00032">32</a> of file <a class="el" href="_file_only_profiling_connection_8cpp_source.html">FileOnlyProfilingConnection.cpp</a>.</p> |
| 215 | |
| 216 | <p class="reference">References <a class="el" href="namespacearmnn_1_1profiling.html#a006732ecc1f16712db06bf622eb79651aefe19217ee8d2186e7bbecbf2f171eb9">armnn::profiling::BeWire</a>, <a class="el" href="namespacearmnn_1_1profiling.html#a006732ecc1f16712db06bf622eb79651ab2db365e5027e9a57988c7054e9bd6b7">armnn::profiling::LeWire</a>, <a class="el" href="_directory_capture_command_handler_8cpp_source.html#l00020">armnn::profiling::uint16_t_size</a>, <a class="el" href="_directory_capture_command_handler_8cpp_source.html#l00021">armnn::profiling::uint32_t_size</a>, <a class="el" href="_profiling_utils_8cpp_source.html#l00126">armnn::profiling::WriteUint16()</a>, and <a class="el" href="_profiling_utils_8cpp_source.html#l00119">armnn::profiling::WriteUint32()</a>.</p> |
| 217 | |
| 218 | <p class="reference">Referenced by <a class="el" href="_file_only_profiling_connection_8cpp_source.html#l00166">FileOnlyProfilingConnection::ReadPacket()</a>, and <a class="el" href="_file_only_profiling_connection_8cpp_source.html#l00021">FileOnlyProfilingConnection::~FileOnlyProfilingConnection()</a>.</p> |
| 219 | <div class="fragment"><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> {</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="comment">// Dump any unread packets out of the queue.</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < m_PacketQueue.size(); i++)</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  m_PacketQueue.pop();</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  }</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> }</div></div><!-- fragment --> |
| 220 | </div> |
| 221 | </div> |
| 222 | <a id="a91bdc9d5497d47f5d707418beb83b140"></a> |
| 223 | <h2 class="memtitle"><span class="permalink"><a href="#a91bdc9d5497d47f5d707418beb83b140">◆ </a></span>IsOpen()</h2> |
| 224 | |
| 225 | <div class="memitem"> |
| 226 | <div class="memproto"> |
| 227 | <table class="mlabels"> |
| 228 | <tr> |
| 229 | <td class="mlabels-left"> |
| 230 | <table class="memname"> |
| 231 | <tr> |
| 232 | <td class="memname">bool IsOpen </td> |
| 233 | <td>(</td> |
| 234 | <td class="paramname"></td><td>)</td> |
| 235 | <td> const</td> |
| 236 | </tr> |
| 237 | </table> |
| 238 | </td> |
| 239 | <td class="mlabels-right"> |
| 240 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 241 | </tr> |
| 242 | </table> |
| 243 | </div><div class="memdoc"> |
| 244 | |
| 245 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection.html#a8a3511046982c64efa3e3833d749e5ef">IProfilingConnection</a>.</p> |
| 246 | |
| 247 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8cpp_source.html#l00026">26</a> of file <a class="el" href="_file_only_profiling_connection_8cpp_source.html">FileOnlyProfilingConnection.cpp</a>.</p> |
| 248 | <div class="fragment"><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> {</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="comment">// This type of connection is always open.</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> }</div></div><!-- fragment --> |
| 249 | </div> |
| 250 | </div> |
| 251 | <a id="a1adbda8257d3a74a0566e0d8407ff458"></a> |
| 252 | <h2 class="memtitle"><span class="permalink"><a href="#a1adbda8257d3a74a0566e0d8407ff458">◆ </a></span>ReadPacket()</h2> |
| 253 | |
| 254 | <div class="memitem"> |
| 255 | <div class="memproto"> |
| 256 | <table class="mlabels"> |
| 257 | <tr> |
| 258 | <td class="mlabels-left"> |
| 259 | <table class="memname"> |
| 260 | <tr> |
| 261 | <td class="memname"><a class="el" href="classarmnn_1_1profiling_1_1_packet.html">Packet</a> ReadPacket </td> |
| 262 | <td>(</td> |
| 263 | <td class="paramtype">uint32_t </td> |
| 264 | <td class="paramname"><em>timeout</em></td><td>)</td> |
| 265 | <td></td> |
| 266 | </tr> |
| 267 | </table> |
| 268 | </td> |
| 269 | <td class="mlabels-right"> |
| 270 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 271 | </tr> |
| 272 | </table> |
| 273 | </div><div class="memdoc"> |
| 274 | |
| 275 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection.html#a935e16d85893a31f23cd78e47b85466d">IProfilingConnection</a>.</p> |
| 276 | |
| 277 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8cpp_source.html#l00166">166</a> of file <a class="el" href="_file_only_profiling_connection_8cpp_source.html">FileOnlyProfilingConnection.cpp</a>.</p> |
| 278 | |
| 279 | <p class="reference">References <a class="el" href="namespacearmnn_1_1profiling.html#a006732ecc1f16712db06bf622eb79651aefe19217ee8d2186e7bbecbf2f171eb9">armnn::profiling::BeWire</a>, <a class="el" href="_file_only_profiling_connection_8cpp_source.html#l00032">FileOnlyProfilingConnection::Close()</a>, <a class="el" href="namespacearmnn_1_1profiling.html#a083225fb2313ee056142bbee0c44de36ad2cacb6bc37a3363ae810b656e3b6190">armnn::profiling::CounterDirectory</a>, <a class="el" href="namespacearmnn_1_1profiling.html#a083225fb2313ee056142bbee0c44de36ae43273a3645f4894a1088081feb9827d">armnn::profiling::StreamMetaData</a>, and <a class="el" href="namespacearmnn_1_1profiling.html#a083225fb2313ee056142bbee0c44de36a88183b946cc5f0e8c96b2e66e1c74a7e">armnn::profiling::Unknown</a>.</p> |
| 280 | <div class="fragment"><div class="line"><a name="l00167"></a><span class="lineno"> 167</span> {</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  std::unique_lock<std::mutex> lck(m_PacketAvailableMutex);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span> </div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="comment">// Here we are using m_PacketQueue.empty() as a predicate variable</span></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="comment">// The conditional variable will wait until packetQueue is not empty or until a timeout</span></div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="keywordflow">if</span>(!m_ConditionPacketAvailable.wait_for(lck,</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  std::chrono::milliseconds(timeout),</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  [&]{return !m_PacketQueue.empty();}))</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  {</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_timeout_exception.html">armnn::TimeoutException</a>(<span class="stringliteral">"Thread has timed out as per requested time limit"</span>);</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  }</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span> </div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  Packet returnedPacket = std::move(m_PacketQueue.front());</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  m_PacketQueue.pop();</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keywordflow">return</span> returnedPacket;</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> }</div><div class="ttc" id="classarmnn_1_1_timeout_exception_html"><div class="ttname"><a href="classarmnn_1_1_timeout_exception.html">armnn::TimeoutException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00135">Exceptions.hpp:135</a></div></div> |
| 281 | </div><!-- fragment --> |
| 282 | </div> |
| 283 | </div> |
| 284 | <a id="a42eb542b5a1d73d00c4ce474140bb78c"></a> |
| 285 | <h2 class="memtitle"><span class="permalink"><a href="#a42eb542b5a1d73d00c4ce474140bb78c">◆ </a></span>WritePacket()</h2> |
| 286 | |
| 287 | <div class="memitem"> |
| 288 | <div class="memproto"> |
| 289 | <table class="mlabels"> |
| 290 | <tr> |
| 291 | <td class="mlabels-left"> |
| 292 | <table class="memname"> |
| 293 | <tr> |
| 294 | <td class="memname">bool WritePacket </td> |
| 295 | <td>(</td> |
| 296 | <td class="paramtype">const unsigned char * </td> |
| 297 | <td class="paramname"><em>buffer</em>, </td> |
| 298 | </tr> |
| 299 | <tr> |
| 300 | <td class="paramkey"></td> |
| 301 | <td></td> |
| 302 | <td class="paramtype">uint32_t </td> |
| 303 | <td class="paramname"><em>length</em> </td> |
| 304 | </tr> |
| 305 | <tr> |
| 306 | <td></td> |
| 307 | <td>)</td> |
| 308 | <td></td><td></td> |
| 309 | </tr> |
| 310 | </table> |
| 311 | </td> |
| 312 | <td class="mlabels-right"> |
| 313 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 314 | </tr> |
| 315 | </table> |
| 316 | </div><div class="memdoc"> |
| 317 | |
| 318 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection.html#ac78c6bd1a545934a805c88194214b09d">IProfilingConnection</a>.</p> |
| 319 | |
| 320 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8cpp_source.html#l00112">112</a> of file <a class="el" href="_file_only_profiling_connection_8cpp_source.html">FileOnlyProfilingConnection.cpp</a>.</p> |
| 321 | |
| 322 | <p class="reference">References <a class="el" href="namespacearmnn_1_1profiling.html#a083225fb2313ee056142bbee0c44de36ad2cacb6bc37a3363ae810b656e3b6190">armnn::profiling::CounterDirectory</a>, <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.html#a718a75d4c178cf3f687b3f27b8f55091">ICounterDirectory::GetCategories()</a>, <a class="el" href="_encode_version_8hpp_source.html#l00045">Version::GetEncodedValue()</a>, <a class="el" href="_packet_version_resolver_8cpp_source.html#l00055">PacketVersionResolver::ResolvePacketVersion()</a>, and <a class="el" href="namespacearmnn_1_1profiling.html#a083225fb2313ee056142bbee0c44de36ae43273a3645f4894a1088081feb9827d">armnn::profiling::StreamMetaData</a>.</p> |
| 323 | <div class="fragment"><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> {</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  BOOST_ASSERT(buffer);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> </div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="comment">// Read Header and determine case</span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  uint32_t outgoingHeaderAsWords[2];</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <a class="code" href="namespacearmnn_1_1profiling.html#a083225fb2313ee056142bbee0c44de36">PackageActivity</a> packageActivity = GetPackageActivity(buffer, outgoingHeaderAsWords);</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span> </div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">switch</span> (packageActivity)</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  {</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearmnn_1_1profiling.html#a083225fb2313ee056142bbee0c44de36ae43273a3645f4894a1088081feb9827d">PackageActivity::StreamMetaData</a>:</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  {</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">if</span> (!WaitForStreamMeta(buffer, length))</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  {</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  }</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span> </div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  SendConnectionAck();</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  }</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearmnn_1_1profiling.html#a083225fb2313ee056142bbee0c44de36ad2cacb6bc37a3363ae810b656e3b6190">PackageActivity::CounterDirectory</a>:</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  {</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  std::unique_ptr<unsigned char[]> uniqueCounterData = std::make_unique<unsigned char[]>(length - 8);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span> </div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  std::memcpy(uniqueCounterData.get(), buffer + 8, length - 8);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span> </div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  Packet directoryPacket(outgoingHeaderAsWords[0], length - 8, uniqueCounterData);</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> </div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <a class="code" href="classarmnn_1_1profiling_1_1_packet_version_resolver.html">armnn::profiling::PacketVersionResolver</a> packetVersionResolver;</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  DirectoryCaptureCommandHandler directoryCaptureCommandHandler(</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  0, 2, packetVersionResolver.<a class="code" href="classarmnn_1_1profiling_1_1_packet_version_resolver.html#ac8ad466123304f923e64997ac096926a">ResolvePacketVersion</a>(0, 2).<a class="code" href="classarmnn_1_1profiling_1_1_version.html#a0ab0d5a402c197d4093cbc5fdbf81214">GetEncodedValue</a>());</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  directoryCaptureCommandHandler.operator()(directoryPacket);</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keyword">const</span> ICounterDirectory& counterDirectory = directoryCaptureCommandHandler.GetCounterDirectory();</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>& category : counterDirectory.GetCategories())</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  {</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="comment">// Remember we need to translate the Uid's from our CounterDirectory instance to the parent one.</span></div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  std::vector<uint16_t> translatedCounters;</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> <span class="keyword">const</span>& copyUid : category->m_Counters)</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  {</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  translatedCounters.emplace_back(directoryCaptureCommandHandler.TranslateUIDCopyToOriginal(copyUid));</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  }</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  m_IdList.insert(std::end(m_IdList), std::begin(translatedCounters), std::end(translatedCounters));</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  }</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  SendCounterSelectionPacket();</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  }</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  {</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  }</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  }</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span> }</div><div class="ttc" id="classarmnn_1_1profiling_1_1_packet_version_resolver_html_ac8ad466123304f923e64997ac096926a"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_packet_version_resolver.html#ac8ad466123304f923e64997ac096926a">armnn::profiling::PacketVersionResolver::ResolvePacketVersion</a></div><div class="ttdeci">Version ResolvePacketVersion(uint32_t familyId, uint32_t packetId) const</div><div class="ttdef"><b>Definition:</b> <a href="_packet_version_resolver_8cpp_source.html#l00055">PacketVersionResolver.cpp:55</a></div></div> |
| 324 | <div class="ttc" id="classarmnn_1_1profiling_1_1_version_html_a0ab0d5a402c197d4093cbc5fdbf81214"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_version.html#a0ab0d5a402c197d4093cbc5fdbf81214">armnn::profiling::Version::GetEncodedValue</a></div><div class="ttdeci">uint32_t GetEncodedValue()</div><div class="ttdef"><b>Definition:</b> <a href="_encode_version_8hpp_source.html#l00045">EncodeVersion.hpp:45</a></div></div> |
| 325 | <div class="ttc" id="namespacearmnn_1_1profiling_html_a083225fb2313ee056142bbee0c44de36"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a083225fb2313ee056142bbee0c44de36">armnn::profiling::PackageActivity</a></div><div class="ttdeci">PackageActivity</div><div class="ttdef"><b>Definition:</b> <a href="_file_only_profiling_connection_8hpp_source.html#l00030">FileOnlyProfilingConnection.hpp:30</a></div></div> |
| 326 | <div class="ttc" id="namespacearmnn_1_1profiling_html_a083225fb2313ee056142bbee0c44de36ad2cacb6bc37a3363ae810b656e3b6190"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a083225fb2313ee056142bbee0c44de36ad2cacb6bc37a3363ae810b656e3b6190">armnn::profiling::PackageActivity::CounterDirectory</a></div></div> |
| 327 | <div class="ttc" id="namespacearmnn_1_1profiling_html_a083225fb2313ee056142bbee0c44de36ae43273a3645f4894a1088081feb9827d"><div class="ttname"><a href="namespacearmnn_1_1profiling.html#a083225fb2313ee056142bbee0c44de36ae43273a3645f4894a1088081feb9827d">armnn::profiling::PackageActivity::StreamMetaData</a></div></div> |
| 328 | <div class="ttc" id="classarmnn_1_1profiling_1_1_packet_version_resolver_html"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_packet_version_resolver.html">armnn::profiling::PacketVersionResolver</a></div><div class="ttdef"><b>Definition:</b> <a href="_packet_version_resolver_8hpp_source.html#l00036">PacketVersionResolver.hpp:36</a></div></div> |
| 329 | </div><!-- fragment --> |
| 330 | </div> |
| 331 | </div> |
| 332 | <hr/>The documentation for this class was generated from the following files:<ul> |
| 333 | <li>src/profiling/<a class="el" href="_file_only_profiling_connection_8hpp_source.html">FileOnlyProfilingConnection.hpp</a></li> |
| 334 | <li>src/profiling/<a class="el" href="_file_only_profiling_connection_8cpp_source.html">FileOnlyProfilingConnection.cpp</a></li> |
| 335 | </ul> |
| 336 | </div><!-- contents --> |
| 337 | </div><!-- doc-content --> |
| 338 | <!-- start footer part --> |
| 339 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 340 | <ul> |
| 341 | <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_file_only_profiling_connection.html">FileOnlyProfilingConnection</a></li> |
| 342 | <li class="footer">Generated on Fri Mar 13 2020 16:07:06 for ArmNN by |
| 343 | <a href="http://www.doxygen.org/index.html"> |
| 344 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 345 | </ul> |
| 346 | </div> |
| 347 | </body> |
| 348 | </html> |