Update ACL pin to 8abbabd6ad946441c8ef1a03896fa98f7801af1f
[platform/upstream/armnn.git] / Documentation / classarmnn_1_1_profiler.html
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: Profiler 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    &#160;<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_1_profiler.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="#nested-classes">Classes</a> &#124;
85 <a href="#pub-types">Public Types</a> &#124;
86 <a href="#pub-methods">Public Member Functions</a> &#124;
87 <a href="#friends">Friends</a> &#124;
88 <a href="classarmnn_1_1_profiler-members.html">List of all members</a>  </div>
89   <div class="headertitle">
90 <div class="title">Profiler Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div>  </div>
91 </div><!--header-->
92 <div class="contents">
93
94 <p><code>#include &lt;<a class="el" href="_profiling_8hpp_source.html">Profiling.hpp</a>&gt;</code></p>
95 <div class="dynheader">
96 Inheritance diagram for Profiler:</div>
97 <div class="dyncontent">
98  <div class="center">
99   <img src="classarmnn_1_1_profiler.png" usemap="#Profiler_map" alt=""/>
100   <map id="Profiler_map" name="Profiler_map">
101 <area href="classarmnn_1_1_i_profiler.html" alt="IProfiler" shape="rect" coords="0,0,57,24"/>
102 </map>
103  </div></div>
104 <table class="memberdecls">
105 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
106 Public Types</h2></td></tr>
107 <tr class="memitem:a70926d23f3aef7e657a9057a7badb014"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_profiler.html#a70926d23f3aef7e657a9057a7badb014">InstrumentPtr</a> = std::unique_ptr&lt; <a class="el" href="classarmnn_1_1_instrument.html">Instrument</a> &gt;</td></tr>
108 <tr class="separator:a70926d23f3aef7e657a9057a7badb014"><td class="memSeparator" colspan="2">&#160;</td></tr>
109 </table><table class="memberdecls">
110 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
111 Public Member Functions</h2></td></tr>
112 <tr class="memitem:a997beb676bd403881fa274ec7ac9854c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_profiler.html#a997beb676bd403881fa274ec7ac9854c">Profiler</a> ()</td></tr>
113 <tr class="separator:a997beb676bd403881fa274ec7ac9854c"><td class="memSeparator" colspan="2">&#160;</td></tr>
114 <tr class="memitem:aa0f87e10a29a76f6358f43b09621df51"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_profiler.html#aa0f87e10a29a76f6358f43b09621df51">~Profiler</a> ()</td></tr>
115 <tr class="separator:aa0f87e10a29a76f6358f43b09621df51"><td class="memSeparator" colspan="2">&#160;</td></tr>
116 <tr class="memitem:abaf660a136b904fbcbd0c374fea38cd0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_event.html">Event</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_profiler.html#abaf660a136b904fbcbd0c374fea38cd0">BeginEvent</a> (const <a class="el" href="classarmnn_1_1_backend_id.html">BackendId</a> &amp;backendId, const std::string &amp;name, std::vector&lt; <a class="el" href="classarmnn_1_1_profiler.html#a70926d23f3aef7e657a9057a7badb014">InstrumentPtr</a> &gt; &amp;&amp;instruments)</td></tr>
117 <tr class="separator:abaf660a136b904fbcbd0c374fea38cd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
118 <tr class="memitem:a8ed16398e69bb7b0625e3cf4a279b1f3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_profiler.html#a8ed16398e69bb7b0625e3cf4a279b1f3">EndEvent</a> (<a class="el" href="classarmnn_1_1_event.html">Event</a> *event)</td></tr>
119 <tr class="separator:a8ed16398e69bb7b0625e3cf4a279b1f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
120 <tr class="memitem:a537b76b2a9f7fbcb538eabe994e424e0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_profiler.html#a537b76b2a9f7fbcb538eabe994e424e0">EnableProfiling</a> (bool enableProfiling) override</td></tr>
121 <tr class="separator:a537b76b2a9f7fbcb538eabe994e424e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
122 <tr class="memitem:ad5ac843dd60a0ff7d4ab327f43fb88a5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_profiler.html#ad5ac843dd60a0ff7d4ab327f43fb88a5">IsProfilingEnabled</a> () override</td></tr>
123 <tr class="separator:ad5ac843dd60a0ff7d4ab327f43fb88a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
124 <tr class="memitem:afb5ba6c1110d2ea400f49ad7f3ac4d15"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_profiler.html#afb5ba6c1110d2ea400f49ad7f3ac4d15">UpdateEventTag</a> ()</td></tr>
125 <tr class="separator:afb5ba6c1110d2ea400f49ad7f3ac4d15"><td class="memSeparator" colspan="2">&#160;</td></tr>
126 <tr class="memitem:aeb61437c18e4bc111811428aec0e3ae9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_profiler.html#aeb61437c18e4bc111811428aec0e3ae9">AnalyzeEventsAndWriteResults</a> (std::ostream &amp;outStream) const override</td></tr>
127 <tr class="separator:aeb61437c18e4bc111811428aec0e3ae9"><td class="memSeparator" colspan="2">&#160;</td></tr>
128 <tr class="memitem:a352a82f3a338acf06a20d290f605c489"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_profiler.html#a352a82f3a338acf06a20d290f605c489">Print</a> (std::ostream &amp;outStream) const override</td></tr>
129 <tr class="separator:a352a82f3a338acf06a20d290f605c489"><td class="memSeparator" colspan="2">&#160;</td></tr>
130 <tr class="memitem:ac2afea56b7e3ffcc81f49f15febf88f1"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_profiler.html#ac2afea56b7e3ffcc81f49f15febf88f1">GetEventColor</a> (const <a class="el" href="classarmnn_1_1_backend_id.html">BackendId</a> &amp;backendId) const</td></tr>
131 <tr class="separator:ac2afea56b7e3ffcc81f49f15febf88f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
132 <tr class="memitem:a949493a67655a79249dffa9bac9a5d0b"><td class="memTemplParams" colspan="2">template&lt;typename ItertType &gt; </td></tr>
133 <tr class="memitem:a949493a67655a79249dffa9bac9a5d0b"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_profiler.html#a949493a67655a79249dffa9bac9a5d0b">AnalyzeEventSequenceAndWriteResults</a> (ItertType first, ItertType last, std::ostream &amp;outStream) const</td></tr>
134 <tr class="separator:a949493a67655a79249dffa9bac9a5d0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
135 </table><table class="memberdecls">
136 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
137 Friends</h2></td></tr>
138 <tr class="memitem:a3269840850209f5ae295310924b6175f"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_profiler.html#a3269840850209f5ae295310924b6175f">GetProfilerEventSequenceSize</a> (<a class="el" href="classarmnn_1_1_profiler.html">armnn::Profiler</a> *profiler)</td></tr>
139 <tr class="separator:a3269840850209f5ae295310924b6175f"><td class="memSeparator" colspan="2">&#160;</td></tr>
140 </table><table class="memberdecls">
141 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
142 Additional Inherited Members</h2></td></tr>
143 <tr class="inherit_header pro_methods_classarmnn_1_1_i_profiler"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classarmnn_1_1_i_profiler')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classarmnn_1_1_i_profiler.html">IProfiler</a></td></tr>
144 <tr class="memitem:a3e96ca374a63bd8547fe68a5d9809df7 inherit pro_methods_classarmnn_1_1_i_profiler"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_i_profiler.html#a3e96ca374a63bd8547fe68a5d9809df7">~IProfiler</a> ()</td></tr>
145 <tr class="separator:a3e96ca374a63bd8547fe68a5d9809df7 inherit pro_methods_classarmnn_1_1_i_profiler"><td class="memSeparator" colspan="2">&#160;</td></tr>
146 </table>
147 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
148 <div class="textblock">
149 <p class="definition">Definition at line <a class="el" href="_profiling_8hpp_source.html#l00028">28</a> of file <a class="el" href="_profiling_8hpp_source.html">Profiling.hpp</a>.</p>
150 </div><h2 class="groupheader">Member Typedef Documentation</h2>
151 <a id="a70926d23f3aef7e657a9057a7badb014"></a>
152 <h2 class="memtitle"><span class="permalink"><a href="#a70926d23f3aef7e657a9057a7badb014">&#9670;&nbsp;</a></span>InstrumentPtr</h2>
153
154 <div class="memitem">
155 <div class="memproto">
156       <table class="memname">
157         <tr>
158           <td class="memname">using <a class="el" href="classarmnn_1_1_profiler.html#a70926d23f3aef7e657a9057a7badb014">InstrumentPtr</a> =  std::unique_ptr&lt;<a class="el" href="classarmnn_1_1_instrument.html">Instrument</a>&gt;</td>
159         </tr>
160       </table>
161 </div><div class="memdoc">
162
163 <p class="definition">Definition at line <a class="el" href="_profiling_8hpp_source.html#l00033">33</a> of file <a class="el" href="_profiling_8hpp_source.html">Profiling.hpp</a>.</p>
164
165 </div>
166 </div>
167 <h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
168 <a id="a997beb676bd403881fa274ec7ac9854c"></a>
169 <h2 class="memtitle"><span class="permalink"><a href="#a997beb676bd403881fa274ec7ac9854c">&#9670;&nbsp;</a></span>Profiler()</h2>
170
171 <div class="memitem">
172 <div class="memproto">
173       <table class="memname">
174         <tr>
175           <td class="memname"><a class="el" href="classarmnn_1_1_profiler.html">Profiler</a> </td>
176           <td>(</td>
177           <td class="paramname"></td><td>)</td>
178           <td></td>
179         </tr>
180       </table>
181 </div><div class="memdoc">
182
183 <p class="definition">Definition at line <a class="el" href="_profiling_8cpp_source.html#l00165">165</a> of file <a class="el" href="_profiling_8cpp_source.html">Profiling.cpp</a>.</p>
184 <div class="fragment"><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    : m_ProfilingEnabled(<span class="keyword">false</span>)</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;{</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    m_EventSequence.reserve(<a class="code" href="namespacearmnn.html#a43ecd194778b7653578044060ba8695e">g_ProfilingEventCountHint</a>);</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="preprocessor">#if ARMNN_STREAMLINE_ENABLED</span></div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="comment">// Initialises streamline annotations.</span></div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    ANNOTATE_SETUP;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;}</div><div class="ttc" id="namespacearmnn_html_a43ecd194778b7653578044060ba8695e"><div class="ttname"><a href="namespacearmnn.html#a43ecd194778b7653578044060ba8695e">armnn::g_ProfilingEventCountHint</a></div><div class="ttdeci">constexpr std::size_t g_ProfilingEventCountHint</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_8cpp_source.html#l00030">Profiling.cpp:30</a></div></div>
185 </div><!-- fragment -->
186 </div>
187 </div>
188 <a id="aa0f87e10a29a76f6358f43b09621df51"></a>
189 <h2 class="memtitle"><span class="permalink"><a href="#aa0f87e10a29a76f6358f43b09621df51">&#9670;&nbsp;</a></span>~Profiler()</h2>
190
191 <div class="memitem">
192 <div class="memproto">
193       <table class="memname">
194         <tr>
195           <td class="memname">~<a class="el" href="classarmnn_1_1_profiler.html">Profiler</a> </td>
196           <td>(</td>
197           <td class="paramname"></td><td>)</td>
198           <td></td>
199         </tr>
200       </table>
201 </div><div class="memdoc">
202
203 <p class="definition">Definition at line <a class="el" href="_profiling_8cpp_source.html#l00176">176</a> of file <a class="el" href="_profiling_8cpp_source.html">Profiling.cpp</a>.</p>
204
205 <p class="reference">References <a class="el" href="_profiling_8cpp_source.html#l00486">ProfilerManager::GetInstance()</a>, <a class="el" href="_profiling_8cpp_source.html#l00330">Profiler::Print()</a>, and <a class="el" href="_profiling_8cpp_source.html#l00493">ProfilerManager::RegisterProfiler()</a>.</p>
206 <div class="fragment"><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;{</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <span class="keywordflow">if</span> (m_ProfilingEnabled)</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    {</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        <span class="keywordflow">if</span> (<a class="code" href="namespacearmnn.html#a6ce7e56eb10e440463f09eee8f213adc">g_WriteReportToStdOutOnProfilerDestruction</a>)</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        {</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;            <a class="code" href="classarmnn_1_1_profiler.html#a352a82f3a338acf06a20d290f605c489">Print</a>(std::cout);</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        }</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    }</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="comment">// Un-register this profiler from the current thread.</span></div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    <a class="code" href="classarmnn_1_1_profiler_manager.html#a93857080c2523bf3395e7aa7e6024d5c">ProfilerManager::GetInstance</a>().<a class="code" href="classarmnn_1_1_profiler_manager.html#a029a40ab5d837b3d4f5d3900ceb6a8f9">RegisterProfiler</a>(<span class="keyword">nullptr</span>);</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;}</div><div class="ttc" id="namespacearmnn_html_a6ce7e56eb10e440463f09eee8f213adc"><div class="ttname"><a href="namespacearmnn.html#a6ce7e56eb10e440463f09eee8f213adc">armnn::g_WriteReportToStdOutOnProfilerDestruction</a></div><div class="ttdeci">constexpr bool g_WriteReportToStdOutOnProfilerDestruction</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_8cpp_source.html#l00042">Profiling.cpp:42</a></div></div>
207 <div class="ttc" id="classarmnn_1_1_profiler_html_a352a82f3a338acf06a20d290f605c489"><div class="ttname"><a href="classarmnn_1_1_profiler.html#a352a82f3a338acf06a20d290f605c489">armnn::Profiler::Print</a></div><div class="ttdeci">void Print(std::ostream &amp;outStream) const override</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_8cpp_source.html#l00330">Profiling.cpp:330</a></div></div>
208 <div class="ttc" id="classarmnn_1_1_profiler_manager_html_a029a40ab5d837b3d4f5d3900ceb6a8f9"><div class="ttname"><a href="classarmnn_1_1_profiler_manager.html#a029a40ab5d837b3d4f5d3900ceb6a8f9">armnn::ProfilerManager::RegisterProfiler</a></div><div class="ttdeci">void RegisterProfiler(Profiler *profiler)</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_8cpp_source.html#l00493">Profiling.cpp:493</a></div></div>
209 <div class="ttc" id="classarmnn_1_1_profiler_manager_html_a93857080c2523bf3395e7aa7e6024d5c"><div class="ttname"><a href="classarmnn_1_1_profiler_manager.html#a93857080c2523bf3395e7aa7e6024d5c">armnn::ProfilerManager::GetInstance</a></div><div class="ttdeci">static ProfilerManager &amp; GetInstance()</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_8cpp_source.html#l00486">Profiling.cpp:486</a></div></div>
210 </div><!-- fragment -->
211 </div>
212 </div>
213 <h2 class="groupheader">Member Function Documentation</h2>
214 <a id="aeb61437c18e4bc111811428aec0e3ae9"></a>
215 <h2 class="memtitle"><span class="permalink"><a href="#aeb61437c18e4bc111811428aec0e3ae9">&#9670;&nbsp;</a></span>AnalyzeEventsAndWriteResults()</h2>
216
217 <div class="memitem">
218 <div class="memproto">
219 <table class="mlabels">
220   <tr>
221   <td class="mlabels-left">
222       <table class="memname">
223         <tr>
224           <td class="memname">void AnalyzeEventsAndWriteResults </td>
225           <td>(</td>
226           <td class="paramtype">std::ostream &amp;&#160;</td>
227           <td class="paramname"><em>outStream</em></td><td>)</td>
228           <td> const</td>
229         </tr>
230       </table>
231   </td>
232   <td class="mlabels-right">
233 <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
234   </tr>
235 </table>
236 </div><div class="memdoc">
237 <p>Analyzes the tracked events and writes the results to the given output stream. Please refer to the configuration variables in <a class="el" href="_profiling_8cpp.html">Profiling.cpp</a> to customize the information written. </p><dl class="params"><dt>Parameters</dt><dd>
238   <table class="params">
239     <tr><td class="paramdir">[out]</td><td class="paramname">outStream</td><td>The stream where to write the profiling results to. </td></tr>
240   </table>
241   </dd>
242 </dl>
243
244 <p>Implements <a class="el" href="classarmnn_1_1_i_profiler.html#aea4e445e340cb3a7fbb51465cf029724">IProfiler</a>.</p>
245
246 <p class="definition">Definition at line <a class="el" href="_profiling_8cpp_source.html#l00380">380</a> of file <a class="el" href="_profiling_8cpp_source.html">Profiling.cpp</a>.</p>
247
248 <p class="reference">References <a class="el" href="_profiling_8cpp_source.html#l00234">armnn::CalcLevel()</a>.</p>
249 <div class="fragment"><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;{</div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;    <span class="comment">// Stack should be empty now.</span></div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;    <span class="keyword">const</span> <span class="keywordtype">bool</span> saneMarkerSequence = m_Parents.empty();</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;    <span class="comment">// Abort if the sequence of markers was found to have incorrect information:</span></div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;    <span class="comment">// The stats cannot be trusted.</span></div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    <span class="keywordflow">if</span> (!saneMarkerSequence)</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;    {</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;        outStream &lt;&lt; <span class="stringliteral">&quot;Cannot write profiling stats. &quot;</span></div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;            <span class="stringliteral">&quot;Unexpected errors were found when analyzing the sequence of logged events, which may lead to plainly &quot;</span></div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;            <span class="stringliteral">&quot;wrong stats. The profiling system may contain implementation issues or could have been used in an &quot;</span></div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;            <span class="stringliteral">&quot;unsafe manner.&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;        <span class="keywordflow">return</span>;</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;    }</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;    <span class="comment">// Analyzes the full sequence of events.</span></div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;    AnalyzeEventSequenceAndWriteResults(m_EventSequence.cbegin(),</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;                                        m_EventSequence.cend(),</div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;                                        outStream);</div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;</div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;    <span class="comment">// Aggregates events by tag if requested (spams the output stream if done for all tags).</span></div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="namespacearmnn.html#aacc0d11e271ebbfcff9d613dd17604aa">g_AggregateProfilingEventsByInference</a>)</div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;    {</div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;        outStream &lt;&lt; std::endl;</div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;        outStream &lt;&lt; <span class="stringliteral">&quot;***&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;        outStream &lt;&lt; <span class="stringliteral">&quot;*** Per Inference Stats&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;        outStream &lt;&lt; <span class="stringliteral">&quot;***&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;        outStream &lt;&lt; std::endl;</div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;</div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;        <span class="keywordtype">int</span> baseLevel = -1;</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;        std::vector&lt;const Event*&gt; inferences;</div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;        PopulateInferences(inferences, baseLevel);</div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;</div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;        <span class="comment">// Second map out descendants hierarchy</span></div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;        std::map&lt;const Event*, std::vector&lt;const Event*&gt;&gt; descendantsMap;</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;        PopulateDescendants(descendantsMap);</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;        std::function&lt;void (const Event*, std::vector&lt;const Event*&gt;&amp;)&gt;</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;            FindDescendantEvents = [&amp;](<span class="keyword">const</span> <a class="code" href="struct_event.html">Event</a>* eventPtr,</div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;                std::vector&lt;const Event*&gt;&amp; sequence)</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;            {</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;                sequence.push_back(eventPtr);</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;</div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="namespacearmnn.html#a20f74b679d59b52e9fae3bbef8f10ffb">CalcLevel</a>(eventPtr) &gt; baseLevel+2) <span class="comment">//We only care about levels as deep as workload executions.</span></div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;                {</div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;                    <span class="keywordflow">return</span>;</div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;                }</div><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;</div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;                <span class="keyword">auto</span> children = descendantsMap.find(eventPtr);</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;                <span class="keywordflow">if</span> (children == descendantsMap.end())</div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;                {</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;                    <span class="keywordflow">return</span>;</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;                }</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;                <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code" href="struct_event.html">Event</a>* child : children-&gt;second)</div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;                {</div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;                    <span class="keywordflow">return</span> FindDescendantEvents(child, sequence);</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;                }</div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;            };</div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;</div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;        <span class="comment">// Third, find events belonging to each inference</span></div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;        <span class="keywordtype">int</span> inferenceIdx = 0;</div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;        <span class="keywordflow">for</span> (<span class="keyword">auto</span> inference : inferences)</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;        {</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;            std::vector&lt;const Event*&gt; sequence;</div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;</div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;            <span class="comment">//build sequence, depth first</span></div><div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;            FindDescendantEvents(inference, sequence);</div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;</div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;            outStream &lt;&lt; <span class="stringliteral">&quot;&gt; Begin Inference: &quot;</span> &lt;&lt; inferenceIdx &lt;&lt; std::endl;</div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;            outStream &lt;&lt; std::endl;</div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;            AnalyzeEventSequenceAndWriteResults(sequence.cbegin(),</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;                                                sequence.cend(),</div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;                                                outStream);</div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;            outStream &lt;&lt; std::endl;</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;            outStream &lt;&lt; <span class="stringliteral">&quot;&gt; End Inference: &quot;</span> &lt;&lt; inferenceIdx &lt;&lt; std::endl;</div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;</div><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;            inferenceIdx++;</div><div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;        }</div><div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;    }</div><div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;}</div><div class="ttc" id="namespacearmnn_html_a20f74b679d59b52e9fae3bbef8f10ffb"><div class="ttname"><a href="namespacearmnn.html#a20f74b679d59b52e9fae3bbef8f10ffb">armnn::CalcLevel</a></div><div class="ttdeci">int CalcLevel(const Event *eventPtr)</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_8cpp_source.html#l00234">Profiling.cpp:234</a></div></div>
250 <div class="ttc" id="namespacearmnn_html_aacc0d11e271ebbfcff9d613dd17604aa"><div class="ttname"><a href="namespacearmnn.html#aacc0d11e271ebbfcff9d613dd17604aa">armnn::g_AggregateProfilingEventsByInference</a></div><div class="ttdeci">constexpr bool g_AggregateProfilingEventsByInference</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_8cpp_source.html#l00038">Profiling.cpp:38</a></div></div>
251 <div class="ttc" id="struct_event_html"><div class="ttname"><a href="struct_event.html">Event</a></div><div class="ttdef"><b>Definition:</b> <a href="_timeline_model_8h_source.html#l00035">TimelineModel.h:35</a></div></div>
252 </div><!-- fragment -->
253 </div>
254 </div>
255 <a id="a949493a67655a79249dffa9bac9a5d0b"></a>
256 <h2 class="memtitle"><span class="permalink"><a href="#a949493a67655a79249dffa9bac9a5d0b">&#9670;&nbsp;</a></span>AnalyzeEventSequenceAndWriteResults()</h2>
257
258 <div class="memitem">
259 <div class="memproto">
260       <table class="memname">
261         <tr>
262           <td class="memname">void AnalyzeEventSequenceAndWriteResults </td>
263           <td>(</td>
264           <td class="paramtype">ItertType&#160;</td>
265           <td class="paramname"><em>first</em>, </td>
266         </tr>
267         <tr>
268           <td class="paramkey"></td>
269           <td></td>
270           <td class="paramtype">ItertType&#160;</td>
271           <td class="paramname"><em>last</em>, </td>
272         </tr>
273         <tr>
274           <td class="paramkey"></td>
275           <td></td>
276           <td class="paramtype">std::ostream &amp;&#160;</td>
277           <td class="paramname"><em>outStream</em>&#160;</td>
278         </tr>
279         <tr>
280           <td></td>
281           <td>)</td>
282           <td></td><td> const</td>
283         </tr>
284       </table>
285 </div><div class="memdoc">
286
287 <p class="definition">Definition at line <a class="el" href="_profiling_8cpp_source.html#l00114">114</a> of file <a class="el" href="_profiling_8cpp_source.html">Profiling.cpp</a>.</p>
288
289 <p class="reference">References <a class="el" href="_profiling_8cpp_source.html#l00044">armnn::FindMeasurement()</a>, <a class="el" href="_backend_id_8hpp_source.html#l00136">BackendId::Get()</a>, <a class="el" href="_profiling_event_8cpp_source.html#l00082">Event::GetBackendId()</a>, <a class="el" href="_profiling_8cpp_source.html#l00110">armnn::GetEventPtr()</a>, <a class="el" href="_profiling_event_8cpp_source.html#l00067">Event::GetName()</a>, <a class="el" href="_instrument_8hpp_source.html#l00043">Measurement::m_Value</a>, <a class="el" href="_wall_clock_timer_8hpp_source.html#l00063">WallClockTimer::WALL_CLOCK_TIME</a>, <a class="el" href="_wall_clock_timer_8hpp_source.html#l00064">WallClockTimer::WALL_CLOCK_TIME_START</a>, and <a class="el" href="_wall_clock_timer_8hpp_source.html#l00065">WallClockTimer::WALL_CLOCK_TIME_STOP</a>.</p>
290 <div class="fragment"><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;{</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <span class="comment">// Outputs event sequence, if needed.</span></div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="namespacearmnn.html#a41794552ff67b0dad16de60f9b8e7d7c">g_WriteProfilingEventSequence</a>)</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    {</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <span class="comment">// Makes sure timestamps are output with 6 decimals, and save old settings.</span></div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        std::streamsize oldPrecision = outStream.precision();</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        outStream.precision(6);</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        std::ios_base::fmtflags oldFlags = outStream.flags();</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        outStream.setf(std::ios::fixed);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;        <span class="comment">// Outputs fields.</span></div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;        outStream &lt;&lt; <span class="stringliteral">&quot;Event Sequence - Name | Duration (ms) | Start (ms) | Stop (ms) | Device&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        <span class="keywordflow">for</span> (<span class="keyword">auto</span> event = first; <span class="keyword">event</span> != last; ++event)</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;        {</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;            <span class="keyword">const</span> <a class="code" href="struct_event.html">Event</a>* eventPtr = <a class="code" href="namespacearmnn.html#ab03dcfb3b4019d8f58a67c41681951ae">GetEventPtr</a>((*event));</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;            <span class="keywordtype">double</span> startTimeMs = <a class="code" href="namespacearmnn.html#a12d3ffe11b54c0aaa59bdd8415701c36">FindMeasurement</a>(<a class="code" href="classarmnn_1_1_wall_clock_timer.html#aef02e15721d757f07f3812f09fc892d4">WallClockTimer::WALL_CLOCK_TIME_START</a>, eventPtr).<a class="code" href="structarmnn_1_1_measurement.html#ac2b559d9ddbdc9bf665c30eece9f426e">m_Value</a>;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;            <span class="keywordtype">double</span> stopTimeMs = <a class="code" href="namespacearmnn.html#a12d3ffe11b54c0aaa59bdd8415701c36">FindMeasurement</a>(<a class="code" href="classarmnn_1_1_wall_clock_timer.html#abd358345fde773d79e57461c1b062703">WallClockTimer::WALL_CLOCK_TIME_STOP</a>, eventPtr).<a class="code" href="structarmnn_1_1_measurement.html#ac2b559d9ddbdc9bf665c30eece9f426e">m_Value</a>;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            <span class="comment">// Find the WallClock measurement if there is one.</span></div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            <span class="keywordtype">double</span> durationMs = <a class="code" href="namespacearmnn.html#a12d3ffe11b54c0aaa59bdd8415701c36">FindMeasurement</a>(<a class="code" href="classarmnn_1_1_wall_clock_timer.html#aece42eedfcac1aa046e0dff4763b300a">WallClockTimer::WALL_CLOCK_TIME</a>, eventPtr).<a class="code" href="structarmnn_1_1_measurement.html#ac2b559d9ddbdc9bf665c30eece9f426e">m_Value</a>;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;            outStream &lt;&lt; std::setw(50) &lt;&lt; eventPtr-&gt;GetName() &lt;&lt; <span class="stringliteral">&quot; &quot;</span></div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;                      &lt;&lt; std::setw(20) &lt;&lt; durationMs</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;                      &lt;&lt; std::setw(20) &lt;&lt; startTimeMs</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;                      &lt;&lt; std::setw(20) &lt;&lt; stopTimeMs</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;                      &lt;&lt; std::setw(20) &lt;&lt; eventPtr-&gt;GetBackendId().Get()</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;                      &lt;&lt; std::endl;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;        }</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        outStream &lt;&lt; std::endl;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        <span class="comment">// Restores previous precision settings.</span></div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        outStream.flags(oldFlags);</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        outStream.precision(oldPrecision);</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    }</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;    <span class="comment">// Aggregates results per event name.</span></div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    std::map&lt;std::string, ProfilingEventStats&gt; nameToStatsMap = CalculateProfilingEventStats();</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="comment">// Outputs aggregated stats.</span></div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    outStream &lt;&lt; <span class="stringliteral">&quot;Event Stats - Name | Avg (ms) | Min (ms) | Max (ms) | Total (ms) | Count&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>&amp; pair : nameToStatsMap)</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    {</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <span class="keyword">const</span> std::string&amp; eventLabel = pair.first;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="keyword">const</span> ProfilingEventStats&amp; eventStats = pair.second;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <span class="keyword">const</span> <span class="keywordtype">double</span> avgMs = eventStats.m_TotalMs / double(eventStats.m_Count);</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        outStream &lt;&lt; <span class="stringliteral">&quot;\t&quot;</span> &lt;&lt; std::setw(50) &lt;&lt; eventLabel &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; std::setw(9) &lt;&lt; avgMs &lt;&lt; <span class="stringliteral">&quot; &quot;</span></div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;            &lt;&lt; std::setw(9) &lt;&lt; eventStats.m_MinMs &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; std::setw(9) &lt;&lt; eventStats.m_MaxMs &lt;&lt; <span class="stringliteral">&quot; &quot;</span></div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;            &lt;&lt; std::setw(9) &lt;&lt; eventStats.m_TotalMs &lt;&lt; <span class="stringliteral">&quot; &quot;</span> &lt;&lt; std::setw(9) &lt;&lt; eventStats.m_Count &lt;&lt; std::endl;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    }</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    outStream &lt;&lt; std::endl;</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_wall_clock_timer_html_aef02e15721d757f07f3812f09fc892d4"><div class="ttname"><a href="classarmnn_1_1_wall_clock_timer.html#aef02e15721d757f07f3812f09fc892d4">armnn::WallClockTimer::WALL_CLOCK_TIME_START</a></div><div class="ttdeci">static const std::string WALL_CLOCK_TIME_START</div><div class="ttdef"><b>Definition:</b> <a href="_wall_clock_timer_8hpp_source.html#l00064">WallClockTimer.hpp:64</a></div></div>
291 <div class="ttc" id="classarmnn_1_1_wall_clock_timer_html_aece42eedfcac1aa046e0dff4763b300a"><div class="ttname"><a href="classarmnn_1_1_wall_clock_timer.html#aece42eedfcac1aa046e0dff4763b300a">armnn::WallClockTimer::WALL_CLOCK_TIME</a></div><div class="ttdeci">static const std::string WALL_CLOCK_TIME</div><div class="ttdef"><b>Definition:</b> <a href="_wall_clock_timer_8hpp_source.html#l00063">WallClockTimer.hpp:63</a></div></div>
292 <div class="ttc" id="namespacearmnn_html_a41794552ff67b0dad16de60f9b8e7d7c"><div class="ttname"><a href="namespacearmnn.html#a41794552ff67b0dad16de60f9b8e7d7c">armnn::g_WriteProfilingEventSequence</a></div><div class="ttdeci">constexpr bool g_WriteProfilingEventSequence</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_8cpp_source.html#l00033">Profiling.cpp:33</a></div></div>
293 <div class="ttc" id="structarmnn_1_1_measurement_html_ac2b559d9ddbdc9bf665c30eece9f426e"><div class="ttname"><a href="structarmnn_1_1_measurement.html#ac2b559d9ddbdc9bf665c30eece9f426e">armnn::Measurement::m_Value</a></div><div class="ttdeci">double m_Value</div><div class="ttdef"><b>Definition:</b> <a href="_instrument_8hpp_source.html#l00043">Instrument.hpp:43</a></div></div>
294 <div class="ttc" id="namespacearmnn_html_ab03dcfb3b4019d8f58a67c41681951ae"><div class="ttname"><a href="namespacearmnn.html#ab03dcfb3b4019d8f58a67c41681951ae">armnn::GetEventPtr</a></div><div class="ttdeci">const Event * GetEventPtr(const Event *ptr)</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_8cpp_source.html#l00110">Profiling.cpp:110</a></div></div>
295 <div class="ttc" id="namespacearmnn_html_a12d3ffe11b54c0aaa59bdd8415701c36"><div class="ttname"><a href="namespacearmnn.html#a12d3ffe11b54c0aaa59bdd8415701c36">armnn::FindMeasurement</a></div><div class="ttdeci">Measurement FindMeasurement(const std::string &amp;name, const Event *event)</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_8cpp_source.html#l00044">Profiling.cpp:44</a></div></div>
296 <div class="ttc" id="classarmnn_1_1_wall_clock_timer_html_abd358345fde773d79e57461c1b062703"><div class="ttname"><a href="classarmnn_1_1_wall_clock_timer.html#abd358345fde773d79e57461c1b062703">armnn::WallClockTimer::WALL_CLOCK_TIME_STOP</a></div><div class="ttdeci">static const std::string WALL_CLOCK_TIME_STOP</div><div class="ttdef"><b>Definition:</b> <a href="_wall_clock_timer_8hpp_source.html#l00065">WallClockTimer.hpp:65</a></div></div>
297 <div class="ttc" id="struct_event_html"><div class="ttname"><a href="struct_event.html">Event</a></div><div class="ttdef"><b>Definition:</b> <a href="_timeline_model_8h_source.html#l00035">TimelineModel.h:35</a></div></div>
298 </div><!-- fragment -->
299 </div>
300 </div>
301 <a id="abaf660a136b904fbcbd0c374fea38cd0"></a>
302 <h2 class="memtitle"><span class="permalink"><a href="#abaf660a136b904fbcbd0c374fea38cd0">&#9670;&nbsp;</a></span>BeginEvent()</h2>
303
304 <div class="memitem">
305 <div class="memproto">
306       <table class="memname">
307         <tr>
308           <td class="memname"><a class="el" href="classarmnn_1_1_event.html">Event</a> * BeginEvent </td>
309           <td>(</td>
310           <td class="paramtype">const <a class="el" href="classarmnn_1_1_backend_id.html">BackendId</a> &amp;&#160;</td>
311           <td class="paramname"><em>backendId</em>, </td>
312         </tr>
313         <tr>
314           <td class="paramkey"></td>
315           <td></td>
316           <td class="paramtype">const std::string &amp;&#160;</td>
317           <td class="paramname"><em>name</em>, </td>
318         </tr>
319         <tr>
320           <td class="paramkey"></td>
321           <td></td>
322           <td class="paramtype">std::vector&lt; <a class="el" href="classarmnn_1_1_profiler.html#a70926d23f3aef7e657a9057a7badb014">InstrumentPtr</a> &gt; &amp;&amp;&#160;</td>
323           <td class="paramname"><em>instruments</em>&#160;</td>
324         </tr>
325         <tr>
326           <td></td>
327           <td>)</td>
328           <td></td><td></td>
329         </tr>
330       </table>
331 </div><div class="memdoc">
332
333 <p class="definition">Definition at line <a class="el" href="_profiling_8cpp_source.html#l00200">200</a> of file <a class="el" href="_profiling_8cpp_source.html">Profiling.cpp</a>.</p>
334
335 <p class="reference">References <a class="el" href="_profiling_8cpp_source.html#l00463">Profiler::GetEventColor()</a>.</p>
336 <div class="fragment"><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;{</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    <a class="code" href="struct_event.html">Event</a>* parent = m_Parents.empty() ? nullptr : m_Parents.top();</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    m_EventSequence.push_back(std::make_unique&lt;Event&gt;(label, <span class="keyword">this</span>, parent, backendId, std::move(instruments)));</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    <a class="code" href="struct_event.html">Event</a>* <span class="keyword">event</span> = m_EventSequence.back().get();</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <span class="keyword">event</span>-&gt;Start();</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="preprocessor">#if ARMNN_STREAMLINE_ENABLED</span></div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    ANNOTATE_CHANNEL_COLOR(uint32_t(m_Parents.size()), <a class="code" href="classarmnn_1_1_profiler.html#ac2afea56b7e3ffcc81f49f15febf88f1">GetEventColor</a>(backendId), label.c_str());</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    m_Parents.push(event);</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <span class="keywordflow">return</span> event;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_profiler_html_ac2afea56b7e3ffcc81f49f15febf88f1"><div class="ttname"><a href="classarmnn_1_1_profiler.html#ac2afea56b7e3ffcc81f49f15febf88f1">armnn::Profiler::GetEventColor</a></div><div class="ttdeci">uint32_t GetEventColor(const BackendId &amp;backendId) const</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_8cpp_source.html#l00463">Profiling.cpp:463</a></div></div>
337 <div class="ttc" id="struct_event_html"><div class="ttname"><a href="struct_event.html">Event</a></div><div class="ttdef"><b>Definition:</b> <a href="_timeline_model_8h_source.html#l00035">TimelineModel.h:35</a></div></div>
338 </div><!-- fragment -->
339 </div>
340 </div>
341 <a id="a537b76b2a9f7fbcb538eabe994e424e0"></a>
342 <h2 class="memtitle"><span class="permalink"><a href="#a537b76b2a9f7fbcb538eabe994e424e0">&#9670;&nbsp;</a></span>EnableProfiling()</h2>
343
344 <div class="memitem">
345 <div class="memproto">
346 <table class="mlabels">
347   <tr>
348   <td class="mlabels-left">
349       <table class="memname">
350         <tr>
351           <td class="memname">void EnableProfiling </td>
352           <td>(</td>
353           <td class="paramtype">bool&#160;</td>
354           <td class="paramname"><em>enableProfiling</em></td><td>)</td>
355           <td></td>
356         </tr>
357       </table>
358   </td>
359   <td class="mlabels-right">
360 <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
361   </tr>
362 </table>
363 </div><div class="memdoc">
364 <p>Enables/disables profiling for this profiler. </p><dl class="params"><dt>Parameters</dt><dd>
365   <table class="params">
366     <tr><td class="paramdir">[in]</td><td class="paramname">enableProfiling</td><td>A flag that indicates whether profiling should be enabled or not. </td></tr>
367   </table>
368   </dd>
369 </dl>
370
371 <p>Implements <a class="el" href="classarmnn_1_1_i_profiler.html#a769cdf670bd7cda3cda29dd40fbdebf4">IProfiler</a>.</p>
372
373 <p class="definition">Definition at line <a class="el" href="_profiling_8cpp_source.html#l00195">195</a> of file <a class="el" href="_profiling_8cpp_source.html">Profiling.cpp</a>.</p>
374 <div class="fragment"><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;{</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    m_ProfilingEnabled = enableProfiling;</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;}</div></div><!-- fragment -->
375 </div>
376 </div>
377 <a id="a8ed16398e69bb7b0625e3cf4a279b1f3"></a>
378 <h2 class="memtitle"><span class="permalink"><a href="#a8ed16398e69bb7b0625e3cf4a279b1f3">&#9670;&nbsp;</a></span>EndEvent()</h2>
379
380 <div class="memitem">
381 <div class="memproto">
382       <table class="memname">
383         <tr>
384           <td class="memname">void EndEvent </td>
385           <td>(</td>
386           <td class="paramtype"><a class="el" href="classarmnn_1_1_event.html">Event</a> *&#160;</td>
387           <td class="paramname"><em>event</em></td><td>)</td>
388           <td></td>
389         </tr>
390       </table>
391 </div><div class="memdoc">
392
393 <p class="definition">Definition at line <a class="el" href="_profiling_8cpp_source.html#l00217">217</a> of file <a class="el" href="_profiling_8cpp_source.html">Profiling.cpp</a>.</p>
394
395 <p class="reference">References <a class="el" href="_profiling_event_8cpp_source.html#l00077">Event::GetParentEvent()</a>.</p>
396 <div class="fragment"><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;{</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    <span class="keyword">event</span>-&gt;Stop();</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    BOOST_ASSERT(!m_Parents.empty());</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    BOOST_ASSERT(event == m_Parents.top());</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    m_Parents.pop();</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    <a class="code" href="struct_event.html">Event</a>* parent = m_Parents.empty() ? nullptr : m_Parents.top();</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;    boost::ignore_unused(parent);</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    BOOST_ASSERT(event-&gt;GetParentEvent() == parent);</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;<span class="preprocessor">#if ARMNN_STREAMLINE_ENABLED</span></div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    ANNOTATE_CHANNEL_END(uint32_t(m_Parents.size()));</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;}</div><div class="ttc" id="struct_event_html"><div class="ttname"><a href="struct_event.html">Event</a></div><div class="ttdef"><b>Definition:</b> <a href="_timeline_model_8h_source.html#l00035">TimelineModel.h:35</a></div></div>
397 </div><!-- fragment -->
398 </div>
399 </div>
400 <a id="ac2afea56b7e3ffcc81f49f15febf88f1"></a>
401 <h2 class="memtitle"><span class="permalink"><a href="#ac2afea56b7e3ffcc81f49f15febf88f1">&#9670;&nbsp;</a></span>GetEventColor()</h2>
402
403 <div class="memitem">
404 <div class="memproto">
405       <table class="memname">
406         <tr>
407           <td class="memname">std::uint32_t GetEventColor </td>
408           <td>(</td>
409           <td class="paramtype">const <a class="el" href="classarmnn_1_1_backend_id.html">BackendId</a> &amp;&#160;</td>
410           <td class="paramname"><em>backendId</em></td><td>)</td>
411           <td> const</td>
412         </tr>
413       </table>
414 </div><div class="memdoc">
415
416 <p class="definition">Definition at line <a class="el" href="_profiling_8cpp_source.html#l00463">463</a> of file <a class="el" href="_profiling_8cpp_source.html">Profiling.cpp</a>.</p>
417
418 <p class="reference">Referenced by <a class="el" href="_profiling_8cpp_source.html#l00200">Profiler::BeginEvent()</a>.</p>
419 <div class="fragment"><div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;{</div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;    <span class="keyword">static</span> BackendId cpuRef(<span class="stringliteral">&quot;CpuRef&quot;</span>);</div><div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;    <span class="keyword">static</span> BackendId cpuAcc(<span class="stringliteral">&quot;CpuAcc&quot;</span>);</div><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;    <span class="keyword">static</span> BackendId gpuAcc(<span class="stringliteral">&quot;GpuAcc&quot;</span>);</div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;    <span class="keywordflow">if</span> (backendId == cpuRef) {</div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;            <span class="comment">// Cyan</span></div><div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;            <span class="keywordflow">return</span> 0xffff001b;</div><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (backendId == cpuAcc) {</div><div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;            <span class="comment">// Green</span></div><div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;            <span class="keywordflow">return</span> 0x00ff001b;</div><div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;    } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (backendId == gpuAcc) {</div><div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;            <span class="comment">// Purple</span></div><div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;            <span class="keywordflow">return</span> 0xff007f1b;</div><div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;            <span class="comment">// Dark gray</span></div><div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;            <span class="keywordflow">return</span> 0x5555551b;</div><div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;    }</div><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;}</div></div><!-- fragment -->
420 </div>
421 </div>
422 <a id="ad5ac843dd60a0ff7d4ab327f43fb88a5"></a>
423 <h2 class="memtitle"><span class="permalink"><a href="#ad5ac843dd60a0ff7d4ab327f43fb88a5">&#9670;&nbsp;</a></span>IsProfilingEnabled()</h2>
424
425 <div class="memitem">
426 <div class="memproto">
427 <table class="mlabels">
428   <tr>
429   <td class="mlabels-left">
430       <table class="memname">
431         <tr>
432           <td class="memname">bool IsProfilingEnabled </td>
433           <td>(</td>
434           <td class="paramname"></td><td>)</td>
435           <td></td>
436         </tr>
437       </table>
438   </td>
439   <td class="mlabels-right">
440 <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
441   </tr>
442 </table>
443 </div><div class="memdoc">
444 <p>Checks whether profiling is enabled. Profiling is disabled by default. </p><dl class="section return"><dt>Returns</dt><dd>true if profiling is enabled, false otherwise. </dd></dl>
445
446 <p>Implements <a class="el" href="classarmnn_1_1_i_profiler.html#a1ebebad65df6718dc07aeab66550d0a7">IProfiler</a>.</p>
447
448 <p class="definition">Definition at line <a class="el" href="_profiling_8cpp_source.html#l00190">190</a> of file <a class="el" href="_profiling_8cpp_source.html">Profiling.cpp</a>.</p>
449 <div class="fragment"><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;{</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    <span class="keywordflow">return</span> m_ProfilingEnabled;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;}</div></div><!-- fragment -->
450 </div>
451 </div>
452 <a id="a352a82f3a338acf06a20d290f605c489"></a>
453 <h2 class="memtitle"><span class="permalink"><a href="#a352a82f3a338acf06a20d290f605c489">&#9670;&nbsp;</a></span>Print()</h2>
454
455 <div class="memitem">
456 <div class="memproto">
457 <table class="mlabels">
458   <tr>
459   <td class="mlabels-left">
460       <table class="memname">
461         <tr>
462           <td class="memname">void Print </td>
463           <td>(</td>
464           <td class="paramtype">std::ostream &amp;&#160;</td>
465           <td class="paramname"><em>outStream</em></td><td>)</td>
466           <td> const</td>
467         </tr>
468       </table>
469   </td>
470   <td class="mlabels-right">
471 <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
472   </tr>
473 </table>
474 </div><div class="memdoc">
475 <p>Print stats for events in JSON Format to the given output stream. </p><dl class="params"><dt>Parameters</dt><dd>
476   <table class="params">
477     <tr><td class="paramdir">[out]</td><td class="paramname">outStream</td><td>The stream where to write the profiling results to. </td></tr>
478   </table>
479   </dd>
480 </dl>
481
482 <p>Implements <a class="el" href="classarmnn_1_1_i_profiler.html#aa369a934075a340fe59b7c9f481f9a57">IProfiler</a>.</p>
483
484 <p class="definition">Definition at line <a class="el" href="_profiling_8cpp_source.html#l00330">330</a> of file <a class="el" href="_profiling_8cpp_source.html">Profiling.cpp</a>.</p>
485
486 <p class="reference">References <a class="el" href="_profiling_8cpp_source.html#l00284">armnn::ExtractJsonObjects()</a>, <a class="el" href="_json_printer_8cpp_source.html#l00063">JsonPrinter::PrintArmNNHeader()</a>, <a class="el" href="_json_printer_8cpp_source.html#l00163">JsonPrinter::PrintFooter()</a>, <a class="el" href="_json_printer_8cpp_source.html#l00057">JsonPrinter::PrintHeader()</a>, <a class="el" href="_json_printer_8cpp_source.html#l00015">JsonPrinter::PrintJsonChildObject()</a>, and <a class="el" href="_json_printer_8cpp_source.html#l00158">JsonPrinter::PrintNewLine()</a>.</p>
487
488 <p class="reference">Referenced by <a class="el" href="_profiling_8cpp_source.html#l00176">Profiler::~Profiler()</a>.</p>
489 <div class="fragment"><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;{</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    <span class="comment">// Makes sure timestamps are output with 6 decimals, and save old settings.</span></div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;    std::streamsize oldPrecision = outStream.precision();</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;    outStream.precision(6);</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;    std::ios_base::fmtflags oldFlags = outStream.flags();</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    outStream.setf(std::ios::fixed);</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;    JsonPrinter printer(outStream);</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;    <span class="comment">// First find all the &quot;inference&quot; Events and print out duration measurements.</span></div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    <span class="keywordtype">int</span> baseLevel = -1;</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    std::vector&lt;const Event*&gt; inferences;</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;    PopulateInferences(inferences, baseLevel);</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;    <span class="comment">// Second map out descendants hierarchy</span></div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;    std::map&lt;const Event*, std::vector&lt;const Event*&gt;&gt; descendantsMap;</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;    PopulateDescendants(descendantsMap);</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;    JsonChildObject inferenceObject{<span class="stringliteral">&quot;inference_measurements&quot;</span>};</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;    JsonChildObject layerObject{<span class="stringliteral">&quot;layer_measurements&quot;</span>};</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    std::vector&lt;JsonChildObject&gt; workloadObjects;</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    std::map&lt;unsigned int, std::vector&lt;JsonChildObject&gt;&gt; workloadToKernelObjects;</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inferenceIndex = 0; inferenceIndex &lt; inferences.size(); ++inferenceIndex)</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;    {</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;        <span class="keyword">auto</span> inference = inferences[inferenceIndex];</div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;        <a class="code" href="namespacearmnn.html#a50805c29c35b9903c2dea301d8091711">ExtractJsonObjects</a>(inferenceIndex, inference, inferenceObject, descendantsMap);</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;    }</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;    printer.PrintHeader();</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;    printer.PrintArmNNHeader();</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    <span class="comment">// print inference object, also prints child layer and kernel measurements</span></div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;    <span class="keywordtype">size_t</span> <span class="keywordtype">id</span>=0;</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;    printer.PrintJsonChildObject(inferenceObject, <span class="keywordtype">id</span>);</div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;    <span class="comment">// end of ArmNN</span></div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;    printer.PrintNewLine();</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;    printer.PrintFooter();</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;    <span class="comment">// end of main JSON object</span></div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    printer.PrintNewLine();</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;    printer.PrintFooter();</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    printer.PrintNewLine();</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;    <span class="comment">// Restores previous precision settings.</span></div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;    outStream.flags(oldFlags);</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;    outStream.precision(oldPrecision);</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;}</div><div class="ttc" id="namespacearmnn_html_a50805c29c35b9903c2dea301d8091711"><div class="ttname"><a href="namespacearmnn.html#a50805c29c35b9903c2dea301d8091711">armnn::ExtractJsonObjects</a></div><div class="ttdeci">void ExtractJsonObjects(unsigned int inferenceIndex, const Event *parentEvent, JsonChildObject &amp;parentObject, std::map&lt; const Event *, std::vector&lt; const Event *&gt;&gt; descendantsMap)</div><div class="ttdef"><b>Definition:</b> <a href="_profiling_8cpp_source.html#l00284">Profiling.cpp:284</a></div></div>
490 </div><!-- fragment -->
491 </div>
492 </div>
493 <a id="afb5ba6c1110d2ea400f49ad7f3ac4d15"></a>
494 <h2 class="memtitle"><span class="permalink"><a href="#afb5ba6c1110d2ea400f49ad7f3ac4d15">&#9670;&nbsp;</a></span>UpdateEventTag()</h2>
495
496 <div class="memitem">
497 <div class="memproto">
498       <table class="memname">
499         <tr>
500           <td class="memname">void UpdateEventTag </td>
501           <td>(</td>
502           <td class="paramname"></td><td>)</td>
503           <td></td>
504         </tr>
505       </table>
506 </div><div class="memdoc">
507
508 </div>
509 </div>
510 <h2 class="groupheader">Friends And Related Function Documentation</h2>
511 <a id="a3269840850209f5ae295310924b6175f"></a>
512 <h2 class="memtitle"><span class="permalink"><a href="#a3269840850209f5ae295310924b6175f">&#9670;&nbsp;</a></span>GetProfilerEventSequenceSize</h2>
513
514 <div class="memitem">
515 <div class="memproto">
516 <table class="mlabels">
517   <tr>
518   <td class="mlabels-left">
519       <table class="memname">
520         <tr>
521           <td class="memname">size_t GetProfilerEventSequenceSize </td>
522           <td>(</td>
523           <td class="paramtype"><a class="el" href="classarmnn_1_1_profiler.html">armnn::Profiler</a> *&#160;</td>
524           <td class="paramname"><em>profiler</em></td><td>)</td>
525           <td></td>
526         </tr>
527       </table>
528   </td>
529   <td class="mlabels-right">
530 <span class="mlabels"><span class="mlabel">friend</span></span>  </td>
531   </tr>
532 </table>
533 </div><div class="memdoc">
534
535 <p class="definition">Definition at line <a class="el" href="_profiler_tests_8cpp_source.html#l00022">22</a> of file <a class="el" href="_profiler_tests_8cpp_source.html">ProfilerTests.cpp</a>.</p>
536 <div class="fragment"><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">if</span> (!profiler)</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;        <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span><span class="keywordtype">size_t</span><span class="keyword">&gt;</span>(-1);</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    }</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <span class="keywordflow">return</span> profiler-&gt;m_EventSequence.size();</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;}</div></div><!-- fragment -->
537 </div>
538 </div>
539 <hr/>The documentation for this class was generated from the following files:<ul>
540 <li>src/armnn/<a class="el" href="_profiling_8hpp_source.html">Profiling.hpp</a></li>
541 <li>src/armnn/<a class="el" href="_profiling_8cpp_source.html">Profiling.cpp</a></li>
542 </ul>
543 </div><!-- contents -->
544 </div><!-- doc-content -->
545 <!-- start footer part -->
546 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
547   <ul>
548     <li class="navelem"><a class="el" href="namespacearmnn.html">armnn</a></li><li class="navelem"><a class="el" href="classarmnn_1_1_profiler.html">Profiler</a></li>
549     <li class="footer">Generated on Fri Mar 13 2020 16:07:04 for ArmNN by
550     <a href="http://www.doxygen.org/index.html">
551     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
552   </ul>
553 </div>
554 </body>
555 </html>