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: OptimizeInversePermutesImpl 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_1optimizations_1_1_optimize_inverse_permutes_impl.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="#pro-methods">Protected Member Functions</a> | |
| 86 | <a href="classarmnn_1_1optimizations_1_1_optimize_inverse_permutes_impl-members.html">List of all members</a> </div> |
| 87 | <div class="headertitle"> |
| 88 | <div class="title">OptimizeInversePermutesImpl Class Reference</div> </div> |
| 89 | </div><!--header--> |
| 90 | <div class="contents"> |
| 91 | |
| 92 | <p><code>#include <<a class="el" href="_optimize_inverse_permutes_8hpp_source.html">OptimizeInversePermutes.hpp</a>></code></p> |
| 93 | <table class="memberdecls"> |
| 94 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| 95 | Public Member Functions</h2></td></tr> |
| 96 | <tr class="memitem:a5a8476ffc04ce7460bb09ad50d1d23de"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1optimizations_1_1_optimize_inverse_permutes_impl.html#a5a8476ffc04ce7460bb09ad50d1d23de">Run</a> (<a class="el" href="classarmnn_1_1_graph.html">Graph</a> &graph, <a class="el" href="classarmnn_1_1_input_slot.html">InputSlot</a> &connection) const</td></tr> |
| 97 | <tr class="separator:a5a8476ffc04ce7460bb09ad50d1d23de"><td class="memSeparator" colspan="2"> </td></tr> |
| 98 | </table><table class="memberdecls"> |
| 99 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a> |
| 100 | Protected Member Functions</h2></td></tr> |
| 101 | <tr class="memitem:a1b60994c0c2e192a68ee8cd45753765f"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1optimizations_1_1_optimize_inverse_permutes_impl.html#a1b60994c0c2e192a68ee8cd45753765f">OptimizeInversePermutesImpl</a> ()=default</td></tr> |
| 102 | <tr class="separator:a1b60994c0c2e192a68ee8cd45753765f"><td class="memSeparator" colspan="2"> </td></tr> |
| 103 | <tr class="memitem:a7da84b100be2bb063c08aa755b231dd1"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1optimizations_1_1_optimize_inverse_permutes_impl.html#a7da84b100be2bb063c08aa755b231dd1">~OptimizeInversePermutesImpl</a> ()=default</td></tr> |
| 104 | <tr class="separator:a7da84b100be2bb063c08aa755b231dd1"><td class="memSeparator" colspan="2"> </td></tr> |
| 105 | </table> |
| 106 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 107 | <div class="textblock"> |
| 108 | <p class="definition">Definition at line <a class="el" href="_optimize_inverse_permutes_8hpp_source.html#l00016">16</a> of file <a class="el" href="_optimize_inverse_permutes_8hpp_source.html">OptimizeInversePermutes.hpp</a>.</p> |
| 109 | </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 110 | <a id="a1b60994c0c2e192a68ee8cd45753765f"></a> |
| 111 | <h2 class="memtitle"><span class="permalink"><a href="#a1b60994c0c2e192a68ee8cd45753765f">◆ </a></span>OptimizeInversePermutesImpl()</h2> |
| 112 | |
| 113 | <div class="memitem"> |
| 114 | <div class="memproto"> |
| 115 | <table class="mlabels"> |
| 116 | <tr> |
| 117 | <td class="mlabels-left"> |
| 118 | <table class="memname"> |
| 119 | <tr> |
| 120 | <td class="memname"><a class="el" href="classarmnn_1_1optimizations_1_1_optimize_inverse_permutes_impl.html">OptimizeInversePermutesImpl</a> </td> |
| 121 | <td>(</td> |
| 122 | <td class="paramname"></td><td>)</td> |
| 123 | <td></td> |
| 124 | </tr> |
| 125 | </table> |
| 126 | </td> |
| 127 | <td class="mlabels-right"> |
| 128 | <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">default</span></span> </td> |
| 129 | </tr> |
| 130 | </table> |
| 131 | </div><div class="memdoc"> |
| 132 | |
| 133 | <p class="reference">Referenced by <a class="el" href="_optimize_inverse_permutes_8hpp_source.html#l00021">OptimizeInversePermutesImpl::Run()</a>.</p> |
| 134 | |
| 135 | </div> |
| 136 | </div> |
| 137 | <a id="a7da84b100be2bb063c08aa755b231dd1"></a> |
| 138 | <h2 class="memtitle"><span class="permalink"><a href="#a7da84b100be2bb063c08aa755b231dd1">◆ </a></span>~OptimizeInversePermutesImpl()</h2> |
| 139 | |
| 140 | <div class="memitem"> |
| 141 | <div class="memproto"> |
| 142 | <table class="mlabels"> |
| 143 | <tr> |
| 144 | <td class="mlabels-left"> |
| 145 | <table class="memname"> |
| 146 | <tr> |
| 147 | <td class="memname">~<a class="el" href="classarmnn_1_1optimizations_1_1_optimize_inverse_permutes_impl.html">OptimizeInversePermutesImpl</a> </td> |
| 148 | <td>(</td> |
| 149 | <td class="paramname"></td><td>)</td> |
| 150 | <td></td> |
| 151 | </tr> |
| 152 | </table> |
| 153 | </td> |
| 154 | <td class="mlabels-right"> |
| 155 | <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">default</span></span> </td> |
| 156 | </tr> |
| 157 | </table> |
| 158 | </div><div class="memdoc"> |
| 159 | |
| 160 | <p class="reference">Referenced by <a class="el" href="_optimize_inverse_permutes_8hpp_source.html#l00021">OptimizeInversePermutesImpl::Run()</a>.</p> |
| 161 | |
| 162 | </div> |
| 163 | </div> |
| 164 | <h2 class="groupheader">Member Function Documentation</h2> |
| 165 | <a id="a5a8476ffc04ce7460bb09ad50d1d23de"></a> |
| 166 | <h2 class="memtitle"><span class="permalink"><a href="#a5a8476ffc04ce7460bb09ad50d1d23de">◆ </a></span>Run()</h2> |
| 167 | |
| 168 | <div class="memitem"> |
| 169 | <div class="memproto"> |
| 170 | <table class="mlabels"> |
| 171 | <tr> |
| 172 | <td class="mlabels-left"> |
| 173 | <table class="memname"> |
| 174 | <tr> |
| 175 | <td class="memname">void Run </td> |
| 176 | <td>(</td> |
| 177 | <td class="paramtype"><a class="el" href="classarmnn_1_1_graph.html">Graph</a> & </td> |
| 178 | <td class="paramname"><em>graph</em>, </td> |
| 179 | </tr> |
| 180 | <tr> |
| 181 | <td class="paramkey"></td> |
| 182 | <td></td> |
| 183 | <td class="paramtype"><a class="el" href="classarmnn_1_1_input_slot.html">InputSlot</a> & </td> |
| 184 | <td class="paramname"><em>connection</em> </td> |
| 185 | </tr> |
| 186 | <tr> |
| 187 | <td></td> |
| 188 | <td>)</td> |
| 189 | <td></td><td> const</td> |
| 190 | </tr> |
| 191 | </table> |
| 192 | </td> |
| 193 | <td class="mlabels-right"> |
| 194 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 195 | </tr> |
| 196 | </table> |
| 197 | </div><div class="memdoc"> |
| 198 | <p>Run for every connection between a base <a class="el" href="classarmnn_1_1_permute_layer.html" title="This layer represents a permutation operation. ">PermuteLayer</a> and a child <a class="el" href="classarmnn_1_1_permute_layer.html" title="This layer represents a permutation operation. ">PermuteLayer</a>. Bypasses both layers for that connection if one is the inverse of the other. </p> |
| 199 | |
| 200 | <p class="definition">Definition at line <a class="el" href="_optimize_inverse_permutes_8hpp_source.html#l00021">21</a> of file <a class="el" href="_optimize_inverse_permutes_8hpp_source.html">OptimizeInversePermutes.hpp</a>.</p> |
| 201 | |
| 202 | <p class="reference">References <a class="el" href="_layer_8hpp_source.html#l00055">InputSlot::GetConnectedOutputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00052">InputSlot::GetOwningLayer()</a>, <a class="el" href="_layer_8hpp_source.html#l00115">OutputSlot::GetOwningLayer()</a>, <a class="el" href="_layer_8cpp_source.html#l00112">OutputSlot::MoveAllConnections()</a>, <a class="el" href="classarmnn_1_1optimizations_1_1_optimize_inverse_permutes_impl.html#a1b60994c0c2e192a68ee8cd45753765f">OptimizeInversePermutesImpl::OptimizeInversePermutesImpl()</a>, and <a class="el" href="classarmnn_1_1optimizations_1_1_optimize_inverse_permutes_impl.html#a7da84b100be2bb063c08aa755b231dd1">OptimizeInversePermutesImpl::~OptimizeInversePermutesImpl()</a>.</p> |
| 203 | <div class="fragment"><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  {</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  boost::ignore_unused(graph);</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  Layer& base = connection.GetConnectedOutputSlot()->GetOwningLayer();</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  <span class="keyword">auto</span> child = boost::polymorphic_downcast<PermuteLayer*>(&connection.GetOwningLayer());</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <span class="keywordflow">if</span> (child->IsInverse(*boost::polymorphic_downcast<PermuteLayer*>(&base)))</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  {</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="comment">// Bypass both layers. Child will be removed as it's left unconnected.</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="comment">// Base layer will be removed if left unconnected.</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  child->GetOutputSlot().MoveAllConnections(*base.GetInputSlot(0).GetConnectedOutputSlot());</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  }</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  }</div></div><!-- fragment --> |
| 204 | </div> |
| 205 | </div> |
| 206 | <hr/>The documentation for this class was generated from the following file:<ul> |
| 207 | <li>src/armnn/optimizations/<a class="el" href="_optimize_inverse_permutes_8hpp_source.html">OptimizeInversePermutes.hpp</a></li> |
| 208 | </ul> |
| 209 | </div><!-- contents --> |
| 210 | </div><!-- doc-content --> |
| 211 | <!-- start footer part --> |
| 212 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 213 | <ul> |
| 214 | <li class="navelem"><a class="el" href="namespacearmnn.html">armnn</a></li><li class="navelem"><a class="el" href="namespacearmnn_1_1optimizations.html">optimizations</a></li><li class="navelem"><a class="el" href="classarmnn_1_1optimizations_1_1_optimize_inverse_permutes_impl.html">OptimizeInversePermutesImpl</a></li> |
| 215 | <li class="footer">Generated on Fri Mar 13 2020 16:07:05 for ArmNN by |
| 216 | <a href="http://www.doxygen.org/index.html"> |
| 217 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 218 | </ul> |
| 219 | </div> |
| 220 | </body> |
| 221 | </html> |