Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 6 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 7 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 8 | <title>ArmNN: ClBackendContext Class Reference</title> |
| 9 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 10 | <script type="text/javascript" src="jquery.js"></script> |
| 11 | <script type="text/javascript" src="dynsections.js"></script> |
| 12 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 13 | <script type="text/javascript" src="resize.js"></script> |
| 14 | <script type="text/javascript" src="navtreedata.js"></script> |
| 15 | <script type="text/javascript" src="navtree.js"></script> |
| 16 | <script type="text/javascript"> |
| 17 | $(document).ready(initResizable); |
| 18 | </script> |
| 19 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 20 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 21 | <script type="text/javascript" src="search/search.js"></script> |
| 22 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 23 | </head> |
| 24 | <body> |
| 25 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 26 | <div id="titlearea"> |
| 27 | <table cellspacing="0" cellpadding="0"> |
| 28 | <tbody> |
| 29 | <tr style="height: 56px;"> |
| 30 | <td id="projectalign" style="padding-left: 0.5em;"> |
| 31 | <div id="projectname">ArmNN |
| 32 |  <span id="projectnumber">NotReleased</span> |
| 33 | </div> |
| 34 | </td> |
| 35 | </tr> |
| 36 | </tbody> |
| 37 | </table> |
| 38 | </div> |
| 39 | <!-- end header part --> |
| 40 | <!-- Generated by Doxygen 1.8.13 --> |
| 41 | <script type="text/javascript"> |
| 42 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 43 | </script> |
| 44 | <script type="text/javascript" src="menudata.js"></script> |
| 45 | <script type="text/javascript" src="menu.js"></script> |
| 46 | <script type="text/javascript"> |
| 47 | $(function() { |
| 48 | initMenu('',true,false,'search.php','Search'); |
| 49 | $(document).ready(function() { init_search(); }); |
| 50 | }); |
| 51 | </script> |
| 52 | <div id="main-nav"></div> |
| 53 | </div><!-- top --> |
| 54 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 55 | <div id="nav-tree"> |
| 56 | <div id="nav-tree-contents"> |
| 57 | <div id="nav-sync" class="sync"></div> |
| 58 | </div> |
| 59 | </div> |
| 60 | <div id="splitbar" style="-moz-user-select:none;" |
| 61 | class="ui-resizable-handle"> |
| 62 | </div> |
| 63 | </div> |
| 64 | <script type="text/javascript"> |
| 65 | $(document).ready(function(){initNavTree('classarmnn_1_1_cl_backend_context.html','');}); |
| 66 | </script> |
| 67 | <div id="doc-content"> |
| 68 | <!-- window showing the filter options --> |
| 69 | <div id="MSearchSelectWindow" |
| 70 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 71 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 72 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 73 | </div> |
| 74 | |
| 75 | <!-- iframe showing the search results (closed by default) --> |
| 76 | <div id="MSearchResultsWindow"> |
| 77 | <iframe src="javascript:void(0)" frameborder="0" |
| 78 | name="MSearchResults" id="MSearchResults"> |
| 79 | </iframe> |
| 80 | </div> |
| 81 | |
| 82 | <div class="header"> |
| 83 | <div class="summary"> |
| 84 | <a href="#pub-methods">Public Member Functions</a> | |
| 85 | <a href="classarmnn_1_1_cl_backend_context-members.html">List of all members</a> </div> |
| 86 | <div class="headertitle"> |
| 87 | <div class="title">ClBackendContext Class Reference</div> </div> |
| 88 | </div><!--header--> |
| 89 | <div class="contents"> |
| 90 | |
| 91 | <p><code>#include <<a class="el" href="_cl_backend_context_8hpp_source.html">ClBackendContext.hpp</a>></code></p> |
| 92 | <div class="dynheader"> |
| 93 | Inheritance diagram for ClBackendContext:</div> |
| 94 | <div class="dyncontent"> |
| 95 | <div class="center"> |
| 96 | <img src="classarmnn_1_1_cl_backend_context.png" usemap="#ClBackendContext_map" alt=""/> |
| 97 | <map id="ClBackendContext_map" name="ClBackendContext_map"> |
| 98 | <area href="classarmnn_1_1_i_backend_context.html" alt="IBackendContext" shape="rect" coords="0,0,115,24"/> |
| 99 | </map> |
| 100 | </div></div> |
| 101 | <table class="memberdecls"> |
| 102 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| 103 | Public Member Functions</h2></td></tr> |
| 104 | <tr class="memitem:a46628231c197cb066ddf3fe676b44038"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_cl_backend_context.html#a46628231c197cb066ddf3fe676b44038">ClBackendContext</a> (const <a class="el" href="structarmnn_1_1_i_runtime_1_1_creation_options.html">IRuntime::CreationOptions</a> &<a class="el" href="_file_only_profiling_decorator_tests_8cpp.html#a6560146509197f3e197d8d36f76c1347">options</a>)</td></tr> |
| 105 | <tr class="separator:a46628231c197cb066ddf3fe676b44038"><td class="memSeparator" colspan="2"> </td></tr> |
| 106 | <tr class="memitem:ae8b132bb727f3594b8613a66096fbd99"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_cl_backend_context.html#ae8b132bb727f3594b8613a66096fbd99">BeforeLoadNetwork</a> (<a class="el" href="namespacearmnn.html#a83015160d8c67d5d77735eb0d4033d9a">NetworkId</a> networkId) override</td></tr> |
| 107 | <tr class="separator:ae8b132bb727f3594b8613a66096fbd99"><td class="memSeparator" colspan="2"> </td></tr> |
| 108 | <tr class="memitem:a8285e428113914dee00fb06ac0f3af1e"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_cl_backend_context.html#a8285e428113914dee00fb06ac0f3af1e">AfterLoadNetwork</a> (<a class="el" href="namespacearmnn.html#a83015160d8c67d5d77735eb0d4033d9a">NetworkId</a> networkId) override</td></tr> |
| 109 | <tr class="separator:a8285e428113914dee00fb06ac0f3af1e"><td class="memSeparator" colspan="2"> </td></tr> |
| 110 | <tr class="memitem:acb272e49e9da9835827451184feee061"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_cl_backend_context.html#acb272e49e9da9835827451184feee061">BeforeUnloadNetwork</a> (<a class="el" href="namespacearmnn.html#a83015160d8c67d5d77735eb0d4033d9a">NetworkId</a> networkId) override</td></tr> |
| 111 | <tr class="separator:acb272e49e9da9835827451184feee061"><td class="memSeparator" colspan="2"> </td></tr> |
| 112 | <tr class="memitem:a16900a3d8c0121a45ceb870f1815bc4d"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_cl_backend_context.html#a16900a3d8c0121a45ceb870f1815bc4d">AfterUnloadNetwork</a> (<a class="el" href="namespacearmnn.html#a83015160d8c67d5d77735eb0d4033d9a">NetworkId</a> networkId) override</td></tr> |
| 113 | <tr class="separator:a16900a3d8c0121a45ceb870f1815bc4d"><td class="memSeparator" colspan="2"> </td></tr> |
| 114 | <tr class="memitem:a9cd81257364a0a85008f1d4109016264"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_cl_backend_context.html#a9cd81257364a0a85008f1d4109016264">~ClBackendContext</a> () override</td></tr> |
| 115 | <tr class="separator:a9cd81257364a0a85008f1d4109016264"><td class="memSeparator" colspan="2"> </td></tr> |
| 116 | <tr class="inherit_header pub_methods_classarmnn_1_1_i_backend_context"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarmnn_1_1_i_backend_context')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classarmnn_1_1_i_backend_context.html">IBackendContext</a></td></tr> |
| 117 | <tr class="memitem:a13815a4455284ba43cae24ff99f6fc43 inherit pub_methods_classarmnn_1_1_i_backend_context"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_i_backend_context.html#a13815a4455284ba43cae24ff99f6fc43">~IBackendContext</a> ()</td></tr> |
| 118 | <tr class="separator:a13815a4455284ba43cae24ff99f6fc43 inherit pub_methods_classarmnn_1_1_i_backend_context"><td class="memSeparator" colspan="2"> </td></tr> |
| 119 | </table><table class="memberdecls"> |
| 120 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a> |
| 121 | Additional Inherited Members</h2></td></tr> |
| 122 | <tr class="inherit_header pro_methods_classarmnn_1_1_i_backend_context"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classarmnn_1_1_i_backend_context')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classarmnn_1_1_i_backend_context.html">IBackendContext</a></td></tr> |
| 123 | <tr class="memitem:a5d40cc5069980f1cd99780fdd6230cc8 inherit pro_methods_classarmnn_1_1_i_backend_context"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_i_backend_context.html#a5d40cc5069980f1cd99780fdd6230cc8">IBackendContext</a> (const <a class="el" href="structarmnn_1_1_i_runtime_1_1_creation_options.html">IRuntime::CreationOptions</a> &)</td></tr> |
| 124 | <tr class="separator:a5d40cc5069980f1cd99780fdd6230cc8 inherit pro_methods_classarmnn_1_1_i_backend_context"><td class="memSeparator" colspan="2"> </td></tr> |
| 125 | </table> |
| 126 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 127 | <div class="textblock"> |
| 128 | <p class="definition">Definition at line <a class="el" href="_cl_backend_context_8hpp_source.html#l00016">16</a> of file <a class="el" href="_cl_backend_context_8hpp_source.html">ClBackendContext.hpp</a>.</p> |
| 129 | </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 130 | <a id="a46628231c197cb066ddf3fe676b44038"></a> |
| 131 | <h2 class="memtitle"><span class="permalink"><a href="#a46628231c197cb066ddf3fe676b44038">◆ </a></span>ClBackendContext()</h2> |
| 132 | |
| 133 | <div class="memitem"> |
| 134 | <div class="memproto"> |
| 135 | <table class="memname"> |
| 136 | <tr> |
| 137 | <td class="memname"><a class="el" href="classarmnn_1_1_cl_backend_context.html">ClBackendContext</a> </td> |
| 138 | <td>(</td> |
| 139 | <td class="paramtype">const <a class="el" href="structarmnn_1_1_i_runtime_1_1_creation_options.html">IRuntime::CreationOptions</a> & </td> |
| 140 | <td class="paramname"><em>options</em></td><td>)</td> |
| 141 | <td></td> |
| 142 | </tr> |
| 143 | </table> |
| 144 | </div><div class="memdoc"> |
| 145 | |
| 146 | <p class="definition">Definition at line <a class="el" href="_cl_backend_context_8cpp_source.html#l00153">153</a> of file <a class="el" href="_cl_backend_context_8cpp_source.html">ClBackendContext.cpp</a>.</p> |
| 147 | |
| 148 | <p class="reference">References <a class="el" href="_logging_8hpp_source.html#l00163">ARMNN_LOG</a>, <a class="el" href="_cl_backend_context_8cpp_source.html#l00131">armnn::ConfigureTuner()</a>, <a class="el" href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aafaf34f09ea1e93bfbf591e19dc0dfb9f">armnn::Exhaustive</a>, <a class="el" href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a707090747256af276c389e0cf1cb0a9aafaf34f09ea1e93bfbf591e19dc0dfb9f">IGpuAccTunedParameters::Exhaustive</a>, <a class="el" href="_i_runtime_8hpp_source.html#l00104">IRuntime::CreationOptions::m_BackendOptions</a>, <a class="el" href="_i_runtime_8hpp_source.html#l00054">IRuntime::CreationOptions::m_EnableGpuProfiling</a>, <a class="el" href="_i_runtime_8hpp_source.html#l00051">IRuntime::CreationOptions::m_GpuAccTunedParameters</a>, <a class="el" href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aa6adf97f83acf6453d4a6a4b1070f3754">armnn::None</a>, <a class="el" href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aa960b44c579bc2f6818d2daaf9e4c16f0">armnn::Normal</a>, <a class="el" href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a707090747256af276c389e0cf1cb0a9aa960b44c579bc2f6818d2daaf9e4c16f0">IGpuAccTunedParameters::Normal</a>, <a class="el" href="_cl_backend_context_8cpp_source.html#l00106">armnn::ParseFile()</a>, <a class="el" href="_cl_backend_context_8cpp_source.html#l00116">armnn::ParseOptions()</a>, <a class="el" href="_cl_backend_context_8cpp_source.html#l00078">armnn::ParseTuningLevel()</a>, <a class="el" href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aab571ef5b2664270d25bea4f4b61ffe68">armnn::Rapid</a>, <a class="el" href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a707090747256af276c389e0cf1cb0a9aab571ef5b2664270d25bea4f4b61ffe68">IGpuAccTunedParameters::Rapid</a>, <a class="el" href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a46c8a310cf4c094f8c80e1cb8dc1f911aa5094385565dc10dda530dcc17a1159b">IGpuAccTunedParameters::UseTunedParameters</a>, and <a class="el" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407a7b83d3f08fa392b79e3f553b585971cd">armnn::warning</a>.</p> |
| 149 | <div class="fragment"><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  : <a class="code" href="classarmnn_1_1_i_backend_context.html#a5d40cc5069980f1cd99780fdd6230cc8">IBackendContext</a>(<a class="code" href="_file_only_profiling_decorator_tests_8cpp.html#a6560146509197f3e197d8d36f76c1347">options</a>)</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  , m_TuningFile()</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span> {</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordtype">bool</span> kernelProfiling = <a class="code" href="_file_only_profiling_decorator_tests_8cpp.html#a6560146509197f3e197d8d36f76c1347">options</a>.m_EnableGpuProfiling;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span> </div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  arm_compute::CLTuner* tuner = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordtype">bool</span> useLegacyTunerAPI = <a class="code" href="_file_only_profiling_decorator_tests_8cpp.html#a6560146509197f3e197d8d36f76c1347">options</a>.m_GpuAccTunedParameters.get() != <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="keywordflow">if</span> (useLegacyTunerAPI)</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  {</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keyword">auto</span> clTunerParams = boost::polymorphic_downcast<ClTunedParameters*>(</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="_file_only_profiling_decorator_tests_8cpp.html#a6560146509197f3e197d8d36f76c1347">options</a>.m_GpuAccTunedParameters.get());</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  tuner = &clTunerParams->m_Tuner;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <span class="keywordflow">if</span> (tuner)</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  {</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keyword">auto</span> ConvertTuningLevel = [](<a class="code" href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a707090747256af276c389e0cf1cb0a9a">IGpuAccTunedParameters::TuningLevel</a> level,</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <a class="code" href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a46c8a310cf4c094f8c80e1cb8dc1f911">armnn::IGpuAccTunedParameters::Mode</a> mode)</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  {</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="keywordflow">if</span> (mode == <a class="code" href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a46c8a310cf4c094f8c80e1cb8dc1f911aa5094385565dc10dda530dcc17a1159b">armnn::IGpuAccTunedParameters::Mode::UseTunedParameters</a>)</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  {</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aa6adf97f83acf6453d4a6a4b1070f3754">TuningLevel::None</a>;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  }</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> </div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordflow">switch</span>(level)</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  {</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">case</span> <a class="code" href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a707090747256af276c389e0cf1cb0a9aab571ef5b2664270d25bea4f4b61ffe68">IGpuAccTunedParameters::TuningLevel::Rapid</a>:</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aab571ef5b2664270d25bea4f4b61ffe68">TuningLevel::Rapid</a>;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keywordflow">case</span> <a class="code" href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a707090747256af276c389e0cf1cb0a9aa960b44c579bc2f6818d2daaf9e4c16f0">IGpuAccTunedParameters::TuningLevel::Normal</a>:</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aa960b44c579bc2f6818d2daaf9e4c16f0">TuningLevel::Normal</a>;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="keywordflow">case</span> <a class="code" href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a707090747256af276c389e0cf1cb0a9aafaf34f09ea1e93bfbf591e19dc0dfb9f">IGpuAccTunedParameters::TuningLevel::Exhaustive</a>:</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aafaf34f09ea1e93bfbf591e19dc0dfb9f">TuningLevel::Exhaustive</a>;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  {</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  BOOST_ASSERT_MSG(<span class="keyword">false</span>, <span class="stringliteral">"Tuning level not recognised."</span>);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aa6adf97f83acf6453d4a6a4b1070f3754">TuningLevel::None</a>;</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  }</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  }</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  };</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span> </div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <a class="code" href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9a">TuningLevel</a> tuningLevel = ConvertTuningLevel(clTunerParams->m_TuningLevel, clTunerParams->m_Mode);</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <a class="code" href="namespacearmnn.html#ab562537b5c1ef1e6cde9db9f5fa322bd">ConfigureTuner</a>(*tuner, tuningLevel);</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  }</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  }</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="keywordflow">else</span> <span class="comment">//New backend options API</span></div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  {</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keyword">const</span> <a class="code" href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9a">TuningLevel</a> defaultTuningLevel = <a class="code" href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aa6adf97f83acf6453d4a6a4b1070f3754">TuningLevel::None</a>;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keyword">auto</span> tuningLevel = defaultTuningLevel;</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span> </div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <a class="code" href="namespacearmnn.html#af457790132251cde6545072d879c7684">ParseOptions</a>(<a class="code" href="_file_only_profiling_decorator_tests_8cpp.html#a6560146509197f3e197d8d36f76c1347">options</a>.m_BackendOptions, <span class="stringliteral">"GpuAcc"</span>, [&](std::string name, <span class="keyword">const</span> BackendOptions::Var& value)</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  {</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  if (name == <span class="stringliteral">"KernelProfilingEnabled"</span>)</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  {</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  kernelProfiling |= ParseBoolean(value, false);</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  } <span class="keywordflow">else</span> if (name == <span class="stringliteral">"TuningFile"</span>)</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  {</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  m_TuningFile = <a class="code" href="namespacearmnn.html#a4e9a59f936f3d2050a17597d22825f53">ParseFile</a>(value, <span class="stringliteral">""</span>);</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (name == <span class="stringliteral">"TuningLevel"</span>)</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  {</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  tuningLevel = <a class="code" href="namespacearmnn.html#a3ca05ac77af0a0444ff34c1319094f6d">ParseTuningLevel</a>(value, defaultTuningLevel);</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  }</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  });</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span> </div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="comment">// Create the tuner, in tuning mode initially.</span></div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  m_Tuner = std::make_unique<arm_compute::CLTuner>(<span class="keyword">true</span>);</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span> </div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <a class="code" href="namespacearmnn.html#ab562537b5c1ef1e6cde9db9f5fa322bd">ConfigureTuner</a>(*(m_Tuner.get()), tuningLevel);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span> </div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="keywordflow">if</span> (!m_TuningFile.empty())</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  {</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <span class="keywordflow">try</span></div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  {</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  m_Tuner->load_from_file(m_TuningFile.c_str());</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  } <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception& e)</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  {</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(<a class="code" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407a7b83d3f08fa392b79e3f553b585971cd">warning</a>) << <span class="stringliteral">"Could not load GpuAcc tuner data file."</span>;</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  }</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span> </div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  tuner = m_Tuner.get();</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  }</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  }</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span> </div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  m_ClContextControlWrapper = std::make_unique<ClContextControlWrapper>(</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  tuner,</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  kernelProfiling</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  );</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span> }</div><div class="ttc" id="namespacearmnn_html_a707090747256af276c389e0cf1cb0a9aafaf34f09ea1e93bfbf591e19dc0dfb9f"><div class="ttname"><a href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aafaf34f09ea1e93bfbf591e19dc0dfb9f">armnn::TuningLevel::Exhaustive</a></div></div> |
| 150 | <div class="ttc" id="namespacearmnn_html_a4e9a59f936f3d2050a17597d22825f53"><div class="ttname"><a href="namespacearmnn.html#a4e9a59f936f3d2050a17597d22825f53">armnn::ParseFile</a></div><div class="ttdeci">std::string ParseFile(const BackendOptions::Var &value, std::string defaultValue)</div><div class="ttdef"><b>Definition:</b> <a href="_cl_backend_context_8cpp_source.html#l00106">ClBackendContext.cpp:106</a></div></div> |
| 151 | <div class="ttc" id="classarmnn_1_1_i_gpu_acc_tuned_parameters_html_a46c8a310cf4c094f8c80e1cb8dc1f911aa5094385565dc10dda530dcc17a1159b"><div class="ttname"><a href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a46c8a310cf4c094f8c80e1cb8dc1f911aa5094385565dc10dda530dcc17a1159b">armnn::IGpuAccTunedParameters::Mode::UseTunedParameters</a></div></div> |
| 152 | <div class="ttc" id="classarmnn_1_1_i_backend_context_html_a5d40cc5069980f1cd99780fdd6230cc8"><div class="ttname"><a href="classarmnn_1_1_i_backend_context.html#a5d40cc5069980f1cd99780fdd6230cc8">armnn::IBackendContext::IBackendContext</a></div><div class="ttdeci">IBackendContext(const IRuntime::CreationOptions &)</div><div class="ttdef"><b>Definition:</b> <a href="include_2armnn_2backends_2_i_backend_context_8hpp_source.html#l00016">IBackendContext.hpp:16</a></div></div> |
| 153 | <div class="ttc" id="namespacearmnn_html_ab562537b5c1ef1e6cde9db9f5fa322bd"><div class="ttname"><a href="namespacearmnn.html#ab562537b5c1ef1e6cde9db9f5fa322bd">armnn::ConfigureTuner</a></div><div class="ttdeci">void ConfigureTuner(arm_compute::CLTuner &tuner, TuningLevel level)</div><div class="ttdef"><b>Definition:</b> <a href="_cl_backend_context_8cpp_source.html#l00131">ClBackendContext.cpp:131</a></div></div> |
| 154 | <div class="ttc" id="classarmnn_1_1_i_gpu_acc_tuned_parameters_html_a707090747256af276c389e0cf1cb0a9aafaf34f09ea1e93bfbf591e19dc0dfb9f"><div class="ttname"><a href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a707090747256af276c389e0cf1cb0a9aafaf34f09ea1e93bfbf591e19dc0dfb9f">armnn::IGpuAccTunedParameters::TuningLevel::Exhaustive</a></div></div> |
| 155 | <div class="ttc" id="_logging_8hpp_html_a7b6ad073975f437ec38ca7d20154727f"><div class="ttname"><a href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a></div><div class="ttdeci">#define ARMNN_LOG(severity)</div><div class="ttdef"><b>Definition:</b> <a href="_logging_8hpp_source.html#l00163">Logging.hpp:163</a></div></div> |
| 156 | <div class="ttc" id="classarmnn_1_1_i_gpu_acc_tuned_parameters_html_a707090747256af276c389e0cf1cb0a9a"><div class="ttname"><a href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a707090747256af276c389e0cf1cb0a9a">armnn::IGpuAccTunedParameters::TuningLevel</a></div><div class="ttdeci">TuningLevel</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.html#l00188">IRuntime.hpp:188</a></div></div> |
| 157 | <div class="ttc" id="namespacearmnn_html_a3ca05ac77af0a0444ff34c1319094f6d"><div class="ttname"><a href="namespacearmnn.html#a3ca05ac77af0a0444ff34c1319094f6d">armnn::ParseTuningLevel</a></div><div class="ttdeci">TuningLevel ParseTuningLevel(const BackendOptions::Var &value, TuningLevel defaultValue)</div><div class="ttdef"><b>Definition:</b> <a href="_cl_backend_context_8cpp_source.html#l00078">ClBackendContext.cpp:78</a></div></div> |
| 158 | <div class="ttc" id="namespacearmnn_html_a707090747256af276c389e0cf1cb0a9aa6adf97f83acf6453d4a6a4b1070f3754"><div class="ttname"><a href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aa6adf97f83acf6453d4a6a4b1070f3754">armnn::TuningLevel::None</a></div></div> |
| 159 | <div class="ttc" id="classarmnn_1_1_i_gpu_acc_tuned_parameters_html_a46c8a310cf4c094f8c80e1cb8dc1f911"><div class="ttname"><a href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a46c8a310cf4c094f8c80e1cb8dc1f911">armnn::IGpuAccTunedParameters::Mode</a></div><div class="ttdeci">Mode</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.html#l00182">IRuntime.hpp:182</a></div></div> |
| 160 | <div class="ttc" id="namespacearmnn_html_a707090747256af276c389e0cf1cb0a9a"><div class="ttname"><a href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9a">armnn::TuningLevel</a></div><div class="ttdeci">TuningLevel</div><div class="ttdef"><b>Definition:</b> <a href="_cl_backend_context_8cpp_source.html#l00069">ClBackendContext.cpp:69</a></div></div> |
| 161 | <div class="ttc" id="namespacearmnn_html_af457790132251cde6545072d879c7684"><div class="ttname"><a href="namespacearmnn.html#af457790132251cde6545072d879c7684">armnn::ParseOptions</a></div><div class="ttdeci">void ParseOptions(const std::vector< BackendOptions > &options, BackendId backend, F f)</div><div class="ttdef"><b>Definition:</b> <a href="_cl_backend_context_8cpp_source.html#l00116">ClBackendContext.cpp:116</a></div></div> |
| 162 | <div class="ttc" id="classarmnn_1_1_i_gpu_acc_tuned_parameters_html_a707090747256af276c389e0cf1cb0a9aab571ef5b2664270d25bea4f4b61ffe68"><div class="ttname"><a href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a707090747256af276c389e0cf1cb0a9aab571ef5b2664270d25bea4f4b61ffe68">armnn::IGpuAccTunedParameters::TuningLevel::Rapid</a></div></div> |
| 163 | <div class="ttc" id="classarmnn_1_1_i_gpu_acc_tuned_parameters_html_a707090747256af276c389e0cf1cb0a9aa960b44c579bc2f6818d2daaf9e4c16f0"><div class="ttname"><a href="classarmnn_1_1_i_gpu_acc_tuned_parameters.html#a707090747256af276c389e0cf1cb0a9aa960b44c579bc2f6818d2daaf9e4c16f0">armnn::IGpuAccTunedParameters::TuningLevel::Normal</a></div></div> |
| 164 | <div class="ttc" id="namespacearmnn_html_a4dc0adc6737b5944e7671bee71788407a7b83d3f08fa392b79e3f553b585971cd"><div class="ttname"><a href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407a7b83d3f08fa392b79e3f553b585971cd">armnn::BoostLogSeverityMapping::warning</a></div></div> |
| 165 | <div class="ttc" id="namespacearmnn_html_a707090747256af276c389e0cf1cb0a9aa960b44c579bc2f6818d2daaf9e4c16f0"><div class="ttname"><a href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aa960b44c579bc2f6818d2daaf9e4c16f0">armnn::TuningLevel::Normal</a></div></div> |
| 166 | <div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_html_a6560146509197f3e197d8d36f76c1347"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.html#a6560146509197f3e197d8d36f76c1347">options</a></div><div class="ttdeci">armnn::Runtime::CreationOptions::ExternalProfilingOptions options</div><div class="ttdef"><b>Definition:</b> <a href="_file_only_profiling_decorator_tests_8cpp_source.html#l00045">FileOnlyProfilingDecoratorTests.cpp:45</a></div></div> |
| 167 | <div class="ttc" id="namespacearmnn_html_a707090747256af276c389e0cf1cb0a9aab571ef5b2664270d25bea4f4b61ffe68"><div class="ttname"><a href="namespacearmnn.html#a707090747256af276c389e0cf1cb0a9aab571ef5b2664270d25bea4f4b61ffe68">armnn::TuningLevel::Rapid</a></div></div> |
| 168 | </div><!-- fragment --> |
| 169 | </div> |
| 170 | </div> |
| 171 | <a id="a9cd81257364a0a85008f1d4109016264"></a> |
| 172 | <h2 class="memtitle"><span class="permalink"><a href="#a9cd81257364a0a85008f1d4109016264">◆ </a></span>~ClBackendContext()</h2> |
| 173 | |
| 174 | <div class="memitem"> |
| 175 | <div class="memproto"> |
| 176 | <table class="mlabels"> |
| 177 | <tr> |
| 178 | <td class="mlabels-left"> |
| 179 | <table class="memname"> |
| 180 | <tr> |
| 181 | <td class="memname">~<a class="el" href="classarmnn_1_1_cl_backend_context.html">ClBackendContext</a> </td> |
| 182 | <td>(</td> |
| 183 | <td class="paramname"></td><td>)</td> |
| 184 | <td></td> |
| 185 | </tr> |
| 186 | </table> |
| 187 | </td> |
| 188 | <td class="mlabels-right"> |
| 189 | <span class="mlabels"><span class="mlabel">override</span></span> </td> |
| 190 | </tr> |
| 191 | </table> |
| 192 | </div><div class="memdoc"> |
| 193 | |
| 194 | <p class="definition">Definition at line <a class="el" href="_cl_backend_context_8cpp_source.html#l00277">277</a> of file <a class="el" href="_cl_backend_context_8cpp_source.html">ClBackendContext.cpp</a>.</p> |
| 195 | |
| 196 | <p class="reference">References <a class="el" href="_logging_8hpp_source.html#l00163">ARMNN_LOG</a>, and <a class="el" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407a7b83d3f08fa392b79e3f553b585971cd">armnn::warning</a>.</p> |
| 197 | <div class="fragment"><div class="line"><a name="l00278"></a><span class="lineno"> 278</span> {</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keywordflow">if</span> (m_Tuner && !m_TuningFile.empty())</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  {</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keywordflow">try</span></div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  {</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  m_Tuner->save_to_file(m_TuningFile.c_str());</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  }</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="keywordflow">catch</span>(<span class="keyword">const</span> std::exception& e)</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  {</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(<a class="code" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407a7b83d3f08fa392b79e3f553b585971cd">warning</a>) << <span class="stringliteral">"Could not save GpuAcc tuner data to file "</span> << m_TuningFile;</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  }</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  }</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span> }</div><div class="ttc" id="_logging_8hpp_html_a7b6ad073975f437ec38ca7d20154727f"><div class="ttname"><a href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a></div><div class="ttdeci">#define ARMNN_LOG(severity)</div><div class="ttdef"><b>Definition:</b> <a href="_logging_8hpp_source.html#l00163">Logging.hpp:163</a></div></div> |
| 198 | <div class="ttc" id="namespacearmnn_html_a4dc0adc6737b5944e7671bee71788407a7b83d3f08fa392b79e3f553b585971cd"><div class="ttname"><a href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407a7b83d3f08fa392b79e3f553b585971cd">armnn::BoostLogSeverityMapping::warning</a></div></div> |
| 199 | </div><!-- fragment --> |
| 200 | </div> |
| 201 | </div> |
| 202 | <h2 class="groupheader">Member Function Documentation</h2> |
| 203 | <a id="a8285e428113914dee00fb06ac0f3af1e"></a> |
| 204 | <h2 class="memtitle"><span class="permalink"><a href="#a8285e428113914dee00fb06ac0f3af1e">◆ </a></span>AfterLoadNetwork()</h2> |
| 205 | |
| 206 | <div class="memitem"> |
| 207 | <div class="memproto"> |
| 208 | <table class="mlabels"> |
| 209 | <tr> |
| 210 | <td class="mlabels-left"> |
| 211 | <table class="memname"> |
| 212 | <tr> |
| 213 | <td class="memname">bool AfterLoadNetwork </td> |
| 214 | <td>(</td> |
| 215 | <td class="paramtype"><a class="el" href="namespacearmnn.html#a83015160d8c67d5d77735eb0d4033d9a">NetworkId</a> </td> |
| 216 | <td class="paramname"><em>networkId</em></td><td>)</td> |
| 217 | <td></td> |
| 218 | </tr> |
| 219 | </table> |
| 220 | </td> |
| 221 | <td class="mlabels-right"> |
| 222 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 223 | </tr> |
| 224 | </table> |
| 225 | </div><div class="memdoc"> |
| 226 | |
| 227 | <p>Implements <a class="el" href="classarmnn_1_1_i_backend_context.html#ac938e77cdaee5ad3b2ed5edb29e71ec4">IBackendContext</a>.</p> |
| 228 | |
| 229 | <p class="definition">Definition at line <a class="el" href="_cl_backend_context_8cpp_source.html#l00246">246</a> of file <a class="el" href="_cl_backend_context_8cpp_source.html">ClBackendContext.cpp</a>.</p> |
| 230 | <div class="fragment"><div class="line"><a name="l00247"></a><span class="lineno"> 247</span> {</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  {</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  std::lock_guard<std::mutex> lockGuard(m_Mutex);</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  m_NetworkIds.insert(networkId);</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  }</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span> }</div></div><!-- fragment --> |
| 231 | </div> |
| 232 | </div> |
| 233 | <a id="a16900a3d8c0121a45ceb870f1815bc4d"></a> |
| 234 | <h2 class="memtitle"><span class="permalink"><a href="#a16900a3d8c0121a45ceb870f1815bc4d">◆ </a></span>AfterUnloadNetwork()</h2> |
| 235 | |
| 236 | <div class="memitem"> |
| 237 | <div class="memproto"> |
| 238 | <table class="mlabels"> |
| 239 | <tr> |
| 240 | <td class="mlabels-left"> |
| 241 | <table class="memname"> |
| 242 | <tr> |
| 243 | <td class="memname">bool AfterUnloadNetwork </td> |
| 244 | <td>(</td> |
| 245 | <td class="paramtype"><a class="el" href="namespacearmnn.html#a83015160d8c67d5d77735eb0d4033d9a">NetworkId</a> </td> |
| 246 | <td class="paramname"><em>networkId</em></td><td>)</td> |
| 247 | <td></td> |
| 248 | </tr> |
| 249 | </table> |
| 250 | </td> |
| 251 | <td class="mlabels-right"> |
| 252 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 253 | </tr> |
| 254 | </table> |
| 255 | </div><div class="memdoc"> |
| 256 | |
| 257 | <p>Implements <a class="el" href="classarmnn_1_1_i_backend_context.html#a9daa97deba9fecfe23bdd0b6ec387ceb">IBackendContext</a>.</p> |
| 258 | |
| 259 | <p class="definition">Definition at line <a class="el" href="_cl_backend_context_8cpp_source.html#l00260">260</a> of file <a class="el" href="_cl_backend_context_8cpp_source.html">ClBackendContext.cpp</a>.</p> |
| 260 | <div class="fragment"><div class="line"><a name="l00261"></a><span class="lineno"> 261</span> {</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <span class="keywordtype">bool</span> clearCache = <span class="keyword">false</span>;</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  {</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  std::lock_guard<std::mutex> lockGuard(m_Mutex);</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  m_NetworkIds.erase(networkId);</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  clearCache = m_NetworkIds.empty();</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  }</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span> </div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <span class="keywordflow">if</span> (clearCache)</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  {</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  m_ClContextControlWrapper->ClearClCache();</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  }</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span> </div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span> }</div></div><!-- fragment --> |
| 261 | </div> |
| 262 | </div> |
| 263 | <a id="ae8b132bb727f3594b8613a66096fbd99"></a> |
| 264 | <h2 class="memtitle"><span class="permalink"><a href="#ae8b132bb727f3594b8613a66096fbd99">◆ </a></span>BeforeLoadNetwork()</h2> |
| 265 | |
| 266 | <div class="memitem"> |
| 267 | <div class="memproto"> |
| 268 | <table class="mlabels"> |
| 269 | <tr> |
| 270 | <td class="mlabels-left"> |
| 271 | <table class="memname"> |
| 272 | <tr> |
| 273 | <td class="memname">bool BeforeLoadNetwork </td> |
| 274 | <td>(</td> |
| 275 | <td class="paramtype"><a class="el" href="namespacearmnn.html#a83015160d8c67d5d77735eb0d4033d9a">NetworkId</a> </td> |
| 276 | <td class="paramname"><em>networkId</em></td><td>)</td> |
| 277 | <td></td> |
| 278 | </tr> |
| 279 | </table> |
| 280 | </td> |
| 281 | <td class="mlabels-right"> |
| 282 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 283 | </tr> |
| 284 | </table> |
| 285 | </div><div class="memdoc"> |
| 286 | |
| 287 | <p>Implements <a class="el" href="classarmnn_1_1_i_backend_context.html#a713bc02a1dd5b8e9ef512a8d32d70b61">IBackendContext</a>.</p> |
| 288 | |
| 289 | <p class="definition">Definition at line <a class="el" href="_cl_backend_context_8cpp_source.html#l00241">241</a> of file <a class="el" href="_cl_backend_context_8cpp_source.html">ClBackendContext.cpp</a>.</p> |
| 290 | <div class="fragment"><div class="line"><a name="l00242"></a><span class="lineno"> 242</span> {</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span> }</div></div><!-- fragment --> |
| 291 | </div> |
| 292 | </div> |
| 293 | <a id="acb272e49e9da9835827451184feee061"></a> |
| 294 | <h2 class="memtitle"><span class="permalink"><a href="#acb272e49e9da9835827451184feee061">◆ </a></span>BeforeUnloadNetwork()</h2> |
| 295 | |
| 296 | <div class="memitem"> |
| 297 | <div class="memproto"> |
| 298 | <table class="mlabels"> |
| 299 | <tr> |
| 300 | <td class="mlabels-left"> |
| 301 | <table class="memname"> |
| 302 | <tr> |
| 303 | <td class="memname">bool BeforeUnloadNetwork </td> |
| 304 | <td>(</td> |
| 305 | <td class="paramtype"><a class="el" href="namespacearmnn.html#a83015160d8c67d5d77735eb0d4033d9a">NetworkId</a> </td> |
| 306 | <td class="paramname"><em>networkId</em></td><td>)</td> |
| 307 | <td></td> |
| 308 | </tr> |
| 309 | </table> |
| 310 | </td> |
| 311 | <td class="mlabels-right"> |
| 312 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 313 | </tr> |
| 314 | </table> |
| 315 | </div><div class="memdoc"> |
| 316 | |
| 317 | <p>Implements <a class="el" href="classarmnn_1_1_i_backend_context.html#a8c6bb1875b98f745a05ca3881d3122d9">IBackendContext</a>.</p> |
| 318 | |
| 319 | <p class="definition">Definition at line <a class="el" href="_cl_backend_context_8cpp_source.html#l00255">255</a> of file <a class="el" href="_cl_backend_context_8cpp_source.html">ClBackendContext.cpp</a>.</p> |
| 320 | <div class="fragment"><div class="line"><a name="l00256"></a><span class="lineno"> 256</span> {</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="keywordflow">return</span> m_ClContextControlWrapper->Sync();</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span> }</div></div><!-- fragment --> |
| 321 | </div> |
| 322 | </div> |
| 323 | <hr/>The documentation for this class was generated from the following files:<ul> |
| 324 | <li>src/backends/cl/<a class="el" href="_cl_backend_context_8hpp_source.html">ClBackendContext.hpp</a></li> |
| 325 | <li>src/backends/cl/<a class="el" href="_cl_backend_context_8cpp_source.html">ClBackendContext.cpp</a></li> |
| 326 | </ul> |
| 327 | </div><!-- contents --> |
| 328 | </div><!-- doc-content --> |
| 329 | <!-- start footer part --> |
| 330 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 331 | <ul> |
| 332 | <li class="navelem"><a class="el" href="namespacearmnn.html">armnn</a></li><li class="navelem"><a class="el" href="classarmnn_1_1_cl_backend_context.html">ClBackendContext</a></li> |
| 333 | <li class="footer">Generated on Fri Mar 13 2020 16:07:02 for ArmNN by |
| 334 | <a href="http://www.doxygen.org/index.html"> |
| 335 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 336 | </ul> |
| 337 | </div> |
| 338 | </body> |
| 339 | </html> |