aboutsummaryrefslogtreecommitdiff
path: root/21.02/classarmnn_1_1profiling_1_1_profiling_connection_factory.xhtml
blob: c3c14a83154e10dc1eff1983ad81ac9116b748fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<!-- Copyright (c) 2020 ARM Limited. -->
<!--                                 -->
<!-- SPDX-License-Identifier: MIT    -->
<!--                                 -->
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ArmNN: ProfilingConnectionFactory Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 10rem; margin-top: .5rem; margin-left 10px"/>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">21.02</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classarmnn_1_1profiling_1_1_profiling_connection_factory.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classarmnn_1_1profiling_1_1_profiling_connection_factory-members.xhtml">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ProfilingConnectionFactory Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_profiling_connection_factory_8hpp_source.xhtml">ProfilingConnectionFactory.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ProfilingConnectionFactory:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classarmnn_1_1profiling_1_1_profiling_connection_factory.png" usemap="#ProfilingConnectionFactory_map" alt=""/>
  <map id="ProfilingConnectionFactory_map" name="ProfilingConnectionFactory_map">
<area href="classarmnn_1_1profiling_1_1_i_profiling_connection_factory.xhtml" alt="IProfilingConnectionFactory" shape="rect" coords="0,0,170,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a021636a4ab3e8be192977226e1040fb5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_profiling_connection_factory.xhtml#a021636a4ab3e8be192977226e1040fb5">ProfilingConnectionFactory</a> ()=default</td></tr>
<tr class="separator:a021636a4ab3e8be192977226e1040fb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa0882e4e30b0c255861f151a2538515"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_profiling_connection_factory.xhtml#afa0882e4e30b0c255861f151a2538515">~ProfilingConnectionFactory</a> ()=default</td></tr>
<tr class="separator:afa0882e4e30b0c255861f151a2538515"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a627a4a9df4ecd888a1cf3380c5563d50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection_factory.xhtml#abb7f442bd7409c8dff2b9346fd67bce3">IProfilingConnectionPtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_profiling_connection_factory.xhtml#a627a4a9df4ecd888a1cf3380c5563d50">GetProfilingConnection</a> (const <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection_factory.xhtml#a1e3ab71aae7621abd6c1a16cc71b68e0">ExternalProfilingOptions</a> &amp;options) const override</td></tr>
<tr class="separator:a627a4a9df4ecd888a1cf3380c5563d50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classarmnn_1_1profiling_1_1_i_profiling_connection_factory"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarmnn_1_1profiling_1_1_i_profiling_connection_factory')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection_factory.xhtml">IProfilingConnectionFactory</a></td></tr>
<tr class="memitem:a0edc1350a5dcc81620a1f28e2a1051f2 inherit pub_methods_classarmnn_1_1profiling_1_1_i_profiling_connection_factory"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection_factory.xhtml#a0edc1350a5dcc81620a1f28e2a1051f2">~IProfilingConnectionFactory</a> ()</td></tr>
<tr class="separator:a0edc1350a5dcc81620a1f28e2a1051f2 inherit pub_methods_classarmnn_1_1profiling_1_1_i_profiling_connection_factory"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_types_classarmnn_1_1profiling_1_1_i_profiling_connection_factory"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classarmnn_1_1profiling_1_1_i_profiling_connection_factory')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection_factory.xhtml">IProfilingConnectionFactory</a></td></tr>
<tr class="memitem:a1e3ab71aae7621abd6c1a16cc71b68e0 inherit pub_types_classarmnn_1_1profiling_1_1_i_profiling_connection_factory"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection_factory.xhtml#a1e3ab71aae7621abd6c1a16cc71b68e0">ExternalProfilingOptions</a> = <a class="el" href="structarmnn_1_1_i_runtime_1_1_creation_options_1_1_external_profiling_options.xhtml">IRuntime::CreationOptions::ExternalProfilingOptions</a></td></tr>
<tr class="separator:a1e3ab71aae7621abd6c1a16cc71b68e0 inherit pub_types_classarmnn_1_1profiling_1_1_i_profiling_connection_factory"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abb7f442bd7409c8dff2b9346fd67bce3 inherit pub_types_classarmnn_1_1profiling_1_1_i_profiling_connection_factory"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection_factory.xhtml#abb7f442bd7409c8dff2b9346fd67bce3">IProfilingConnectionPtr</a> = std::unique_ptr&lt; <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection.xhtml">IProfilingConnection</a> &gt;</td></tr>
<tr class="separator:abb7f442bd7409c8dff2b9346fd67bce3 inherit pub_types_classarmnn_1_1profiling_1_1_i_profiling_connection_factory"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock">
<p class="definition">Definition at line <a class="el" href="_profiling_connection_factory_8hpp_source.xhtml#l00016">16</a> of file <a class="el" href="_profiling_connection_factory_8hpp_source.xhtml">ProfilingConnectionFactory.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a021636a4ab3e8be192977226e1040fb5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a021636a4ab3e8be192977226e1040fb5">&#9670;&nbsp;</a></span>ProfilingConnectionFactory()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarmnn_1_1profiling_1_1_profiling_connection_factory.xhtml">ProfilingConnectionFactory</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="afa0882e4e30b0c255861f151a2538515"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afa0882e4e30b0c255861f151a2538515">&#9670;&nbsp;</a></span>~ProfilingConnectionFactory()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">~<a class="el" href="classarmnn_1_1profiling_1_1_profiling_connection_factory.xhtml">ProfilingConnectionFactory</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a627a4a9df4ecd888a1cf3380c5563d50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a627a4a9df4ecd888a1cf3380c5563d50">&#9670;&nbsp;</a></span>GetProfilingConnection()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::unique_ptr&lt; <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection.xhtml">IProfilingConnection</a> &gt; GetProfilingConnection </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection_factory.xhtml#a1e3ab71aae7621abd6c1a16cc71b68e0">ExternalProfilingOptions</a> &amp;&#160;</td>
          <td class="paramname"><em>options</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Implements <a class="el" href="classarmnn_1_1profiling_1_1_i_profiling_connection_factory.xhtml#a18f247c2a53095da228e441270536b03">IProfilingConnectionFactory</a>.</p>

<p class="definition">Definition at line <a class="el" href="_profiling_connection_factory_8cpp_source.xhtml#l00018">18</a> of file <a class="el" href="_profiling_connection_factory_8cpp_source.xhtml">ProfilingConnectionFactory.cpp</a>.</p>

<p class="reference">References <a class="el" href="_i_runtime_8hpp_source.xhtml#l00081">IRuntime::CreationOptions::ExternalProfilingOptions::m_FileFormat</a>, <a class="el" href="_i_runtime_8hpp_source.xhtml#l00079">IRuntime::CreationOptions::ExternalProfilingOptions::m_FileOnly</a>, <a class="el" href="_i_runtime_8hpp_source.xhtml#l00078">IRuntime::CreationOptions::ExternalProfilingOptions::m_IncomingCaptureFile</a>, <a class="el" href="_i_runtime_8hpp_source.xhtml#l00082">IRuntime::CreationOptions::ExternalProfilingOptions::m_LocalPacketHandlers</a>, and <a class="el" href="_i_runtime_8hpp_source.xhtml#l00077">IRuntime::CreationOptions::ExternalProfilingOptions::m_OutgoingCaptureFile</a>.</p>
<div class="fragment"><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;{</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    <span class="comment">// Before proceed to create the IProfilingConnection, check if the file format is supported</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    <span class="keywordflow">if</span> (!(options.m_FileFormat == <span class="stringliteral">&quot;binary&quot;</span>))</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    {</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;        <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_unimplemented_exception.xhtml">armnn::UnimplementedException</a>(<span class="stringliteral">&quot;Unsupported profiling file format, only binary is supported&quot;</span>);</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    }</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="comment">// We can create 3 different types of IProfilingConnection.</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="comment">// 1: If no relevant options are specified then a SocketProfilingConnection is returned.</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <span class="comment">// 2: If both incoming and outgoing capture files are specified then a SocketProfilingConnection decorated by a</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="comment">//    ProfilingConnectionDumpToFileDecorator is returned.</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="comment">// 3: If both incoming and outgoing capture files are specified and &quot;file only&quot; then a FileOnlyProfilingConnection</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="comment">//    decorated by a ProfilingConnectionDumpToFileDecorator is returned.</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="comment">// 4. There is now another option if m_FileOnly == true and there are ILocalPacketHandlers specified</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="comment">//    we can create a FileOnlyProfilingConnection without a file dump</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keywordflow">if</span> ((!options.m_IncomingCaptureFile.empty() || !options.m_OutgoingCaptureFile.empty()) &amp;&amp; !options.m_FileOnly)</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    {</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        <span class="comment">// This is type 2.</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        <span class="keywordflow">return</span> std::make_unique&lt;ProfilingConnectionDumpToFileDecorator&gt;(std::make_unique&lt;SocketProfilingConnection&gt;(),</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;                                                                        options);</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    }</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((!options.m_IncomingCaptureFile.empty() || !options.m_OutgoingCaptureFile.empty()) &amp;&amp; options.m_FileOnly)</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    {</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="comment">// This is type 3.</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="keywordflow">return</span> std::make_unique&lt;ProfilingConnectionDumpToFileDecorator&gt;(</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;            std::make_unique&lt;FileOnlyProfilingConnection&gt;(options), options);</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    }</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (options.m_FileOnly &amp;&amp; !options.m_LocalPacketHandlers.empty())</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    {</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <span class="comment">// This is the type 4.</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <span class="keywordflow">return</span> std::make_unique&lt;FileOnlyProfilingConnection&gt;(options);</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    }</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    {</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        <span class="comment">// This is type 1.</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="keywordflow">return</span> std::make_unique&lt;SocketProfilingConnection&gt;();</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    }</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_unimplemented_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_unimplemented_exception.xhtml">armnn::UnimplementedException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00098">Exceptions.hpp:98</a></div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/profiling/<a class="el" href="_profiling_connection_factory_8hpp_source.xhtml">ProfilingConnectionFactory.hpp</a></li>
<li>src/profiling/<a class="el" href="_profiling_connection_factory_8cpp_source.xhtml">ProfilingConnectionFactory.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <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_profiling_connection_factory.xhtml">ProfilingConnectionFactory</a></li>
    <li class="footer">Generated on Thu Feb 25 2021 17:28:02 for ArmNN by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>