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: src/armnn/SubgraphViewSelector.cpp Source File</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('_subgraph_view_selector_8cpp_source.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="headertitle"> |
| 84 | <div class="title">SubgraphViewSelector.cpp</div> </div> |
| 85 | </div><!--header--> |
| 86 | <div class="contents"> |
| 87 | <a href="_subgraph_view_selector_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">// Copyright © 2017 Arm Ltd. All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> </div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include "<a class="code" href="_subgraph_view_selector_8hpp.html">SubgraphViewSelector.hpp</a>"</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include "<a class="code" href="_graph_8hpp.html">Graph.hpp</a>"</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include <boost/assert.hpp></span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#include <algorithm></span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#include <map></span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include <queue></span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include <unordered_set></span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> </div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">namespace </span><a class="code" href="namespacearmnn.html">armnn</a></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> {</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="keyword">namespace</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> {</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">class </span>PartialSubgraph</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> {</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  PartialSubgraph* GetRepresentative()</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  {</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="comment">// Recurse up the tree to find the root node.</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keywordflow">if</span> (m_Parent == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  {</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keywordflow">return</span> <span class="keyword">this</span>;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  }</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  {</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  PartialSubgraph* result = m_Parent->GetRepresentative();</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="comment">// Update our parent pointer to point directly to the root in order to speed up future calls to this method.</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="comment">// This essentially "flattens" the tree.</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  m_Parent = result;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  }</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  }</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordtype">void</span> MergeWith(PartialSubgraph* other)</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  {</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordflow">if</span> (m_Parent == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  {</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  other = other->GetRepresentative();</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">if</span> (<span class="keyword">this</span> == other)</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  {</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="comment">// Already merged - no-op</span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  }</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  m_Parent = other;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="comment">// Update others' dependency sets to point to the new representative rather than us.</span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="comment">// Keeping these up-to-date means we can rely on these sets containing representatives when</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="comment">// we perform a lookup in HasAntecedent() and so don't need to resolve the representative for each element</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="comment">// of the set. See description at the top of this class for more rationale.</span></div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">for</span> (PartialSubgraph* a : m_Antecedents)</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  {</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keywordtype">size_t</span> numErased = a->m_Dependants.erase(<span class="keyword">this</span>);</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  BOOST_ASSERT(numErased == 1);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  boost::ignore_unused(numErased);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  a->m_Dependants.insert(m_Parent);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  }</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">for</span> (PartialSubgraph* a : m_Dependants)</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  {</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordtype">size_t</span> numErased = a->m_Antecedents.erase(<span class="keyword">this</span>);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  BOOST_ASSERT(numErased == 1);</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  boost::ignore_unused(numErased);</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  a->m_Antecedents.insert(m_Parent);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  }</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> </div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="comment">// Merge our dependency sets into our new representative.</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="comment">// We no longer need to maintain our own sets, as requests will always be forwarded to the representative.</span></div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  m_Parent->m_Antecedents.insert(m_Antecedents.begin(), m_Antecedents.end());</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  m_Antecedents.clear();</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  m_Parent->m_Dependants.insert(m_Dependants.begin(), m_Dependants.end());</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  m_Dependants.clear();</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  }</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  {</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="comment">// Defer request to the representative</span></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  GetRepresentative()->MergeWith(other);</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  }</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  }</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordtype">bool</span> IsMergedWith(PartialSubgraph* other)</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  {</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keywordflow">return</span> GetRepresentative() == other->GetRepresentative();</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  }</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keywordtype">void</span> AddDirectAntecedent(PartialSubgraph* antecedent)</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  {</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keywordflow">if</span> (m_Parent == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  {</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  antecedent = antecedent->GetRepresentative();</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  m_Antecedents.insert(antecedent);</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="comment">// Also record all of its antecedents, so that we end up with direct and indirect antecedents.</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="comment">// This makes the lookup in HasAntecedent() faster.</span></div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  m_Antecedents.insert(antecedent->m_Antecedents.begin(), antecedent->m_Antecedents.end());</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="comment">// All of our dependents also need to include the new antecedents</span></div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">for</span> (PartialSubgraph* d : m_Dependants)</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  {</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  d->m_Antecedents.insert(antecedent);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  d->m_Antecedents.insert(antecedent->m_Antecedents.begin(), antecedent->m_Antecedents.end());</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  }</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span> </div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="comment">// Store reverse dependencies as well, required so that we can efficiently navigate the graph</span></div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="comment">// when making updates.</span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  antecedent->m_Dependants.insert(<span class="keyword">this</span>);</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  antecedent->m_Dependants.insert(m_Dependants.begin(), m_Dependants.end());</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keywordflow">for</span> (PartialSubgraph* a : antecedent->m_Antecedents)</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  {</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  a->m_Dependants.insert(<span class="keyword">this</span>);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  a->m_Dependants.insert(m_Dependants.begin(), m_Dependants.end());</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  }</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  }</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  {</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="comment">// Defer request to the representative</span></div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  GetRepresentative()->AddDirectAntecedent(antecedent);</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  }</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  }</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> </div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="keywordtype">bool</span> HasAntecedent(PartialSubgraph* antecedent)</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  {</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">if</span> (m_Parent == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  {</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  antecedent = antecedent->GetRepresentative();</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="comment">// Thanks to keeping this set updated in MergeWith and AddDirectAntecedent, we can do an efficient lookup.</span></div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="keywordflow">return</span> m_Antecedents.count(antecedent) > 0;</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  }</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  {</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="comment">// Defer request to the representative</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keywordflow">return</span> GetRepresentative()->HasAntecedent(antecedent);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  }</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  }</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> </div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  PartialSubgraph* m_Parent;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  std::unordered_set<PartialSubgraph*> m_Antecedents;</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  std::unordered_set<PartialSubgraph*> m_Dependants;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span> };</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span> </div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span> <span class="keyword">struct </span>LayerSelectionInfo</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span> {</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="keyword">using</span> LayerInfoContainer = std::map<Layer*, LayerSelectionInfo>;</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="keyword">using</span> LayerInfoQueue = std::queue<LayerSelectionInfo*>;</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span> </div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  LayerSelectionInfo(Layer* layer, <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a341a1b47a5f71edaebf81f3a5f0f4c55">SubgraphViewSelector::LayerSelectorFunction</a>& selector)</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  : <a class="code" href="_subgraph_view_selector_8cpp.html#ae7fc37b88ff10e9294ed1c72f2a25ac7">m_Layer</a>{layer}</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  , <a class="code" href="_subgraph_view_selector_8cpp.html#a3a672da6a5207243cf3e5c933872b5bf">m_Subgraph</a>{<span class="keyword">nullptr</span>}</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  , <a class="code" href="_subgraph_view_selector_8cpp.html#aa479d97c404e5996e29b009c60b22e8b">m_IsSelected</a>{selector(*layer)}</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  , <a class="code" href="_subgraph_view_selector_8cpp.html#a849c95a020d031ec405d7d21021d87c2">m_IsProcessed</a>(<span class="keyword">false</span>)</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  {</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  }</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span> </div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keywordtype">bool</span> IsInputLayer()<span class="keyword"> const</span></div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="keywordflow">return</span> <a class="code" href="_subgraph_view_selector_8cpp.html#ae7fc37b88ff10e9294ed1c72f2a25ac7">m_Layer</a>->GetType() == <a class="code" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">armnn::LayerType::Input</a> || <a class="code" href="_subgraph_view_selector_8cpp.html#ae7fc37b88ff10e9294ed1c72f2a25ac7">m_Layer</a>->GetType() == <a class="code" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4acb17869fe51048b5a5c4c6106551a255">armnn::LayerType::Constant</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>  <span class="keywordtype">void</span> CollectNonSelectedInputs(LayerSelectionInfo::LayerInfoContainer& layerInfos,</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <a class="code" href="classarmnn_1_1_subgraph_view.html#a5cc65e15002dbc33a5c8a7d6680e9a9d">SubgraphView::InputSlots</a>& inputSlots)</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  {</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&& slot = <a class="code" href="_subgraph_view_selector_8cpp.html#ae7fc37b88ff10e9294ed1c72f2a25ac7">m_Layer</a>->BeginInputSlots(); slot != <a class="code" href="_subgraph_view_selector_8cpp.html#ae7fc37b88ff10e9294ed1c72f2a25ac7">m_Layer</a>->EndInputSlots(); ++slot)</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>  OutputSlot* parentLayerOutputSlot = slot->GetConnectedOutputSlot();</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  BOOST_ASSERT_MSG(parentLayerOutputSlot != <span class="keyword">nullptr</span>, <span class="stringliteral">"The input slots must be connected here."</span>);</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keywordflow">if</span> (parentLayerOutputSlot)</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  {</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  Layer& parentLayer = parentLayerOutputSlot->GetOwningLayer();</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="keyword">auto</span> parentInfo = layerInfos.find(&parentLayer);</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keywordflow">if</span> (parentInfo == layerInfos.end() ||</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  !<a class="code" href="_subgraph_view_selector_8cpp.html#a3a672da6a5207243cf3e5c933872b5bf">m_Subgraph</a>->IsMergedWith(parentInfo->second.m_Subgraph.get()))</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  {</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="comment">// Avoid collecting duplicate input slots</span></div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  InputSlot* inputSlot = &(*slot);</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keywordflow">if</span> (std::find(inputSlots.begin(), inputSlots.end(), inputSlot) == inputSlots.end())</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>  inputSlots.push_back(inputSlot);</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</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>  }</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="keywordtype">void</span> CollectNonSelectedOutputSlots(LayerSelectionInfo::LayerInfoContainer& layerInfos,</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <a class="code" href="classarmnn_1_1_subgraph_view.html#a78293334750ec5279eb9c96d56deaf08">SubgraphView::OutputSlots</a>& outputSlots)</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>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&& slot = <a class="code" href="_subgraph_view_selector_8cpp.html#ae7fc37b88ff10e9294ed1c72f2a25ac7">m_Layer</a>->BeginOutputSlots(); slot != <a class="code" href="_subgraph_view_selector_8cpp.html#ae7fc37b88ff10e9294ed1c72f2a25ac7">m_Layer</a>->EndOutputSlots(); ++slot)</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">for</span> (InputSlot* childLayerInputSlot : slot->GetConnections())</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>  Layer& childLayer = childLayerInputSlot->GetOwningLayer();</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="keyword">auto</span> childInfo = layerInfos.find(&childLayer);</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="keywordflow">if</span> (childInfo == layerInfos.end() ||</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  !<a class="code" href="_subgraph_view_selector_8cpp.html#a3a672da6a5207243cf3e5c933872b5bf">m_Subgraph</a>->IsMergedWith(childInfo->second.m_Subgraph.get()))</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>  <span class="comment">// Avoid collecting duplicate output slots</span></div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  OutputSlot* outputSlot = &(*slot);</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="keywordflow">if</span> (std::find(outputSlots.begin(), outputSlots.end(), outputSlot) == outputSlots.end())</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  {</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  outputSlots.push_back(outputSlot);</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>  }</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  }</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  }</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span> </div><div class="line"><a name="l00239"></a><span class="lineno"><a class="line" href="_subgraph_view_selector_8cpp.html#ae7fc37b88ff10e9294ed1c72f2a25ac7"> 239</a></span>  Layer* <a class="code" href="_subgraph_view_selector_8cpp.html#ae7fc37b88ff10e9294ed1c72f2a25ac7">m_Layer</a>;</div><div class="line"><a name="l00243"></a><span class="lineno"><a class="line" href="_subgraph_view_selector_8cpp.html#a3a672da6a5207243cf3e5c933872b5bf"> 243</a></span>  std::shared_ptr<PartialSubgraph> <a class="code" href="_subgraph_view_selector_8cpp.html#a3a672da6a5207243cf3e5c933872b5bf">m_Subgraph</a>;</div><div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="_subgraph_view_selector_8cpp.html#aa479d97c404e5996e29b009c60b22e8b"> 244</a></span>  <span class="keywordtype">bool</span> <a class="code" href="_subgraph_view_selector_8cpp.html#aa479d97c404e5996e29b009c60b22e8b">m_IsSelected</a>;</div><div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="_subgraph_view_selector_8cpp.html#a849c95a020d031ec405d7d21021d87c2"> 245</a></span>  <span class="keywordtype">bool</span> <a class="code" href="_subgraph_view_selector_8cpp.html#a849c95a020d031ec405d7d21021d87c2">m_IsProcessed</a>;</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span> };</div><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> } <span class="comment">// namespace <anonymous></span></div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span> </div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span> <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a></div><div class="line"><a name="l00251"></a><span class="lineno"><a class="line" href="classarmnn_1_1_subgraph_view_selector.html#a3730b0a6006f0d87f894a44e01869d90"> 251</a></span> <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a3730b0a6006f0d87f894a44e01869d90">SubgraphViewSelector::SelectSubgraphs</a>(<a class="code" href="classarmnn_1_1_graph.html">Graph</a>& graph, <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a341a1b47a5f71edaebf81f3a5f0f4c55">LayerSelectorFunction</a>& selector)</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span> {</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <a class="code" href="classarmnn_1_1_subgraph_view.html">SubgraphView</a> subgraph(graph);</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keywordflow">return</span> <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a3730b0a6006f0d87f894a44e01869d90">SubgraphViewSelector::SelectSubgraphs</a>(subgraph, selector);</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span> }</div><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> </div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span> <span class="keyword">template</span><<span class="keyword">typename</span> Delegate></div><div class="line"><a name="l00259"></a><span class="lineno"><a class="line" href="namespacearmnn.html#afce94270d9c4a51cd0c4ac6a58af4e26"> 259</a></span> <span class="keywordtype">void</span> <a class="code" href="namespacearmnn.html#afce94270d9c4a51cd0c4ac6a58af4e26">ForEachLayerInput</a>(LayerSelectionInfo::LayerInfoContainer& layerInfos,</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  LayerSelectionInfo& layerInfo,</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  Delegate <span class="keyword">function</span>)</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span> {</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <a class="code" href="classarmnn_1_1_layer.html">Layer</a>& layer = *layerInfo.m_Layer;</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span> </div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> inputSlot : layer.<a class="code" href="classarmnn_1_1_layer.html#af5f530544d09a44d726f24702b67b35b">GetInputSlots</a>())</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  {</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <span class="keyword">auto</span> connectedInput = boost::polymorphic_downcast<OutputSlot*>(inputSlot.GetConnection());</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  BOOST_ASSERT_MSG(connectedInput, <span class="stringliteral">"Dangling input slot detected."</span>);</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <a class="code" href="classarmnn_1_1_layer.html">Layer</a>& inputLayer = connectedInput->GetOwningLayer();</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>  <span class="keyword">auto</span> parentInfo = layerInfos.find(&inputLayer);</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="keywordflow">if</span> (parentInfo != layerInfos.end())</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="keyword">function</span>(parentInfo->second);</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  }</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  }</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span> }</div><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="keyword">template</span><<span class="keyword">typename</span> Delegate></div><div class="line"><a name="l00280"></a><span class="lineno"><a class="line" href="namespacearmnn.html#a49538fa883b70c944e437d65d6628eec"> 280</a></span> <span class="keywordtype">void</span> <a class="code" href="namespacearmnn.html#a49538fa883b70c944e437d65d6628eec">ForEachLayerOutput</a>(LayerSelectionInfo::LayerInfoContainer& layerInfos,</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  LayerSelectionInfo& layerInfo,</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  Delegate <span class="keyword">function</span>)</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span> {</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <a class="code" href="classarmnn_1_1_layer.html">Layer</a>& layer= *layerInfo.m_Layer;</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span> </div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>& outputSlot : layer.<a class="code" href="classarmnn_1_1_layer.html#a98cdff4e0b45f4c80bfcedaf926e16e0">GetOutputSlots</a>())</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  {</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>& output : outputSlot.GetConnections())</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>  <a class="code" href="classarmnn_1_1_layer.html">Layer</a>& childLayer = output->GetOwningLayer();</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span> </div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="keyword">auto</span> childInfo = layerInfos.find(&childLayer);</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keywordflow">if</span> (childInfo != layerInfos.end())</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  {</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="keyword">function</span>(childInfo->second);</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  }</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  }</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  }</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span> }</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span> </div><div class="line"><a name="l00301"></a><span class="lineno"><a class="line" href="namespacearmnn.html#a09ff1f6670d27d3b41e5b5d35a6c9f37"> 301</a></span> <span class="keywordtype">void</span> <a class="code" href="namespacearmnn.html#a09ff1f6670d27d3b41e5b5d35a6c9f37">AssignSplitId</a>(LayerSelectionInfo::LayerInfoContainer& layerInfos, LayerSelectionInfo& layerInfo)</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span> {</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  <span class="comment">// Check each input to see if we can attach ourselves to any of the subgraphs that have already been assigned.</span></div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <a class="code" href="namespacearmnn.html#afce94270d9c4a51cd0c4ac6a58af4e26">ForEachLayerInput</a>(layerInfos, layerInfo, [&](LayerSelectionInfo& parentInfo)</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  {</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  <span class="comment">// We can only attach ourselves to the subgraph from this input if there isn't a cut here.</span></div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="keywordflow">if</span> (layerInfo.m_IsSelected == parentInfo.m_IsSelected)</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  {</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  <span class="comment">// We also need to check that merging into this subgraph won't cause a dependency cycle between subgraphs.</span></div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  <span class="comment">// This will be the case if the subgraph that we will become part of is already a dependency</span></div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  <span class="comment">// of one of the subgraphs that are input to this layer, e.g:</span></div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <span class="comment">//</span></div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  <span class="comment">// 0 | The numbers (0, 1) are the subgraph IDs of each layer and we are looking at layer X.</span></div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <span class="comment">// / \ |</span></div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  <span class="comment">// 1 0 | We can't merge X into subgraph 0, because the left-hand input already depends on subgraph 0.</span></div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <span class="comment">// \ / | We can however merge X into subgraph 1.</span></div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <span class="comment">// X |</span></div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  <span class="comment">//</span></div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  bool dependenciesOk = true;</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  ForEachLayerInput(layerInfos, layerInfo, [&](LayerSelectionInfo& otherParentInfo)</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  {</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="comment">// We call HasAntecedent() ~ n^2 times, where n is the number of inputs to this layer.</span></div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  <span class="comment">// Hence it is important that this is efficient - see PartialSubgraph class description.</span></div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  if (otherParentInfo.m_Subgraph->HasAntecedent(parentInfo.m_Subgraph.get()))</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  {</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  dependenciesOk = false;</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  }</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  });</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span> </div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  <span class="keywordflow">if</span> (dependenciesOk)</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  {</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  <span class="comment">// Merge into the subgraph of this input. If we have already been merged into another subgraph</span></div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  <span class="comment">// (from another input of this layer), then merge both of them together.</span></div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  <span class="keywordflow">if</span> (layerInfo.m_Subgraph == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  {</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  layerInfo.m_Subgraph = parentInfo.m_Subgraph;</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  }</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  {</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  <span class="comment">// We call MergeWith() ~ n times, where n is the number of inputs to this layer.</span></div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <span class="comment">// Therefore it does not need to be as performant as HasAntecedent().</span></div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  layerInfo.m_Subgraph->MergeWith(parentInfo.m_Subgraph.get());</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  }</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  }</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  }</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  });</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span> </div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  <span class="comment">// If we weren't able to merge into an existing subgraph then we need to make a new one</span></div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <span class="keywordflow">if</span> (layerInfo.m_Subgraph == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  {</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  layerInfo.m_Subgraph = std::make_shared<PartialSubgraph>();</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  }</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span> </div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <span class="comment">// Record dependencies of the chosen subgraph based on the inputs of this layer.</span></div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <a class="code" href="namespacearmnn.html#afce94270d9c4a51cd0c4ac6a58af4e26">ForEachLayerInput</a>(layerInfos, layerInfo, [&](LayerSelectionInfo& parentInfo)</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  {</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  <span class="comment">// These functions are called ~n times, where n is the number of inputs to this layer.</span></div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  <span class="comment">// Therefore it does not need to be as performant as HasAntecedent().</span></div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <span class="keywordflow">if</span> (!layerInfo.m_Subgraph->IsMergedWith(parentInfo.m_Subgraph.get()))</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  {</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  layerInfo.m_Subgraph->AddDirectAntecedent(parentInfo.m_Subgraph.get());</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  }</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  });</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span> }</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span> </div><div class="line"><a name="l00366"></a><span class="lineno"><a class="line" href="namespacearmnn.html#a6b10dc0d12c7f4a52ad01b9975dbe908"> 366</a></span> <span class="keywordtype">bool</span> <a class="code" href="namespacearmnn.html#a6b10dc0d12c7f4a52ad01b9975dbe908">IsReadyForSplitAssignment</a>(LayerSelectionInfo::LayerInfoContainer& layerInfos, LayerSelectionInfo& layerInfo)</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span> {</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <span class="keywordtype">bool</span> ready = <span class="keyword">true</span>;</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <a class="code" href="namespacearmnn.html#afce94270d9c4a51cd0c4ac6a58af4e26">ForEachLayerInput</a>(layerInfos, layerInfo,</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  [&ready](LayerSelectionInfo& parentInfo)</div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  {</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  <span class="keywordflow">if</span> (!parentInfo.m_IsProcessed)</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  {</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  ready = false;</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  }</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  });</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="keywordflow">return</span> ready;</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span> }</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span> </div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span> <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a></div><div class="line"><a name="l00381"></a><span class="lineno"><a class="line" href="classarmnn_1_1_subgraph_view_selector.html#ad28bb1b624cde39578cfefa8b7809aef"> 381</a></span> <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a3730b0a6006f0d87f894a44e01869d90">SubgraphViewSelector::SelectSubgraphs</a>(<a class="code" href="classarmnn_1_1_subgraph_view.html">SubgraphView</a>& subgraph, <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a341a1b47a5f71edaebf81f3a5f0f4c55">LayerSelectorFunction</a>& selector)</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span> {</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  LayerSelectionInfo::LayerInfoContainer layerInfos;</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span> </div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  LayerSelectionInfo::LayerInfoQueue processQueue;</div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>& layer : subgraph)</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  {</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  <span class="keyword">auto</span> emplaced = layerInfos.emplace(layer, LayerSelectionInfo{layer, selector});</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  LayerSelectionInfo& layerInfo = emplaced.first->second;</div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span> </div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  <span class="comment">// Start with Input type layers</span></div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  <span class="keywordflow">if</span> (layerInfo.IsInputLayer())</div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  {</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  processQueue.push(&layerInfo);</div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  }</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  }</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span> </div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_subgraph_view.html#a5cc65e15002dbc33a5c8a7d6680e9a9d">SubgraphView::InputSlots</a>& subgraphInputSlots = subgraph.GetInputSlots();</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>& inputSlot : subgraphInputSlots)</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  {</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  <a class="code" href="classarmnn_1_1_layer.html">Layer</a>& layer = inputSlot->GetOwningLayer();</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  <span class="keyword">auto</span> emplaced = layerInfos.emplace(&layer, LayerSelectionInfo{&layer, selector});</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  LayerSelectionInfo& layerInfo = emplaced.first->second;</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span> </div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  processQueue.push(&layerInfo);</div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  }</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span> </div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <span class="keywordflow">while</span> (!processQueue.empty())</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  {</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  LayerSelectionInfo& layerInfo = *processQueue.front();</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  processQueue.pop(); <span class="comment">// remove front from queue</span></div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span> </div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  <span class="comment">// This layerInfo may have been added to the queue multiple times, so skip if we have already processed it</span></div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="keywordflow">if</span> (!layerInfo.m_IsProcessed)</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  {</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  <span class="comment">// Only process this layerInfo if all inputs have been processed</span></div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <span class="keywordflow">if</span> (!<a class="code" href="namespacearmnn.html#a6b10dc0d12c7f4a52ad01b9975dbe908">IsReadyForSplitAssignment</a>(layerInfos, layerInfo))</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  {</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  <span class="comment">// Put back of the process queue if we can't process it just yet</span></div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  processQueue.push(&layerInfo);</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  <span class="keywordflow">continue</span>; <span class="comment">// Skip to next iteration</span></div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  }</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span> </div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  <span class="comment">// Now we do the processing</span></div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  <a class="code" href="namespacearmnn.html#a09ff1f6670d27d3b41e5b5d35a6c9f37">AssignSplitId</a>(layerInfos, layerInfo);</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span> </div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  <span class="comment">// Queue any child nodes for processing</span></div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  <a class="code" href="namespacearmnn.html#a49538fa883b70c944e437d65d6628eec">ForEachLayerOutput</a>(layerInfos, layerInfo, [&processQueue](LayerSelectionInfo& childInfo)</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  {</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  processQueue.push(&childInfo);</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  });</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span> </div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="comment">// We don't need to process this node again</span></div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  layerInfo.m_IsProcessed = <span class="keyword">true</span>;</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  }</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  }</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span> </div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  <span class="comment">// Collect all selected layers keyed by subgraph representative into a map</span></div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <span class="keyword">using</span> SelectionInfoPtrs = std::vector<LayerSelectionInfo*>;</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  std::map<PartialSubgraph*, SelectionInfoPtrs> splitMap;</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>& <a class="code" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a> : layerInfos)</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  {</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  <span class="keywordflow">if</span> (<a class="code" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a>.second.m_IsSelected)</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  {</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  <span class="keyword">auto</span> it = splitMap.find(<a class="code" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a>.second.m_Subgraph->GetRepresentative());</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  <span class="keywordflow">if</span> (it == splitMap.end())</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  {</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  splitMap.insert(</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  std::make_pair(<a class="code" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a>.second.m_Subgraph->GetRepresentative(), SelectionInfoPtrs{&<a class="code" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a>.second}));</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  }</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  {</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  it->second.push_back(&<a class="code" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a>.second);</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  }</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  }</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  }</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span> </div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  <span class="comment">// Now each entry in splitMap represents a subgraph</span></div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">Subgraphs</a> result;</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>& splitGraph : splitMap)</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  {</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  <a class="code" href="classarmnn_1_1_subgraph_view.html#a5cc65e15002dbc33a5c8a7d6680e9a9d">SubgraphView::InputSlots</a> inputs;</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  <a class="code" href="classarmnn_1_1_subgraph_view.html#a78293334750ec5279eb9c96d56deaf08">SubgraphView::OutputSlots</a> outputs;</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  <a class="code" href="classarmnn_1_1_subgraph_view.html#a74798938fdaeae75c8adfa4a7439e7f9">SubgraphView::Layers</a> layers;</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&& infoPtr : splitGraph.second)</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  {</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  infoPtr->CollectNonSelectedInputs(layerInfos, inputs);</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  infoPtr->CollectNonSelectedOutputSlots(layerInfos, outputs);</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  layers.push_back(infoPtr->m_Layer);</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  }</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  <span class="comment">// Create a new sub-graph with the new lists of input/output slots and layer</span></div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  result.emplace_back(std::make_unique<SubgraphView>(std::move(inputs),</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  std::move(outputs),</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  std::move(layers)));</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  }</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span> </div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span> }</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span> </div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span> } <span class="comment">// namespace armnn</span></div><div class="ttc" id="namespacearmnn_html_afce94270d9c4a51cd0c4ac6a58af4e26"><div class="ttname"><a href="namespacearmnn.html#afce94270d9c4a51cd0c4ac6a58af4e26">armnn::ForEachLayerInput</a></div><div class="ttdeci">void ForEachLayerInput(LayerSelectionInfo::LayerInfoContainer &layerInfos, LayerSelectionInfo &layerInfo, Delegate function)</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8cpp_source.html#l00259">SubgraphViewSelector.cpp:259</a></div></div> |
| 88 | <div class="ttc" id="_subgraph_view_selector_8hpp_html"><div class="ttname"><a href="_subgraph_view_selector_8hpp.html">SubgraphViewSelector.hpp</a></div></div> |
| 89 | <div class="ttc" id="_subgraph_view_selector_8cpp_html_aa479d97c404e5996e29b009c60b22e8b"><div class="ttname"><a href="_subgraph_view_selector_8cpp.html#aa479d97c404e5996e29b009c60b22e8b">m_IsSelected</a></div><div class="ttdeci">bool m_IsSelected</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8cpp_source.html#l00244">SubgraphViewSelector.cpp:244</a></div></div> |
| 90 | <div class="ttc" id="namespacearmnn_html_a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c"><div class="ttname"><a href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">armnn::BoostLogSeverityMapping::info</a></div></div> |
| 91 | <div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div> |
| 92 | <div class="ttc" id="classarmnn_1_1_subgraph_view_html_a74798938fdaeae75c8adfa4a7439e7f9"><div class="ttname"><a href="classarmnn_1_1_subgraph_view.html#a74798938fdaeae75c8adfa4a7439e7f9">armnn::SubgraphView::Layers</a></div><div class="ttdeci">std::list< Layer * > Layers</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_8hpp_source.html#l00040">SubgraphView.hpp:40</a></div></div> |
| 93 | <div class="ttc" id="namespacearmnn_html_a49538fa883b70c944e437d65d6628eec"><div class="ttname"><a href="namespacearmnn.html#a49538fa883b70c944e437d65d6628eec">armnn::ForEachLayerOutput</a></div><div class="ttdeci">void ForEachLayerOutput(LayerSelectionInfo::LayerInfoContainer &layerInfos, LayerSelectionInfo &layerInfo, Delegate function)</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8cpp_source.html#l00280">SubgraphViewSelector.cpp:280</a></div></div> |
| 94 | <div class="ttc" id="classarmnn_1_1_layer_html_a98cdff4e0b45f4c80bfcedaf926e16e0"><div class="ttname"><a href="classarmnn_1_1_layer.html#a98cdff4e0b45f4c80bfcedaf926e16e0">armnn::Layer::GetOutputSlots</a></div><div class="ttdeci">const std::vector< OutputSlot > & GetOutputSlots() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00232">Layer.hpp:232</a></div></div> |
| 95 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_a3730b0a6006f0d87f894a44e01869d90"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#a3730b0a6006f0d87f894a44e01869d90">armnn::SubgraphViewSelector::SelectSubgraphs</a></div><div class="ttdeci">static Subgraphs SelectSubgraphs(Graph &graph, const LayerSelectorFunction &selector)</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector.cpp:251</a></div></div> |
| 96 | <div class="ttc" id="_subgraph_view_selector_8cpp_html_a3a672da6a5207243cf3e5c933872b5bf"><div class="ttname"><a href="_subgraph_view_selector_8cpp.html#a3a672da6a5207243cf3e5c933872b5bf">m_Subgraph</a></div><div class="ttdeci">std::shared_ptr< PartialSubgraph > m_Subgraph</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8cpp_source.html#l00243">SubgraphViewSelector.cpp:243</a></div></div> |
| 97 | <div class="ttc" id="namespacearmnn_html_a56943a0946e5f15e5e58054b8e7a04a4acb17869fe51048b5a5c4c6106551a255"><div class="ttname"><a href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4acb17869fe51048b5a5c4c6106551a255">armnn::LayerType::Constant</a></div></div> |
| 98 | <div class="ttc" id="classarmnn_1_1_layer_html_af5f530544d09a44d726f24702b67b35b"><div class="ttname"><a href="classarmnn_1_1_layer.html#af5f530544d09a44d726f24702b67b35b">armnn::Layer::GetInputSlots</a></div><div class="ttdeci">const std::vector< InputSlot > & GetInputSlots() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00231">Layer.hpp:231</a></div></div> |
| 99 | <div class="ttc" id="classarmnn_1_1_subgraph_view_html_a5cc65e15002dbc33a5c8a7d6680e9a9d"><div class="ttname"><a href="classarmnn_1_1_subgraph_view.html#a5cc65e15002dbc33a5c8a7d6680e9a9d">armnn::SubgraphView::InputSlots</a></div><div class="ttdeci">std::vector< InputSlot * > InputSlots</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_8hpp_source.html#l00038">SubgraphView.hpp:38</a></div></div> |
| 100 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_a341a1b47a5f71edaebf81f3a5f0f4c55"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#a341a1b47a5f71edaebf81f3a5f0f4c55">armnn::SubgraphViewSelector::LayerSelectorFunction</a></div><div class="ttdeci">std::function< bool(const Layer &)> LayerSelectorFunction</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00026">SubgraphViewSelector.hpp:26</a></div></div> |
| 101 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 102 | <div class="ttc" id="classarmnn_1_1_subgraph_view_html"><div class="ttname"><a href="classarmnn_1_1_subgraph_view.html">armnn::SubgraphView</a></div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_8hpp_source.html#l00023">SubgraphView.hpp:23</a></div></div> |
| 103 | <div class="ttc" id="namespacearmnn_html"><div class="ttname"><a href="namespacearmnn.html">armnn</a></div><div class="ttdef"><b>Definition:</b> <a href="_backend_helper_8hpp_source.html#l00011">BackendHelper.hpp:11</a></div></div> |
| 104 | <div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div> |
| 105 | <div class="ttc" id="_subgraph_view_selector_8cpp_html_a849c95a020d031ec405d7d21021d87c2"><div class="ttname"><a href="_subgraph_view_selector_8cpp.html#a849c95a020d031ec405d7d21021d87c2">m_IsProcessed</a></div><div class="ttdeci">bool m_IsProcessed</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8cpp_source.html#l00245">SubgraphViewSelector.cpp:245</a></div></div> |
| 106 | <div class="ttc" id="classarmnn_1_1_subgraph_view_html_a78293334750ec5279eb9c96d56deaf08"><div class="ttname"><a href="classarmnn_1_1_subgraph_view.html#a78293334750ec5279eb9c96d56deaf08">armnn::SubgraphView::OutputSlots</a></div><div class="ttdeci">std::vector< OutputSlot * > OutputSlots</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_8hpp_source.html#l00039">SubgraphView.hpp:39</a></div></div> |
| 107 | <div class="ttc" id="namespacearmnn_html_a09ff1f6670d27d3b41e5b5d35a6c9f37"><div class="ttname"><a href="namespacearmnn.html#a09ff1f6670d27d3b41e5b5d35a6c9f37">armnn::AssignSplitId</a></div><div class="ttdeci">void AssignSplitId(LayerSelectionInfo::LayerInfoContainer &layerInfos, LayerSelectionInfo &layerInfo)</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8cpp_source.html#l00301">SubgraphViewSelector.cpp:301</a></div></div> |
| 108 | <div class="ttc" id="_graph_8hpp_html"><div class="ttname"><a href="_graph_8hpp.html">Graph.hpp</a></div></div> |
| 109 | <div class="ttc" id="_subgraph_view_selector_8cpp_html_ae7fc37b88ff10e9294ed1c72f2a25ac7"><div class="ttname"><a href="_subgraph_view_selector_8cpp.html#ae7fc37b88ff10e9294ed1c72f2a25ac7">m_Layer</a></div><div class="ttdeci">Layer * m_Layer</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8cpp_source.html#l00239">SubgraphViewSelector.cpp:239</a></div></div> |
| 110 | <div class="ttc" id="namespacearmnn_html_a6b10dc0d12c7f4a52ad01b9975dbe908"><div class="ttname"><a href="namespacearmnn.html#a6b10dc0d12c7f4a52ad01b9975dbe908">armnn::IsReadyForSplitAssignment</a></div><div class="ttdeci">bool IsReadyForSplitAssignment(LayerSelectionInfo::LayerInfoContainer &layerInfos, LayerSelectionInfo &layerInfo)</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8cpp_source.html#l00366">SubgraphViewSelector.cpp:366</a></div></div> |
| 111 | <div class="ttc" id="namespacearmnn_html_a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5"><div class="ttname"><a href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">armnn::LayerType::Input</a></div></div> |
| 112 | </div><!-- fragment --></div><!-- contents --> |
| 113 | </div><!-- doc-content --> |
| 114 | <!-- start footer part --> |
| 115 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 116 | <ul> |
| 117 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_e0a84d05c80a2ef4231141dcbbeac5c8.html">armnn</a></li><li class="navelem"><a class="el" href="_subgraph_view_selector_8cpp.html">SubgraphViewSelector.cpp</a></li> |
| 118 | <li class="footer">Generated on Fri Mar 13 2020 16:06:54 for ArmNN by |
| 119 | <a href="http://www.doxygen.org/index.html"> |
| 120 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 121 | </ul> |
| 122 | </div> |
| 123 | </body> |
| 124 | </html> |