Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!-- Copyright (c) 2020 ARM Limited. --> |
| 2 | <!-- --> |
| 3 | <!-- SPDX-License-Identifier: MIT --> |
| 4 | <!-- --> |
| 5 | <!-- HTML header for doxygen 1.8.13--> |
| 6 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 7 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 8 | <head> |
| 9 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 10 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 11 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 12 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> |
| 13 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 14 | <title>ArmNN: FileOnlyProfilingConnection Class Reference</title> |
| 15 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 16 | <script type="text/javascript" src="jquery.js"></script> |
| 17 | <script type="text/javascript" src="dynsections.js"></script> |
| 18 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 19 | <script type="text/javascript" src="resize.js"></script> |
| 20 | <script type="text/javascript" src="navtreedata.js"></script> |
| 21 | <script type="text/javascript" src="navtree.js"></script> |
| 22 | <script type="text/javascript"> |
| 23 | $(document).ready(initResizable); |
| 24 | </script> |
| 25 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 26 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 27 | <script type="text/javascript" src="search/search.js"></script> |
| 28 | <script type="text/x-mathjax-config"> |
| 29 | MathJax.Hub.Config({ |
| 30 | extensions: ["tex2jax.js"], |
| 31 | jax: ["input/TeX","output/HTML-CSS"], |
| 32 | }); |
| 33 | </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
| 34 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 35 | <link href="stylesheet.css" rel="stylesheet" type="text/css"/> |
| 36 | </head> |
| 37 | <body> |
| 38 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 39 | <div id="titlearea"> |
| 40 | <table cellspacing="0" cellpadding="0"> |
| 41 | <tbody> |
| 42 | <tr style="height: 56px;"> |
| 43 | <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 10rem; margin-top: .5rem; margin-left 10px"/> |
| 44 | <td style="padding-left: 0.5em;"> |
| 45 | <div id="projectname"> |
| 46 |  <span id="projectnumber">20.02</span> |
| 47 | </div> |
| 48 | </td> |
| 49 | </tr> |
| 50 | </tbody> |
| 51 | </table> |
| 52 | </div> |
| 53 | <!-- end header part --> |
| 54 | <!-- Generated by Doxygen 1.8.13 --> |
| 55 | <script type="text/javascript"> |
| 56 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 57 | </script> |
| 58 | <script type="text/javascript" src="menudata.js"></script> |
| 59 | <script type="text/javascript" src="menu.js"></script> |
| 60 | <script type="text/javascript"> |
| 61 | $(function() { |
| 62 | initMenu('',true,false,'search.php','Search'); |
| 63 | $(document).ready(function() { init_search(); }); |
| 64 | }); |
| 65 | </script> |
| 66 | <div id="main-nav"></div> |
| 67 | </div><!-- top --> |
| 68 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 69 | <div id="nav-tree"> |
| 70 | <div id="nav-tree-contents"> |
| 71 | <div id="nav-sync" class="sync"></div> |
| 72 | </div> |
| 73 | </div> |
| 74 | <div id="splitbar" style="-moz-user-select:none;" |
| 75 | class="ui-resizable-handle"> |
| 76 | </div> |
| 77 | </div> |
| 78 | <script type="text/javascript"> |
| 79 | $(document).ready(function(){initNavTree('classarmnn_1_1profiling_1_1_file_only_profiling_connection.xhtml','');}); |
| 80 | </script> |
| 81 | <div id="doc-content"> |
| 82 | <!-- window showing the filter options --> |
| 83 | <div id="MSearchSelectWindow" |
| 84 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 85 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 86 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 87 | </div> |
| 88 | |
| 89 | <!-- iframe showing the search results (closed by default) --> |
| 90 | <div id="MSearchResultsWindow"> |
| 91 | <iframe src="javascript:void(0)" frameborder="0" |
| 92 | name="MSearchResults" id="MSearchResults"> |
| 93 | </iframe> |
| 94 | </div> |
| 95 | |
| 96 | <div class="header"> |
| 97 | <div class="summary"> |
| 98 | <a href="#pub-methods">Public Member Functions</a> | |
| 99 | <a href="classarmnn_1_1profiling_1_1_file_only_profiling_connection-members.xhtml">List of all members</a> </div> |
| 100 | <div class="headertitle"> |
| 101 | <div class="title">FileOnlyProfilingConnection Class Reference</div> </div> |
| 102 | </div><!--header--> |
| 103 | <div class="contents"> |
| 104 | |
| 105 | <p><code>#include <<a class="el" href="_file_only_profiling_connection_8hpp_source.xhtml">FileOnlyProfilingConnection.hpp</a>></code></p> |
| 106 | <div class="dynheader"> |
| 107 | Inheritance diagram for FileOnlyProfilingConnection:</div> |
| 108 | <div class="dyncontent"> |
| 109 | <div class="center"> |
| 110 | <img src="classarmnn_1_1profiling_1_1_file_only_profiling_connection.png" usemap="#FileOnlyProfilingConnection_map" alt=""/> |
| 111 | <map id="FileOnlyProfilingConnection_map" name="FileOnlyProfilingConnection_map"> |
| 112 | <area href="classarmnn_1_1profiling_1_1_i_profiling_connection.xhtml" alt="IProfilingConnection" shape="rect" coords="0,0,171,24"/> |
| 113 | </map> |
| 114 | </div></div> |
| 115 | <table class="memberdecls"> |
| 116 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| 117 | Public Member Functions</h2></td></tr> |
| 118 | <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.xhtml#a5cd8e59fba0c1b4f5e9b09de59a75951">FileOnlyProfilingConnection</a> (const Runtime::CreationOptions::ExternalProfilingOptions &<a class="el" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a6560146509197f3e197d8d36f76c1347">options</a>, const bool quietOp=<a class="el" href="_ref_layer_tests_8cpp.xhtml#a37f1c3ccc9fc906be85185350dd83d48">true</a>)</td></tr> |
| 119 | <tr class="separator:a5cd8e59fba0c1b4f5e9b09de59a75951"><td class="memSeparator" colspan="2"> </td></tr> |
| 120 | <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.xhtml#af05e56dee203f12a40d407ef64023467">~FileOnlyProfilingConnection</a> ()</td></tr> |
| 121 | <tr class="separator:af05e56dee203f12a40d407ef64023467"><td class="memSeparator" colspan="2"> </td></tr> |
| 122 | <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.xhtml#a91bdc9d5497d47f5d707418beb83b140">IsOpen</a> () const override</td></tr> |
| 123 | <tr class="separator:a91bdc9d5497d47f5d707418beb83b140"><td class="memSeparator" colspan="2"> </td></tr> |
| 124 | <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.xhtml#a0f9aecd570c4e5e6d41337f0e2f1adf5">Close</a> () override</td></tr> |
| 125 | <tr class="separator:a0f9aecd570c4e5e6d41337f0e2f1adf5"><td class="memSeparator" colspan="2"> </td></tr> |
| 126 | <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.xhtml#a42eb542b5a1d73d00c4ce474140bb78c">WritePacket</a> (const unsigned char *buffer, uint32_t length) override</td></tr> |
| 127 | <tr class="separator:a42eb542b5a1d73d00c4ce474140bb78c"><td class="memSeparator" colspan="2"> </td></tr> |
| 128 | <tr class="memitem:a1adbda8257d3a74a0566e0d8407ff458"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1profiling_1_1_packet.xhtml">Packet</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.xhtml#a1adbda8257d3a74a0566e0d8407ff458">ReadPacket</a> (uint32_t timeout) override</td></tr> |
| 129 | <tr class="separator:a1adbda8257d3a74a0566e0d8407ff458"><td class="memSeparator" colspan="2"> </td></tr> |
| 130 | <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.xhtml">IProfilingConnection</a></td></tr> |
| 131 | <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.xhtml#a8c5a75b8ee005a7aa9391f3991480d74">~IProfilingConnection</a> ()</td></tr> |
| 132 | <tr class="separator:a8c5a75b8ee005a7aa9391f3991480d74 inherit pub_methods_classarmnn_1_1profiling_1_1_i_profiling_connection"><td class="memSeparator" colspan="2"> </td></tr> |
| 133 | </table> |
| 134 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 135 | <div class="textblock"> |
| 136 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8hpp_source.xhtml#l00037">37</a> of file <a class="el" href="_file_only_profiling_connection_8hpp_source.xhtml">FileOnlyProfilingConnection.hpp</a>.</p> |
| 137 | </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 138 | <a id="a5cd8e59fba0c1b4f5e9b09de59a75951"></a> |
| 139 | <h2 class="memtitle"><span class="permalink"><a href="#a5cd8e59fba0c1b4f5e9b09de59a75951">◆ </a></span>FileOnlyProfilingConnection()</h2> |
| 140 | |
| 141 | <div class="memitem"> |
| 142 | <div class="memproto"> |
| 143 | <table class="mlabels"> |
| 144 | <tr> |
| 145 | <td class="mlabels-left"> |
| 146 | <table class="memname"> |
| 147 | <tr> |
| 148 | <td class="memname"><a class="el" href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.xhtml">FileOnlyProfilingConnection</a> </td> |
| 149 | <td>(</td> |
| 150 | <td class="paramtype">const Runtime::CreationOptions::ExternalProfilingOptions & </td> |
| 151 | <td class="paramname"><em>options</em>, </td> |
| 152 | </tr> |
| 153 | <tr> |
| 154 | <td class="paramkey"></td> |
| 155 | <td></td> |
| 156 | <td class="paramtype">const bool </td> |
| 157 | <td class="paramname"><em>quietOp</em> = <code><a class="el" href="_ref_layer_tests_8cpp.xhtml#a37f1c3ccc9fc906be85185350dd83d48">true</a></code> </td> |
| 158 | </tr> |
| 159 | <tr> |
| 160 | <td></td> |
| 161 | <td>)</td> |
| 162 | <td></td><td></td> |
| 163 | </tr> |
| 164 | </table> |
| 165 | </td> |
| 166 | <td class="mlabels-right"> |
| 167 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 168 | </tr> |
| 169 | </table> |
| 170 | </div><div class="memdoc"> |
| 171 | |
| 172 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8hpp_source.xhtml#l00040">40</a> of file <a class="el" href="_file_only_profiling_connection_8hpp_source.xhtml">FileOnlyProfilingConnection.hpp</a>.</p> |
| 173 | |
| 174 | <p class="reference">References <a class="el" href="_network_sockets_8cpp_source.xhtml#l00028">armnnUtils::Sockets::Close()</a>.</p> |
| 175 | <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.xhtml#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.xhtml#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_xhtml_a006732ecc1f16712db06bf622eb79651ab2db365e5027e9a57988c7054e9bd6b7"><div class="ttname"><a href="namespacearmnn_1_1profiling.xhtml#a006732ecc1f16712db06bf622eb79651ab2db365e5027e9a57988c7054e9bd6b7">armnn::profiling::TargetEndianness::LeWire</a></div></div> |
| 176 | <div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_xhtml_a6560146509197f3e197d8d36f76c1347"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.xhtml#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.xhtml#l00045">FileOnlyProfilingDecoratorTests.cpp:45</a></div></div> |
| 177 | </div><!-- fragment --> |
| 178 | </div> |
| 179 | </div> |
| 180 | <a id="af05e56dee203f12a40d407ef64023467"></a> |
| 181 | <h2 class="memtitle"><span class="permalink"><a href="#af05e56dee203f12a40d407ef64023467">◆ </a></span>~FileOnlyProfilingConnection()</h2> |
| 182 | |
| 183 | <div class="memitem"> |
| 184 | <div class="memproto"> |
| 185 | <table class="memname"> |
| 186 | <tr> |
| 187 | <td class="memname">~<a class="el" href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.xhtml">FileOnlyProfilingConnection</a> </td> |
| 188 | <td>(</td> |
| 189 | <td class="paramname"></td><td>)</td> |
| 190 | <td></td> |
| 191 | </tr> |
| 192 | </table> |
| 193 | </div><div class="memdoc"> |
| 194 | |
| 195 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml#l00021">21</a> of file <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml">FileOnlyProfilingConnection.cpp</a>.</p> |
| 196 | |
| 197 | <p class="reference">References <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml#l00032">FileOnlyProfilingConnection::Close()</a>.</p> |
| 198 | <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.xhtml#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_xhtml_a0f9aecd570c4e5e6d41337f0e2f1adf5"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.xhtml#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.xhtml#l00032">FileOnlyProfilingConnection.cpp:32</a></div></div> |
| 199 | </div><!-- fragment --> |
| 200 | </div> |
| 201 | </div> |
| 202 | <h2 class="groupheader">Member Function Documentation</h2> |
| 203 | <a id="a0f9aecd570c4e5e6d41337f0e2f1adf5"></a> |
| 204 | <h2 class="memtitle"><span class="permalink"><a href="#a0f9aecd570c4e5e6d41337f0e2f1adf5">◆ </a></span>Close()</h2> |
| 205 | |
| 206 | <div class="memitem"> |
| 207 | <div class="memproto"> |
| 208 | <table class="mlabels"> |
| 209 | <tr> |
| 210 | <td class="mlabels-left"> |
| 211 | <table class="memname"> |
| 212 | <tr> |
| 213 | <td class="memname">void Close </td> |
| 214 | <td>(</td> |
| 215 | <td class="paramname"></td><td>)</td> |
| 216 | <td></td> |
| 217 | </tr> |
| 218 | </table> |
| 219 | </td> |
| 220 | <td class="mlabels-right"> |
| 221 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 222 | </tr> |
| 223 | </table> |
| 224 | </div><div class="memdoc"> |
| 225 | |
| 226 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection.xhtml#aacb6d0e5e6d570cdc2b0da14c3921ff0">IProfilingConnection</a>.</p> |
| 227 | |
| 228 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml#l00032">32</a> of file <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml">FileOnlyProfilingConnection.cpp</a>.</p> |
| 229 | |
| 230 | <p class="reference">References <a class="el" href="namespacearmnn_1_1profiling.xhtml#a006732ecc1f16712db06bf622eb79651aefe19217ee8d2186e7bbecbf2f171eb9">armnn::profiling::BeWire</a>, <a class="el" href="_ignore_unused_8hpp_source.xhtml#l00014">armnn::IgnoreUnused()</a>, <a class="el" href="namespacearmnn_1_1profiling.xhtml#a006732ecc1f16712db06bf622eb79651ab2db365e5027e9a57988c7054e9bd6b7">armnn::profiling::LeWire</a>, <a class="el" href="_numeric_cast_8hpp_source.xhtml#l00033">armnn::numeric_cast()</a>, <a class="el" href="_directory_capture_command_handler_8cpp_source.xhtml#l00020">armnn::profiling::uint16_t_size</a>, <a class="el" href="_directory_capture_command_handler_8cpp_source.xhtml#l00021">armnn::profiling::uint32_t_size</a>, <a class="el" href="_profiling_utils_8cpp_source.xhtml#l00126">armnn::profiling::WriteUint16()</a>, and <a class="el" href="_profiling_utils_8cpp_source.xhtml#l00119">armnn::profiling::WriteUint32()</a>.</p> |
| 231 | |
| 232 | <p class="reference">Referenced by <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml#l00166">FileOnlyProfilingConnection::ReadPacket()</a>, and <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml#l00021">FileOnlyProfilingConnection::~FileOnlyProfilingConnection()</a>.</p> |
| 233 | <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 --> |
| 234 | </div> |
| 235 | </div> |
| 236 | <a id="a91bdc9d5497d47f5d707418beb83b140"></a> |
| 237 | <h2 class="memtitle"><span class="permalink"><a href="#a91bdc9d5497d47f5d707418beb83b140">◆ </a></span>IsOpen()</h2> |
| 238 | |
| 239 | <div class="memitem"> |
| 240 | <div class="memproto"> |
| 241 | <table class="mlabels"> |
| 242 | <tr> |
| 243 | <td class="mlabels-left"> |
| 244 | <table class="memname"> |
| 245 | <tr> |
| 246 | <td class="memname">bool IsOpen </td> |
| 247 | <td>(</td> |
| 248 | <td class="paramname"></td><td>)</td> |
| 249 | <td> const</td> |
| 250 | </tr> |
| 251 | </table> |
| 252 | </td> |
| 253 | <td class="mlabels-right"> |
| 254 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 255 | </tr> |
| 256 | </table> |
| 257 | </div><div class="memdoc"> |
| 258 | |
| 259 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection.xhtml#a8a3511046982c64efa3e3833d749e5ef">IProfilingConnection</a>.</p> |
| 260 | |
| 261 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml#l00026">26</a> of file <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml">FileOnlyProfilingConnection.cpp</a>.</p> |
| 262 | <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 --> |
| 263 | </div> |
| 264 | </div> |
| 265 | <a id="a1adbda8257d3a74a0566e0d8407ff458"></a> |
| 266 | <h2 class="memtitle"><span class="permalink"><a href="#a1adbda8257d3a74a0566e0d8407ff458">◆ </a></span>ReadPacket()</h2> |
| 267 | |
| 268 | <div class="memitem"> |
| 269 | <div class="memproto"> |
| 270 | <table class="mlabels"> |
| 271 | <tr> |
| 272 | <td class="mlabels-left"> |
| 273 | <table class="memname"> |
| 274 | <tr> |
| 275 | <td class="memname"><a class="el" href="classarmnn_1_1profiling_1_1_packet.xhtml">Packet</a> ReadPacket </td> |
| 276 | <td>(</td> |
| 277 | <td class="paramtype">uint32_t </td> |
| 278 | <td class="paramname"><em>timeout</em></td><td>)</td> |
| 279 | <td></td> |
| 280 | </tr> |
| 281 | </table> |
| 282 | </td> |
| 283 | <td class="mlabels-right"> |
| 284 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 285 | </tr> |
| 286 | </table> |
| 287 | </div><div class="memdoc"> |
| 288 | |
| 289 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection.xhtml#a935e16d85893a31f23cd78e47b85466d">IProfilingConnection</a>.</p> |
| 290 | |
| 291 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml#l00166">166</a> of file <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml">FileOnlyProfilingConnection.cpp</a>.</p> |
| 292 | |
| 293 | <p class="reference">References <a class="el" href="namespacearmnn_1_1profiling.xhtml#a006732ecc1f16712db06bf622eb79651aefe19217ee8d2186e7bbecbf2f171eb9">armnn::profiling::BeWire</a>, <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml#l00032">FileOnlyProfilingConnection::Close()</a>, <a class="el" href="namespacearmnn_1_1profiling.xhtml#a083225fb2313ee056142bbee0c44de36ad2cacb6bc37a3363ae810b656e3b6190">armnn::profiling::CounterDirectory</a>, <a class="el" href="namespacearmnn_1_1profiling.xhtml#a083225fb2313ee056142bbee0c44de36ae43273a3645f4894a1088081feb9827d">armnn::profiling::StreamMetaData</a>, and <a class="el" href="namespacearmnn_1_1profiling.xhtml#a083225fb2313ee056142bbee0c44de36a88183b946cc5f0e8c96b2e66e1c74a7e">armnn::profiling::Unknown</a>.</p> |
| 294 | <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.xhtml">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_xhtml"><div class="ttname"><a href="classarmnn_1_1_timeout_exception.xhtml">armnn::TimeoutException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00135">Exceptions.hpp:135</a></div></div> |
| 295 | </div><!-- fragment --> |
| 296 | </div> |
| 297 | </div> |
| 298 | <a id="a42eb542b5a1d73d00c4ce474140bb78c"></a> |
| 299 | <h2 class="memtitle"><span class="permalink"><a href="#a42eb542b5a1d73d00c4ce474140bb78c">◆ </a></span>WritePacket()</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">bool WritePacket </td> |
| 309 | <td>(</td> |
| 310 | <td class="paramtype">const unsigned char * </td> |
| 311 | <td class="paramname"><em>buffer</em>, </td> |
| 312 | </tr> |
| 313 | <tr> |
| 314 | <td class="paramkey"></td> |
| 315 | <td></td> |
| 316 | <td class="paramtype">uint32_t </td> |
| 317 | <td class="paramname"><em>length</em> </td> |
| 318 | </tr> |
| 319 | <tr> |
| 320 | <td></td> |
| 321 | <td>)</td> |
| 322 | <td></td><td></td> |
| 323 | </tr> |
| 324 | </table> |
| 325 | </td> |
| 326 | <td class="mlabels-right"> |
| 327 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 328 | </tr> |
| 329 | </table> |
| 330 | </div><div class="memdoc"> |
| 331 | |
| 332 | <p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection.xhtml#ac78c6bd1a545934a805c88194214b09d">IProfilingConnection</a>.</p> |
| 333 | |
| 334 | <p class="definition">Definition at line <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml#l00112">112</a> of file <a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml">FileOnlyProfilingConnection.cpp</a>.</p> |
| 335 | |
| 336 | <p class="reference">References <a class="el" href="namespacearmnn_1_1profiling.xhtml#a083225fb2313ee056142bbee0c44de36ad2cacb6bc37a3363ae810b656e3b6190">armnn::profiling::CounterDirectory</a>, <a class="el" href="classarmnn_1_1profiling_1_1_i_counter_directory.xhtml#a718a75d4c178cf3f687b3f27b8f55091">ICounterDirectory::GetCategories()</a>, <a class="el" href="_encode_version_8hpp_source.xhtml#l00045">Version::GetEncodedValue()</a>, <a class="el" href="_packet_version_resolver_8cpp_source.xhtml#l00055">PacketVersionResolver::ResolvePacketVersion()</a>, and <a class="el" href="namespacearmnn_1_1profiling.xhtml#a083225fb2313ee056142bbee0c44de36ae43273a3645f4894a1088081feb9827d">armnn::profiling::StreamMetaData</a>.</p> |
| 337 | <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.xhtml#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.xhtml#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.xhtml#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.xhtml">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.xhtml#ac8ad466123304f923e64997ac096926a">ResolvePacketVersion</a>(0, 2).<a class="code" href="classarmnn_1_1profiling_1_1_version.xhtml#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_version_xhtml_a0ab0d5a402c197d4093cbc5fdbf81214"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_version.xhtml#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.xhtml#l00045">EncodeVersion.hpp:45</a></div></div> |
| 338 | <div class="ttc" id="classarmnn_1_1profiling_1_1_packet_version_resolver_xhtml_ac8ad466123304f923e64997ac096926a"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_packet_version_resolver.xhtml#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.xhtml#l00055">PacketVersionResolver.cpp:55</a></div></div> |
| 339 | <div class="ttc" id="classarmnn_1_1profiling_1_1_packet_version_resolver_xhtml"><div class="ttname"><a href="classarmnn_1_1profiling_1_1_packet_version_resolver.xhtml">armnn::profiling::PacketVersionResolver</a></div><div class="ttdef"><b>Definition:</b> <a href="_packet_version_resolver_8hpp_source.xhtml#l00036">PacketVersionResolver.hpp:36</a></div></div> |
| 340 | <div class="ttc" id="namespacearmnn_1_1profiling_xhtml_a083225fb2313ee056142bbee0c44de36ae43273a3645f4894a1088081feb9827d"><div class="ttname"><a href="namespacearmnn_1_1profiling.xhtml#a083225fb2313ee056142bbee0c44de36ae43273a3645f4894a1088081feb9827d">armnn::profiling::PackageActivity::StreamMetaData</a></div></div> |
| 341 | <div class="ttc" id="namespacearmnn_1_1profiling_xhtml_a083225fb2313ee056142bbee0c44de36ad2cacb6bc37a3363ae810b656e3b6190"><div class="ttname"><a href="namespacearmnn_1_1profiling.xhtml#a083225fb2313ee056142bbee0c44de36ad2cacb6bc37a3363ae810b656e3b6190">armnn::profiling::PackageActivity::CounterDirectory</a></div></div> |
| 342 | <div class="ttc" id="namespacearmnn_1_1profiling_xhtml_a083225fb2313ee056142bbee0c44de36"><div class="ttname"><a href="namespacearmnn_1_1profiling.xhtml#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.xhtml#l00030">FileOnlyProfilingConnection.hpp:30</a></div></div> |
| 343 | </div><!-- fragment --> |
| 344 | </div> |
| 345 | </div> |
| 346 | <hr/>The documentation for this class was generated from the following files:<ul> |
| 347 | <li>src/profiling/<a class="el" href="_file_only_profiling_connection_8hpp_source.xhtml">FileOnlyProfilingConnection.hpp</a></li> |
| 348 | <li>src/profiling/<a class="el" href="_file_only_profiling_connection_8cpp_source.xhtml">FileOnlyProfilingConnection.cpp</a></li> |
| 349 | </ul> |
| 350 | </div><!-- contents --> |
| 351 | </div><!-- doc-content --> |
| 352 | <!-- start footer part --> |
| 353 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 354 | <ul> |
| 355 | <li class="navelem"><a class="el" href="namespacearmnn.xhtml">armnn</a></li><li class="navelem"><a class="el" href="namespacearmnn_1_1profiling.xhtml">profiling</a></li><li class="navelem"><a class="el" href="classarmnn_1_1profiling_1_1_file_only_profiling_connection.xhtml">FileOnlyProfilingConnection</a></li> |
| 356 | <li class="footer">Generated on Fri Mar 13 2020 16:09:21 for ArmNN by |
| 357 | <a href="http://www.doxygen.org/index.html"> |
| 358 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 359 | </ul> |
| 360 | </div> |
| 361 | </body> |
| 362 | </html> |