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: BroadcastLoop Struct 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('structarmnn_1_1_broadcast_loop.html','');}); |
| 66 | </script> |
| 67 | <div id="doc-content"> |
| 68 | <!-- window showing the filter options --> |
| 69 | <div id="MSearchSelectWindow" |
| 70 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 71 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 72 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 73 | </div> |
| 74 | |
| 75 | <!-- iframe showing the search results (closed by default) --> |
| 76 | <div id="MSearchResultsWindow"> |
| 77 | <iframe src="javascript:void(0)" frameborder="0" |
| 78 | name="MSearchResults" id="MSearchResults"> |
| 79 | </iframe> |
| 80 | </div> |
| 81 | |
| 82 | <div class="header"> |
| 83 | <div class="summary"> |
| 84 | <a href="#nested-classes">Classes</a> | |
| 85 | <a href="#pub-methods">Public Member Functions</a> | |
| 86 | <a href="structarmnn_1_1_broadcast_loop-members.html">List of all members</a> </div> |
| 87 | <div class="headertitle"> |
| 88 | <div class="title">BroadcastLoop Struct Reference</div> </div> |
| 89 | </div><!--header--> |
| 90 | <div class="contents"> |
| 91 | |
| 92 | <p><code>#include <<a class="el" href="_broadcast_8hpp_source.html">Broadcast.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:a9c28d135714489bab0f9c251ca66a845"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="structarmnn_1_1_broadcast_loop.html#a9c28d135714489bab0f9c251ca66a845">BroadcastLoop</a> (const <a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> &inShape0, const <a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> &inShape1, const <a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> &outShape)</td></tr> |
| 97 | <tr class="separator:a9c28d135714489bab0f9c251ca66a845"><td class="memSeparator" colspan="2"> </td></tr> |
| 98 | <tr class="memitem:ac49ed66fded9e92273a7be4c54d6f6ef"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="structarmnn_1_1_broadcast_loop.html#ac49ed66fded9e92273a7be4c54d6f6ef">BroadcastLoop</a> (const <a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> &inShape, const <a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> &outShape)</td></tr> |
| 99 | <tr class="separator:ac49ed66fded9e92273a7be4c54d6f6ef"><td class="memSeparator" colspan="2"> </td></tr> |
| 100 | <tr class="memitem:a0ed4f8b0f36ff2a60cbc4faf3be5d2f7"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="structarmnn_1_1_broadcast_loop.html#a0ed4f8b0f36ff2a60cbc4faf3be5d2f7">GetNumDimensions</a> ()</td></tr> |
| 101 | <tr class="separator:a0ed4f8b0f36ff2a60cbc4faf3be5d2f7"><td class="memSeparator" colspan="2"> </td></tr> |
| 102 | <tr class="memitem:ae9f47e12d6c2265d33fed54e88cf179f"><td class="memTemplParams" colspan="2">template<typename Func , typename DecoderOp , typename EncoderOp > </td></tr> |
| 103 | <tr class="memitem:ae9f47e12d6c2265d33fed54e88cf179f"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarmnn_1_1_broadcast_loop.html#ae9f47e12d6c2265d33fed54e88cf179f">Unroll</a> (Func operationFunc, unsigned int dimension, DecoderOp &inData0, DecoderOp &inData1, EncoderOp &outData)</td></tr> |
| 104 | <tr class="separator:ae9f47e12d6c2265d33fed54e88cf179f"><td class="memSeparator" colspan="2"> </td></tr> |
| 105 | <tr class="memitem:a1b3b461824ae2769251ad66a09da5b52"><td class="memTemplParams" colspan="2">template<typename Func , typename DecoderOp , typename EncoderOp > </td></tr> |
| 106 | <tr class="memitem:a1b3b461824ae2769251ad66a09da5b52"><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarmnn_1_1_broadcast_loop.html#a1b3b461824ae2769251ad66a09da5b52">Unroll</a> (Func operationFunc, unsigned int dimension, DecoderOp &inData, EncoderOp &outData)</td></tr> |
| 107 | <tr class="separator:a1b3b461824ae2769251ad66a09da5b52"><td class="memSeparator" colspan="2"> </td></tr> |
| 108 | </table> |
| 109 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 110 | <div class="textblock"> |
| 111 | <p class="definition">Definition at line <a class="el" href="_broadcast_8hpp_source.html#l00014">14</a> of file <a class="el" href="_broadcast_8hpp_source.html">Broadcast.hpp</a>.</p> |
| 112 | </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 113 | <a id="a9c28d135714489bab0f9c251ca66a845"></a> |
| 114 | <h2 class="memtitle"><span class="permalink"><a href="#a9c28d135714489bab0f9c251ca66a845">◆ </a></span>BroadcastLoop() <span class="overload">[1/2]</span></h2> |
| 115 | |
| 116 | <div class="memitem"> |
| 117 | <div class="memproto"> |
| 118 | <table class="memname"> |
| 119 | <tr> |
| 120 | <td class="memname"><a class="el" href="structarmnn_1_1_broadcast_loop.html">BroadcastLoop</a> </td> |
| 121 | <td>(</td> |
| 122 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> & </td> |
| 123 | <td class="paramname"><em>inShape0</em>, </td> |
| 124 | </tr> |
| 125 | <tr> |
| 126 | <td class="paramkey"></td> |
| 127 | <td></td> |
| 128 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> & </td> |
| 129 | <td class="paramname"><em>inShape1</em>, </td> |
| 130 | </tr> |
| 131 | <tr> |
| 132 | <td class="paramkey"></td> |
| 133 | <td></td> |
| 134 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> & </td> |
| 135 | <td class="paramname"><em>outShape</em> </td> |
| 136 | </tr> |
| 137 | <tr> |
| 138 | <td></td> |
| 139 | <td>)</td> |
| 140 | <td></td><td></td> |
| 141 | </tr> |
| 142 | </table> |
| 143 | </div><div class="memdoc"> |
| 144 | |
| 145 | <p class="definition">Definition at line <a class="el" href="_broadcast_8cpp_source.html#l00011">11</a> of file <a class="el" href="_broadcast_8cpp_source.html">Broadcast.cpp</a>.</p> |
| 146 | |
| 147 | <p class="reference">References <a class="el" href="_broadcast_8hpp_source.html#l00020">BroadcastLoop::GetNumDimensions()</a>.</p> |
| 148 | <div class="fragment"><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> : m_DimData(outShape.GetNumDimensions())</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">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numDims = <a class="code" href="structarmnn_1_1_broadcast_loop.html#a0ed4f8b0f36ff2a60cbc4faf3be5d2f7">GetNumDimensions</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>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sIn0 = 1;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sIn1 = 1;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sOut = 1;</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> </div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j = numDims - 1, k = 0; k < numDims ; k++, j--)</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  {</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  m_DimData[j].m_DimSize = outShape[j];</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  m_DimData[j].m_Stride1 = (inShape0[j] > 1) ? sIn0 : 0;</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  m_DimData[j].m_Stride2 = (inShape1[j] > 1) ? sIn1 : 0;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  m_DimData[j].m_StrideOut = sOut;</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>  sIn0 *= inShape0[j];</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  sIn1 *= inShape1[j];</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  sOut *= outShape[j];</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  }</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> }</div><div class="ttc" id="structarmnn_1_1_broadcast_loop_html_a0ed4f8b0f36ff2a60cbc4faf3be5d2f7"><div class="ttname"><a href="structarmnn_1_1_broadcast_loop.html#a0ed4f8b0f36ff2a60cbc4faf3be5d2f7">armnn::BroadcastLoop::GetNumDimensions</a></div><div class="ttdeci">unsigned int GetNumDimensions()</div><div class="ttdef"><b>Definition:</b> <a href="_broadcast_8hpp_source.html#l00020">Broadcast.hpp:20</a></div></div> |
| 149 | </div><!-- fragment --> |
| 150 | </div> |
| 151 | </div> |
| 152 | <a id="ac49ed66fded9e92273a7be4c54d6f6ef"></a> |
| 153 | <h2 class="memtitle"><span class="permalink"><a href="#ac49ed66fded9e92273a7be4c54d6f6ef">◆ </a></span>BroadcastLoop() <span class="overload">[2/2]</span></h2> |
| 154 | |
| 155 | <div class="memitem"> |
| 156 | <div class="memproto"> |
| 157 | <table class="memname"> |
| 158 | <tr> |
| 159 | <td class="memname"><a class="el" href="structarmnn_1_1_broadcast_loop.html">BroadcastLoop</a> </td> |
| 160 | <td>(</td> |
| 161 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> & </td> |
| 162 | <td class="paramname"><em>inShape</em>, </td> |
| 163 | </tr> |
| 164 | <tr> |
| 165 | <td class="paramkey"></td> |
| 166 | <td></td> |
| 167 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> & </td> |
| 168 | <td class="paramname"><em>outShape</em> </td> |
| 169 | </tr> |
| 170 | <tr> |
| 171 | <td></td> |
| 172 | <td>)</td> |
| 173 | <td></td><td></td> |
| 174 | </tr> |
| 175 | </table> |
| 176 | </div><div class="memdoc"> |
| 177 | |
| 178 | <p class="definition">Definition at line <a class="el" href="_broadcast_8cpp_source.html#l00033">33</a> of file <a class="el" href="_broadcast_8cpp_source.html">Broadcast.cpp</a>.</p> |
| 179 | |
| 180 | <p class="reference">References <a class="el" href="_broadcast_8hpp_source.html#l00020">BroadcastLoop::GetNumDimensions()</a>.</p> |
| 181 | <div class="fragment"><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> : m_DimData(outShape.GetNumDimensions())</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> {</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numDims = <a class="code" href="structarmnn_1_1_broadcast_loop.html#a0ed4f8b0f36ff2a60cbc4faf3be5d2f7">GetNumDimensions</a>();</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sIn = 1;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sOut = 1;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j = numDims - 1, k = 0; k < numDims ; k++, j--)</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  {</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  m_DimData[j].m_DimSize = outShape[j];</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  m_DimData[j].m_Stride1 = (inShape[j] > 1) ? sIn : 0;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  m_DimData[j].m_StrideOut = sOut;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> </div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  sIn *= inShape[j];</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  sOut *= outShape[j];</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> }</div><div class="ttc" id="structarmnn_1_1_broadcast_loop_html_a0ed4f8b0f36ff2a60cbc4faf3be5d2f7"><div class="ttname"><a href="structarmnn_1_1_broadcast_loop.html#a0ed4f8b0f36ff2a60cbc4faf3be5d2f7">armnn::BroadcastLoop::GetNumDimensions</a></div><div class="ttdeci">unsigned int GetNumDimensions()</div><div class="ttdef"><b>Definition:</b> <a href="_broadcast_8hpp_source.html#l00020">Broadcast.hpp:20</a></div></div> |
| 182 | </div><!-- fragment --> |
| 183 | </div> |
| 184 | </div> |
| 185 | <h2 class="groupheader">Member Function Documentation</h2> |
| 186 | <a id="a0ed4f8b0f36ff2a60cbc4faf3be5d2f7"></a> |
| 187 | <h2 class="memtitle"><span class="permalink"><a href="#a0ed4f8b0f36ff2a60cbc4faf3be5d2f7">◆ </a></span>GetNumDimensions()</h2> |
| 188 | |
| 189 | <div class="memitem"> |
| 190 | <div class="memproto"> |
| 191 | <table class="mlabels"> |
| 192 | <tr> |
| 193 | <td class="mlabels-left"> |
| 194 | <table class="memname"> |
| 195 | <tr> |
| 196 | <td class="memname">unsigned int GetNumDimensions </td> |
| 197 | <td>(</td> |
| 198 | <td class="paramname"></td><td>)</td> |
| 199 | <td></td> |
| 200 | </tr> |
| 201 | </table> |
| 202 | </td> |
| 203 | <td class="mlabels-right"> |
| 204 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 205 | </tr> |
| 206 | </table> |
| 207 | </div><div class="memdoc"> |
| 208 | |
| 209 | <p class="definition">Definition at line <a class="el" href="_broadcast_8hpp_source.html#l00020">20</a> of file <a class="el" href="_broadcast_8hpp_source.html">Broadcast.hpp</a>.</p> |
| 210 | |
| 211 | <p class="reference">Referenced by <a class="el" href="_broadcast_8cpp_source.html#l00011">BroadcastLoop::BroadcastLoop()</a>, and <a class="el" href="_broadcast_8hpp_source.html#l00026">BroadcastLoop::Unroll()</a>.</p> |
| 212 | <div class="fragment"><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  {</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(m_DimData.size());</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  }</div></div><!-- fragment --> |
| 213 | </div> |
| 214 | </div> |
| 215 | <a id="ae9f47e12d6c2265d33fed54e88cf179f"></a> |
| 216 | <h2 class="memtitle"><span class="permalink"><a href="#ae9f47e12d6c2265d33fed54e88cf179f">◆ </a></span>Unroll() <span class="overload">[1/2]</span></h2> |
| 217 | |
| 218 | <div class="memitem"> |
| 219 | <div class="memproto"> |
| 220 | <table class="mlabels"> |
| 221 | <tr> |
| 222 | <td class="mlabels-left"> |
| 223 | <table class="memname"> |
| 224 | <tr> |
| 225 | <td class="memname">void Unroll </td> |
| 226 | <td>(</td> |
| 227 | <td class="paramtype">Func </td> |
| 228 | <td class="paramname"><em>operationFunc</em>, </td> |
| 229 | </tr> |
| 230 | <tr> |
| 231 | <td class="paramkey"></td> |
| 232 | <td></td> |
| 233 | <td class="paramtype">unsigned int </td> |
| 234 | <td class="paramname"><em>dimension</em>, </td> |
| 235 | </tr> |
| 236 | <tr> |
| 237 | <td class="paramkey"></td> |
| 238 | <td></td> |
| 239 | <td class="paramtype">DecoderOp & </td> |
| 240 | <td class="paramname"><em>inData0</em>, </td> |
| 241 | </tr> |
| 242 | <tr> |
| 243 | <td class="paramkey"></td> |
| 244 | <td></td> |
| 245 | <td class="paramtype">DecoderOp & </td> |
| 246 | <td class="paramname"><em>inData1</em>, </td> |
| 247 | </tr> |
| 248 | <tr> |
| 249 | <td class="paramkey"></td> |
| 250 | <td></td> |
| 251 | <td class="paramtype">EncoderOp & </td> |
| 252 | <td class="paramname"><em>outData</em> </td> |
| 253 | </tr> |
| 254 | <tr> |
| 255 | <td></td> |
| 256 | <td>)</td> |
| 257 | <td></td><td></td> |
| 258 | </tr> |
| 259 | </table> |
| 260 | </td> |
| 261 | <td class="mlabels-right"> |
| 262 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 263 | </tr> |
| 264 | </table> |
| 265 | </div><div class="memdoc"> |
| 266 | |
| 267 | <p class="definition">Definition at line <a class="el" href="_broadcast_8hpp_source.html#l00026">26</a> of file <a class="el" href="_broadcast_8hpp_source.html">Broadcast.hpp</a>.</p> |
| 268 | |
| 269 | <p class="reference">References <a class="el" href="_broadcast_8hpp_source.html#l00020">BroadcastLoop::GetNumDimensions()</a>.</p> |
| 270 | |
| 271 | <p class="reference">Referenced by <a class="el" href="_elementwise_function_8cpp_source.html#l00021">ElementwiseBinaryFunction< Functor >::ElementwiseBinaryFunction()</a>, <a class="el" href="_elementwise_function_8cpp_source.html#l00032">ElementwiseUnaryFunction< Functor >::ElementwiseUnaryFunction()</a>, <a class="el" href="_prelu_impl_8cpp_source.html#l00013">armnn::PreluImpl()</a>, and <a class="el" href="_broadcast_8hpp_source.html#l00062">BroadcastLoop::Unroll()</a>.</p> |
| 272 | <div class="fragment"><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  {</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <span class="keywordflow">if</span> (dimension >= <a class="code" href="structarmnn_1_1_broadcast_loop.html#a0ed4f8b0f36ff2a60cbc4faf3be5d2f7">GetNumDimensions</a>())</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  {</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  outData.Set(operationFunc(inData0.Get(), inData1.Get()));</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  }</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inData0Movement = 0;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inData1Movement = 0;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outDataMovement = 0;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < m_DimData[dimension].m_DimSize; i++)</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  {</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <a class="code" href="structarmnn_1_1_broadcast_loop.html#ae9f47e12d6c2265d33fed54e88cf179f">Unroll</a>(operationFunc, dimension + 1, inData0, inData1, outData);</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  inData0 += m_DimData[dimension].m_Stride1;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  inData1 += m_DimData[dimension].m_Stride2;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  outData += m_DimData[dimension].m_StrideOut;</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>  inData0Movement += m_DimData[dimension].m_Stride1;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  inData1Movement += m_DimData[dimension].m_Stride2;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  outDataMovement += m_DimData[dimension].m_StrideOut;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  }</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="comment">// move iterator back to the start</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  inData0 -= inData0Movement;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  inData1 -= inData1Movement;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  outData -= outDataMovement;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  }</div><div class="ttc" id="structarmnn_1_1_broadcast_loop_html_ae9f47e12d6c2265d33fed54e88cf179f"><div class="ttname"><a href="structarmnn_1_1_broadcast_loop.html#ae9f47e12d6c2265d33fed54e88cf179f">armnn::BroadcastLoop::Unroll</a></div><div class="ttdeci">void Unroll(Func operationFunc, unsigned int dimension, DecoderOp &inData0, DecoderOp &inData1, EncoderOp &outData)</div><div class="ttdef"><b>Definition:</b> <a href="_broadcast_8hpp_source.html#l00026">Broadcast.hpp:26</a></div></div> |
| 273 | <div class="ttc" id="structarmnn_1_1_broadcast_loop_html_a0ed4f8b0f36ff2a60cbc4faf3be5d2f7"><div class="ttname"><a href="structarmnn_1_1_broadcast_loop.html#a0ed4f8b0f36ff2a60cbc4faf3be5d2f7">armnn::BroadcastLoop::GetNumDimensions</a></div><div class="ttdeci">unsigned int GetNumDimensions()</div><div class="ttdef"><b>Definition:</b> <a href="_broadcast_8hpp_source.html#l00020">Broadcast.hpp:20</a></div></div> |
| 274 | </div><!-- fragment --> |
| 275 | </div> |
| 276 | </div> |
| 277 | <a id="a1b3b461824ae2769251ad66a09da5b52"></a> |
| 278 | <h2 class="memtitle"><span class="permalink"><a href="#a1b3b461824ae2769251ad66a09da5b52">◆ </a></span>Unroll() <span class="overload">[2/2]</span></h2> |
| 279 | |
| 280 | <div class="memitem"> |
| 281 | <div class="memproto"> |
| 282 | <table class="mlabels"> |
| 283 | <tr> |
| 284 | <td class="mlabels-left"> |
| 285 | <table class="memname"> |
| 286 | <tr> |
| 287 | <td class="memname">void Unroll </td> |
| 288 | <td>(</td> |
| 289 | <td class="paramtype">Func </td> |
| 290 | <td class="paramname"><em>operationFunc</em>, </td> |
| 291 | </tr> |
| 292 | <tr> |
| 293 | <td class="paramkey"></td> |
| 294 | <td></td> |
| 295 | <td class="paramtype">unsigned int </td> |
| 296 | <td class="paramname"><em>dimension</em>, </td> |
| 297 | </tr> |
| 298 | <tr> |
| 299 | <td class="paramkey"></td> |
| 300 | <td></td> |
| 301 | <td class="paramtype">DecoderOp & </td> |
| 302 | <td class="paramname"><em>inData</em>, </td> |
| 303 | </tr> |
| 304 | <tr> |
| 305 | <td class="paramkey"></td> |
| 306 | <td></td> |
| 307 | <td class="paramtype">EncoderOp & </td> |
| 308 | <td class="paramname"><em>outData</em> </td> |
| 309 | </tr> |
| 310 | <tr> |
| 311 | <td></td> |
| 312 | <td>)</td> |
| 313 | <td></td><td></td> |
| 314 | </tr> |
| 315 | </table> |
| 316 | </td> |
| 317 | <td class="mlabels-right"> |
| 318 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 319 | </tr> |
| 320 | </table> |
| 321 | </div><div class="memdoc"> |
| 322 | |
| 323 | <p class="definition">Definition at line <a class="el" href="_broadcast_8hpp_source.html#l00062">62</a> of file <a class="el" href="_broadcast_8hpp_source.html">Broadcast.hpp</a>.</p> |
| 324 | |
| 325 | <p class="reference">References <a class="el" href="_broadcast_8hpp_source.html#l00020">BroadcastLoop::GetNumDimensions()</a>, and <a class="el" href="_broadcast_8hpp_source.html#l00026">BroadcastLoop::Unroll()</a>.</p> |
| 326 | <div class="fragment"><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  {</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">if</span> (dimension >= <a class="code" href="structarmnn_1_1_broadcast_loop.html#a0ed4f8b0f36ff2a60cbc4faf3be5d2f7">GetNumDimensions</a>())</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  {</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  outData.Set(operationFunc(inData.Get()));</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  }</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="keywordtype">unsigned</span> <span class="keywordtype">int</span> inDataMovement = 0;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outDataMovement = 0;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < m_DimData[dimension].m_DimSize; i++)</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  {</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <a class="code" href="structarmnn_1_1_broadcast_loop.html#ae9f47e12d6c2265d33fed54e88cf179f">Unroll</a>(operationFunc, dimension + 1, inData, outData);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  inData += m_DimData[dimension].m_Stride1;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  outData += m_DimData[dimension].m_StrideOut;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  inDataMovement += m_DimData[dimension].m_Stride1;</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  outDataMovement += m_DimData[dimension].m_StrideOut;</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> </div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="comment">// move iterator back to the start</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  inData -= inDataMovement;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  outData -= outDataMovement;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  }</div><div class="ttc" id="structarmnn_1_1_broadcast_loop_html_ae9f47e12d6c2265d33fed54e88cf179f"><div class="ttname"><a href="structarmnn_1_1_broadcast_loop.html#ae9f47e12d6c2265d33fed54e88cf179f">armnn::BroadcastLoop::Unroll</a></div><div class="ttdeci">void Unroll(Func operationFunc, unsigned int dimension, DecoderOp &inData0, DecoderOp &inData1, EncoderOp &outData)</div><div class="ttdef"><b>Definition:</b> <a href="_broadcast_8hpp_source.html#l00026">Broadcast.hpp:26</a></div></div> |
| 327 | <div class="ttc" id="structarmnn_1_1_broadcast_loop_html_a0ed4f8b0f36ff2a60cbc4faf3be5d2f7"><div class="ttname"><a href="structarmnn_1_1_broadcast_loop.html#a0ed4f8b0f36ff2a60cbc4faf3be5d2f7">armnn::BroadcastLoop::GetNumDimensions</a></div><div class="ttdeci">unsigned int GetNumDimensions()</div><div class="ttdef"><b>Definition:</b> <a href="_broadcast_8hpp_source.html#l00020">Broadcast.hpp:20</a></div></div> |
| 328 | </div><!-- fragment --> |
| 329 | </div> |
| 330 | </div> |
| 331 | <hr/>The documentation for this struct was generated from the following files:<ul> |
| 332 | <li>src/backends/reference/workloads/<a class="el" href="_broadcast_8hpp_source.html">Broadcast.hpp</a></li> |
| 333 | <li>src/backends/reference/workloads/<a class="el" href="_broadcast_8cpp_source.html">Broadcast.cpp</a></li> |
| 334 | </ul> |
| 335 | </div><!-- contents --> |
| 336 | </div><!-- doc-content --> |
| 337 | <!-- start footer part --> |
| 338 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 339 | <ul> |
| 340 | <li class="navelem"><a class="el" href="namespacearmnn.html">armnn</a></li><li class="navelem"><a class="el" href="structarmnn_1_1_broadcast_loop.html">BroadcastLoop</a></li> |
| 341 | <li class="footer">Generated on Fri Mar 13 2020 16:07:02 for ArmNN by |
| 342 | <a href="http://www.doxygen.org/index.html"> |
| 343 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 344 | </ul> |
| 345 | </div> |
| 346 | </body> |
| 347 | </html> |