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/backends/reference/workloads/LstmUtils.hpp File 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('_lstm_utils_8hpp.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="#func-members">Functions</a> </div> |
| 85 | <div class="headertitle"> |
| 86 | <div class="title">LstmUtils.hpp File Reference</div> </div> |
| 87 | </div><!--header--> |
| 88 | <div class="contents"> |
| 89 | <div class="textblock"><code>#include "<a class="el" href="_base_iterator_8hpp_source.html">BaseIterator.hpp</a>"</code><br /> |
| 90 | <code>#include <<a class="el" href="_cpu_tensor_handle_8hpp_source.html">backendsCommon/CpuTensorHandle.hpp</a>></code><br /> |
| 91 | </div> |
| 92 | <p><a href="_lstm_utils_8hpp_source.html">Go to the source code of this file.</a></p> |
| 93 | <table class="memberdecls"> |
| 94 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 95 | Functions</h2></td></tr> |
| 96 | <tr class="memitem:a389c4bbafd0fff7060cbb183f20a2134"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#a389c4bbafd0fff7060cbb183f20a2134">VectorBatchVectorAdd</a> (<a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &vector, uint32_t vSize, <a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &batchVector, uint32_t nBatch, <a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > &outResult)</td></tr> |
| 97 | <tr class="separator:a389c4bbafd0fff7060cbb183f20a2134"><td class="memSeparator" colspan="2"> </td></tr> |
| 98 | <tr class="memitem:a0ed27dd6d6125a06bf654080f4184360"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#a0ed27dd6d6125a06bf654080f4184360">MeanStddevNormalization</a> (<a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &input_vector, <a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > &output_vector, uint32_t v_size, uint32_t n_batch, float normalization_epsilon)</td></tr> |
| 99 | <tr class="separator:a0ed27dd6d6125a06bf654080f4184360"><td class="memSeparator" colspan="2"> </td></tr> |
| 100 | <tr class="memitem:a4c20bc573b70e89327b334f924da97b5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#a4c20bc573b70e89327b334f924da97b5">ZeroVector</a> (<a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > &vector, uint32_t vSize)</td></tr> |
| 101 | <tr class="separator:a4c20bc573b70e89327b334f924da97b5"><td class="memSeparator" colspan="2"> </td></tr> |
| 102 | <tr class="memitem:ab93a2c78551c3d3aba8ddcafb792a36d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#ab93a2c78551c3d3aba8ddcafb792a36d">MatrixBatchVectorMultiplyAccumulate</a> (<a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &matrix, uint32_t mRows, uint32_t mCols, <a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &vector, uint32_t nBatch, <a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > &outResult)</td></tr> |
| 103 | <tr class="separator:ab93a2c78551c3d3aba8ddcafb792a36d"><td class="memSeparator" colspan="2"> </td></tr> |
| 104 | <tr class="memitem:a8c4a96233c9b62c76d611316da11124b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#a8c4a96233c9b62c76d611316da11124b">VectorBatchVectorAssign</a> (<a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &vector, uint32_t vSize, uint32_t nBatch, <a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > &outBatchVector)</td></tr> |
| 105 | <tr class="separator:a8c4a96233c9b62c76d611316da11124b"><td class="memSeparator" colspan="2"> </td></tr> |
| 106 | <tr class="memitem:a796323e16216b880043dc5ebbaa2372b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#a796323e16216b880043dc5ebbaa2372b">VectorBatchVectorCwiseProductAccumulate</a> (<a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &vector, uint32_t vSize, <a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &batchVector, uint32_t nBatch, <a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > &outResult)</td></tr> |
| 107 | <tr class="separator:a796323e16216b880043dc5ebbaa2372b"><td class="memSeparator" colspan="2"> </td></tr> |
| 108 | <tr class="memitem:a1d7ad9698b02282a57fdb17b3af745f9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#a1d7ad9698b02282a57fdb17b3af745f9">VectorBatchVectorCwiseProduct</a> (<a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &vector, uint32_t vSize, <a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &batchVector, uint32_t nBatch, <a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > &outResult)</td></tr> |
| 109 | <tr class="separator:a1d7ad9698b02282a57fdb17b3af745f9"><td class="memSeparator" colspan="2"> </td></tr> |
| 110 | <tr class="memitem:aca7bd1dff180b6a5de894537f8220793"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#aca7bd1dff180b6a5de894537f8220793">Sub1Vector</a> (<a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &vector, uint32_t vSize, <a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > &result)</td></tr> |
| 111 | <tr class="separator:aca7bd1dff180b6a5de894537f8220793"><td class="memSeparator" colspan="2"> </td></tr> |
| 112 | <tr class="memitem:a5b81dc0a1a9a2bccab8bb79dfa3e77b7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#a5b81dc0a1a9a2bccab8bb79dfa3e77b7">VectorVectorCwiseProduct</a> (<a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &vector1, <a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &vector2, uint32_t vSize, <a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > &outResult)</td></tr> |
| 113 | <tr class="separator:a5b81dc0a1a9a2bccab8bb79dfa3e77b7"><td class="memSeparator" colspan="2"> </td></tr> |
| 114 | <tr class="memitem:a2e653f948d93f4177f267a7b1b4ed47d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#a2e653f948d93f4177f267a7b1b4ed47d">VectorVectorCwiseProductAccumulate</a> (<a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &vector1, <a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &vector2, uint32_t vSize, <a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > &outResult)</td></tr> |
| 115 | <tr class="separator:a2e653f948d93f4177f267a7b1b4ed47d"><td class="memSeparator" colspan="2"> </td></tr> |
| 116 | <tr class="memitem:ad5b8e4843a3b303d5b56c0a70dbfd1bf"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#ad5b8e4843a3b303d5b56c0a70dbfd1bf">Clip</a> (float f, float absLimit)</td></tr> |
| 117 | <tr class="separator:ad5b8e4843a3b303d5b56c0a70dbfd1bf"><td class="memSeparator" colspan="2"> </td></tr> |
| 118 | <tr class="memitem:a117781e8e9b7321722bbdd8ff74b484a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#a117781e8e9b7321722bbdd8ff74b484a">ClipVector</a> (<a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &vector, uint32_t vSize, float absLimit, <a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > &outResult)</td></tr> |
| 119 | <tr class="separator:a117781e8e9b7321722bbdd8ff74b484a"><td class="memSeparator" colspan="2"> </td></tr> |
| 120 | <tr class="memitem:a00d8a623c04f1120f6fee3fe38d1cee9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#a00d8a623c04f1120f6fee3fe38d1cee9">CopyVector</a> (<a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > &vector, uint32_t vSize, <a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > &outResult)</td></tr> |
| 121 | <tr class="separator:a00d8a623c04f1120f6fee3fe38d1cee9"><td class="memSeparator" colspan="2"> </td></tr> |
| 122 | <tr class="memitem:afc83b9418e9721cee21de245cb8533de"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#afc83b9418e9721cee21de245cb8533de">SetActivationParameters</a> (uint32_t activation, <a class="el" href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9ea">armnn::ActivationFunction</a> &outArmnnActivation, float &outA, float &outB)</td></tr> |
| 123 | <tr class="separator:afc83b9418e9721cee21de245cb8533de"><td class="memSeparator" colspan="2"> </td></tr> |
| 124 | <tr class="memitem:a1aef5d233d1f569f34d6c36bdf5ae9e5"><td class="memItemLeft" align="right" valign="top">std::unique_ptr< <a class="el" href="classarmnn_1_1_scoped_cpu_tensor_handle.html">armnn::ScopedCpuTensorHandle</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="_lstm_utils_8hpp.html#a1aef5d233d1f569f34d6c36bdf5ae9e5">AssignScopedCpuTensorHandle</a> (const <a class="el" href="classarmnn_1_1_const_cpu_tensor_handle.html">armnn::ConstCpuTensorHandle</a> *ptr)</td></tr> |
| 125 | <tr class="separator:a1aef5d233d1f569f34d6c36bdf5ae9e5"><td class="memSeparator" colspan="2"> </td></tr> |
| 126 | </table> |
| 127 | <h2 class="groupheader">Function Documentation</h2> |
| 128 | <a id="a1aef5d233d1f569f34d6c36bdf5ae9e5"></a> |
| 129 | <h2 class="memtitle"><span class="permalink"><a href="#a1aef5d233d1f569f34d6c36bdf5ae9e5">◆ </a></span>AssignScopedCpuTensorHandle()</h2> |
| 130 | |
| 131 | <div class="memitem"> |
| 132 | <div class="memproto"> |
| 133 | <table class="memname"> |
| 134 | <tr> |
| 135 | <td class="memname">std::unique_ptr<<a class="el" href="classarmnn_1_1_scoped_cpu_tensor_handle.html">armnn::ScopedCpuTensorHandle</a>> AssignScopedCpuTensorHandle </td> |
| 136 | <td>(</td> |
| 137 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_const_cpu_tensor_handle.html">armnn::ConstCpuTensorHandle</a> * </td> |
| 138 | <td class="paramname"><em>ptr</em></td><td>)</td> |
| 139 | <td></td> |
| 140 | </tr> |
| 141 | </table> |
| 142 | </div><div class="memdoc"> |
| 143 | |
| 144 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00299">299</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 145 | <div class="fragment"><div class="line"><a name="l00300"></a><span class="lineno"> 300</span> {</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="keywordflow">if</span> (!ptr)</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="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  }</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="keywordflow">return</span> std::make_unique<armnn::ScopedCpuTensorHandle>(*ptr);</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span> }</div></div><!-- fragment --> |
| 146 | </div> |
| 147 | </div> |
| 148 | <a id="ad5b8e4843a3b303d5b56c0a70dbfd1bf"></a> |
| 149 | <h2 class="memtitle"><span class="permalink"><a href="#ad5b8e4843a3b303d5b56c0a70dbfd1bf">◆ </a></span>Clip()</h2> |
| 150 | |
| 151 | <div class="memitem"> |
| 152 | <div class="memproto"> |
| 153 | <table class="memname"> |
| 154 | <tr> |
| 155 | <td class="memname">float Clip </td> |
| 156 | <td>(</td> |
| 157 | <td class="paramtype">float </td> |
| 158 | <td class="paramname"><em>f</em>, </td> |
| 159 | </tr> |
| 160 | <tr> |
| 161 | <td class="paramkey"></td> |
| 162 | <td></td> |
| 163 | <td class="paramtype">float </td> |
| 164 | <td class="paramname"><em>absLimit</em> </td> |
| 165 | </tr> |
| 166 | <tr> |
| 167 | <td></td> |
| 168 | <td>)</td> |
| 169 | <td></td><td></td> |
| 170 | </tr> |
| 171 | </table> |
| 172 | </div><div class="memdoc"> |
| 173 | |
| 174 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00221">221</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 175 | |
| 176 | <p class="reference">Referenced by <a class="el" href="_lstm_utils_8cpp_source.html#l00229">ClipVector()</a>.</p> |
| 177 | <div class="fragment"><div class="line"><a name="l00223"></a><span class="lineno"> 223</span> {</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="keywordtype">float</span> result = (absLimit < f) ? absLimit : f;</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  result = (-absLimit > result) ? -absLimit : result;</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span> }</div></div><!-- fragment --> |
| 178 | </div> |
| 179 | </div> |
| 180 | <a id="a117781e8e9b7321722bbdd8ff74b484a"></a> |
| 181 | <h2 class="memtitle"><span class="permalink"><a href="#a117781e8e9b7321722bbdd8ff74b484a">◆ </a></span>ClipVector()</h2> |
| 182 | |
| 183 | <div class="memitem"> |
| 184 | <div class="memproto"> |
| 185 | <table class="memname"> |
| 186 | <tr> |
| 187 | <td class="memname">void ClipVector </td> |
| 188 | <td>(</td> |
| 189 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 190 | <td class="paramname"><em>vector</em>, </td> |
| 191 | </tr> |
| 192 | <tr> |
| 193 | <td class="paramkey"></td> |
| 194 | <td></td> |
| 195 | <td class="paramtype">uint32_t </td> |
| 196 | <td class="paramname"><em>vSize</em>, </td> |
| 197 | </tr> |
| 198 | <tr> |
| 199 | <td class="paramkey"></td> |
| 200 | <td></td> |
| 201 | <td class="paramtype">float </td> |
| 202 | <td class="paramname"><em>absLimit</em>, </td> |
| 203 | </tr> |
| 204 | <tr> |
| 205 | <td class="paramkey"></td> |
| 206 | <td></td> |
| 207 | <td class="paramtype"><a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > & </td> |
| 208 | <td class="paramname"><em>outResult</em> </td> |
| 209 | </tr> |
| 210 | <tr> |
| 211 | <td></td> |
| 212 | <td>)</td> |
| 213 | <td></td><td></td> |
| 214 | </tr> |
| 215 | </table> |
| 216 | </div><div class="memdoc"> |
| 217 | |
| 218 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00229">229</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 219 | |
| 220 | <p class="reference">References <a class="el" href="_lstm_utils_8cpp_source.html#l00221">Clip()</a>, <a class="el" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Decoder< IType >::Get()</a>, and <a class="el" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Encoder< IType >::Set()</a>.</p> |
| 221 | |
| 222 | <p class="reference">Referenced by <a class="el" href="_ref_lstm_workload_8cpp_source.html#l00041">RefLstmWorkload::Execute()</a>.</p> |
| 223 | <div class="fragment"><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>  <span class="keywordflow">for</span> (uint32_t v = 0; v < vSize; v++)</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>  outResult.<a class="code" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Set</a>(<a class="code" href="_lstm_utils_8cpp.html#ad5b8e4843a3b303d5b56c0a70dbfd1bf">Clip</a>(vector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>(), absLimit));</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  ++vector;</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  ++outResult;</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  }</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  vector -= vSize;</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  outResult -= vSize;</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span> }</div><div class="ttc" id="_lstm_utils_8cpp_html_ad5b8e4843a3b303d5b56c0a70dbfd1bf"><div class="ttname"><a href="_lstm_utils_8cpp.html#ad5b8e4843a3b303d5b56c0a70dbfd1bf">Clip</a></div><div class="ttdeci">float Clip(float f, float absLimit)</div><div class="ttdef"><b>Definition:</b> <a href="_lstm_utils_8cpp_source.html#l00221">LstmUtils.cpp:221</a></div></div> |
| 224 | <div class="ttc" id="classarmnn_1_1_decoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">armnn::Decoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 225 | <div class="ttc" id="classarmnn_1_1_encoder_html_ae3b62b846a9c239f332830b9e36030eb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">armnn::Encoder::Set</a></div><div class="ttdeci">virtual void Set(IType right)=0</div></div> |
| 226 | </div><!-- fragment --> |
| 227 | </div> |
| 228 | </div> |
| 229 | <a id="a00d8a623c04f1120f6fee3fe38d1cee9"></a> |
| 230 | <h2 class="memtitle"><span class="permalink"><a href="#a00d8a623c04f1120f6fee3fe38d1cee9">◆ </a></span>CopyVector()</h2> |
| 231 | |
| 232 | <div class="memitem"> |
| 233 | <div class="memproto"> |
| 234 | <table class="memname"> |
| 235 | <tr> |
| 236 | <td class="memname">void CopyVector </td> |
| 237 | <td>(</td> |
| 238 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 239 | <td class="paramname"><em>vector</em>, </td> |
| 240 | </tr> |
| 241 | <tr> |
| 242 | <td class="paramkey"></td> |
| 243 | <td></td> |
| 244 | <td class="paramtype">uint32_t </td> |
| 245 | <td class="paramname"><em>vSize</em>, </td> |
| 246 | </tr> |
| 247 | <tr> |
| 248 | <td class="paramkey"></td> |
| 249 | <td></td> |
| 250 | <td class="paramtype"><a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > & </td> |
| 251 | <td class="paramname"><em>outResult</em> </td> |
| 252 | </tr> |
| 253 | <tr> |
| 254 | <td></td> |
| 255 | <td>)</td> |
| 256 | <td></td><td></td> |
| 257 | </tr> |
| 258 | </table> |
| 259 | </div><div class="memdoc"> |
| 260 | |
| 261 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00244">244</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 262 | |
| 263 | <p class="reference">References <a class="el" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Decoder< IType >::Get()</a>, and <a class="el" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Encoder< IType >::Set()</a>.</p> |
| 264 | |
| 265 | <p class="reference">Referenced by <a class="el" href="_ref_lstm_workload_8cpp_source.html#l00041">RefLstmWorkload::Execute()</a>.</p> |
| 266 | <div class="fragment"><div class="line"><a name="l00247"></a><span class="lineno"> 247</span> {</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <span class="keywordflow">for</span> (uint32_t v = 0; v < vSize; v++)</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>  outResult.<a class="code" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Set</a>(vector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>());</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  ++outResult;</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  ++vector;</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  }</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  outResult -= vSize;</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  vector -= vSize;</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span> }</div><div class="ttc" id="classarmnn_1_1_decoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">armnn::Decoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 267 | <div class="ttc" id="classarmnn_1_1_encoder_html_ae3b62b846a9c239f332830b9e36030eb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">armnn::Encoder::Set</a></div><div class="ttdeci">virtual void Set(IType right)=0</div></div> |
| 268 | </div><!-- fragment --> |
| 269 | </div> |
| 270 | </div> |
| 271 | <a id="ab93a2c78551c3d3aba8ddcafb792a36d"></a> |
| 272 | <h2 class="memtitle"><span class="permalink"><a href="#ab93a2c78551c3d3aba8ddcafb792a36d">◆ </a></span>MatrixBatchVectorMultiplyAccumulate()</h2> |
| 273 | |
| 274 | <div class="memitem"> |
| 275 | <div class="memproto"> |
| 276 | <table class="memname"> |
| 277 | <tr> |
| 278 | <td class="memname">void MatrixBatchVectorMultiplyAccumulate </td> |
| 279 | <td>(</td> |
| 280 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 281 | <td class="paramname"><em>matrix</em>, </td> |
| 282 | </tr> |
| 283 | <tr> |
| 284 | <td class="paramkey"></td> |
| 285 | <td></td> |
| 286 | <td class="paramtype">uint32_t </td> |
| 287 | <td class="paramname"><em>mRows</em>, </td> |
| 288 | </tr> |
| 289 | <tr> |
| 290 | <td class="paramkey"></td> |
| 291 | <td></td> |
| 292 | <td class="paramtype">uint32_t </td> |
| 293 | <td class="paramname"><em>mCols</em>, </td> |
| 294 | </tr> |
| 295 | <tr> |
| 296 | <td class="paramkey"></td> |
| 297 | <td></td> |
| 298 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 299 | <td class="paramname"><em>vector</em>, </td> |
| 300 | </tr> |
| 301 | <tr> |
| 302 | <td class="paramkey"></td> |
| 303 | <td></td> |
| 304 | <td class="paramtype">uint32_t </td> |
| 305 | <td class="paramname"><em>nBatch</em>, </td> |
| 306 | </tr> |
| 307 | <tr> |
| 308 | <td class="paramkey"></td> |
| 309 | <td></td> |
| 310 | <td class="paramtype"><a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > & </td> |
| 311 | <td class="paramname"><em>outResult</em> </td> |
| 312 | </tr> |
| 313 | <tr> |
| 314 | <td></td> |
| 315 | <td>)</td> |
| 316 | <td></td><td></td> |
| 317 | </tr> |
| 318 | </table> |
| 319 | </div><div class="memdoc"> |
| 320 | |
| 321 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00087">87</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 322 | |
| 323 | <p class="reference">References <a class="el" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Decoder< IType >::Get()</a>, <a class="el" href="classarmnn_1_1_encoder.html#ac729108381e2340bea12877971713ecb">Encoder< IType >::Get()</a>, and <a class="el" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Encoder< IType >::Set()</a>.</p> |
| 324 | |
| 325 | <p class="reference">Referenced by <a class="el" href="_ref_lstm_workload_8cpp_source.html#l00041">RefLstmWorkload::Execute()</a>.</p> |
| 326 | <div class="fragment"><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> {</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordflow">for</span> (uint32_t b = 0; b < nBatch; b++)</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  {</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordflow">for</span> (uint32_t r = 0; r < mRows; r++)</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  {</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  vector += b * mCols;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keywordflow">for</span> (uint32_t c = 0; c < mCols; c++)</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>  outResult.<a class="code" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Set</a>(outResult.<a class="code" href="classarmnn_1_1_encoder.html#ac729108381e2340bea12877971713ecb">Get</a>() + matrix.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>() * vector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>());</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  ++matrix;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  ++vector;</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>  outResult += 1;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  vector -= (b+1) * mCols;</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  }</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  matrix -= (mRows * mCols);</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  }</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  outResult -= (mRows * nBatch);</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> }</div><div class="ttc" id="classarmnn_1_1_decoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">armnn::Decoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 327 | <div class="ttc" id="classarmnn_1_1_encoder_html_ae3b62b846a9c239f332830b9e36030eb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">armnn::Encoder::Set</a></div><div class="ttdeci">virtual void Set(IType right)=0</div></div> |
| 328 | <div class="ttc" id="classarmnn_1_1_encoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ac729108381e2340bea12877971713ecb">armnn::Encoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 329 | </div><!-- fragment --> |
| 330 | </div> |
| 331 | </div> |
| 332 | <a id="a0ed27dd6d6125a06bf654080f4184360"></a> |
| 333 | <h2 class="memtitle"><span class="permalink"><a href="#a0ed27dd6d6125a06bf654080f4184360">◆ </a></span>MeanStddevNormalization()</h2> |
| 334 | |
| 335 | <div class="memitem"> |
| 336 | <div class="memproto"> |
| 337 | <table class="memname"> |
| 338 | <tr> |
| 339 | <td class="memname">void MeanStddevNormalization </td> |
| 340 | <td>(</td> |
| 341 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 342 | <td class="paramname"><em>input_vector</em>, </td> |
| 343 | </tr> |
| 344 | <tr> |
| 345 | <td class="paramkey"></td> |
| 346 | <td></td> |
| 347 | <td class="paramtype"><a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > & </td> |
| 348 | <td class="paramname"><em>output_vector</em>, </td> |
| 349 | </tr> |
| 350 | <tr> |
| 351 | <td class="paramkey"></td> |
| 352 | <td></td> |
| 353 | <td class="paramtype">uint32_t </td> |
| 354 | <td class="paramname"><em>v_size</em>, </td> |
| 355 | </tr> |
| 356 | <tr> |
| 357 | <td class="paramkey"></td> |
| 358 | <td></td> |
| 359 | <td class="paramtype">uint32_t </td> |
| 360 | <td class="paramname"><em>n_batch</em>, </td> |
| 361 | </tr> |
| 362 | <tr> |
| 363 | <td class="paramkey"></td> |
| 364 | <td></td> |
| 365 | <td class="paramtype">float </td> |
| 366 | <td class="paramname"><em>normalization_epsilon</em> </td> |
| 367 | </tr> |
| 368 | <tr> |
| 369 | <td></td> |
| 370 | <td>)</td> |
| 371 | <td></td><td></td> |
| 372 | </tr> |
| 373 | </table> |
| 374 | </div><div class="memdoc"> |
| 375 | |
| 376 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00040">40</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 377 | |
| 378 | <p class="reference">References <a class="el" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Decoder< IType >::Get()</a>, and <a class="el" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Encoder< IType >::Set()</a>.</p> |
| 379 | |
| 380 | <p class="reference">Referenced by <a class="el" href="_ref_lstm_workload_8cpp_source.html#l00041">RefLstmWorkload::Execute()</a>.</p> |
| 381 | <div class="fragment"><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>  <span class="keywordflow">for</span> (uint32_t batch = 0; batch < n_batch; ++batch) {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordtype">float</span> sum = 0.0f;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keywordtype">float</span> sum_sq = 0.0f;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordflow">for</span> (uint32_t i = 0; i < v_size; ++i) {</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  sum += input_vector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>();</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  sum_sq += input_vector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>() * input_vector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>();</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  ++input_vector;</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>  input_vector -= v_size;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> mean = sum / <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(v_size);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordtype">float</span> stddev_inv = 0.0f;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> variance = sum_sq / <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(v_size) - mean * mean;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keywordflow">if</span> (variance == 0) {</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  stddev_inv = 1.0f / std::sqrt(normalization_epsilon);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  stddev_inv = 1.0f / std::sqrt(variance);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</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>  <span class="keywordflow">for</span> (uint32_t i = 0; i < v_size; ++i) {</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  output_vector.<a class="code" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Set</a>((input_vector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>() - mean) * stddev_inv);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  ++output_vector;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  ++input_vector;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  }</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="comment">// Don't reset iterator to handle next batch</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>  output_vector -= v_size * n_batch;</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  input_vector -= v_size * n_batch;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span> }</div><div class="ttc" id="classarmnn_1_1_decoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">armnn::Decoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 382 | <div class="ttc" id="classarmnn_1_1_encoder_html_ae3b62b846a9c239f332830b9e36030eb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">armnn::Encoder::Set</a></div><div class="ttdeci">virtual void Set(IType right)=0</div></div> |
| 383 | </div><!-- fragment --> |
| 384 | </div> |
| 385 | </div> |
| 386 | <a id="afc83b9418e9721cee21de245cb8533de"></a> |
| 387 | <h2 class="memtitle"><span class="permalink"><a href="#afc83b9418e9721cee21de245cb8533de">◆ </a></span>SetActivationParameters()</h2> |
| 388 | |
| 389 | <div class="memitem"> |
| 390 | <div class="memproto"> |
| 391 | <table class="memname"> |
| 392 | <tr> |
| 393 | <td class="memname">void SetActivationParameters </td> |
| 394 | <td>(</td> |
| 395 | <td class="paramtype">uint32_t </td> |
| 396 | <td class="paramname"><em>activation</em>, </td> |
| 397 | </tr> |
| 398 | <tr> |
| 399 | <td class="paramkey"></td> |
| 400 | <td></td> |
| 401 | <td class="paramtype"><a class="el" href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9ea">armnn::ActivationFunction</a> & </td> |
| 402 | <td class="paramname"><em>outArmnnActivation</em>, </td> |
| 403 | </tr> |
| 404 | <tr> |
| 405 | <td class="paramkey"></td> |
| 406 | <td></td> |
| 407 | <td class="paramtype">float & </td> |
| 408 | <td class="paramname"><em>outA</em>, </td> |
| 409 | </tr> |
| 410 | <tr> |
| 411 | <td class="paramkey"></td> |
| 412 | <td></td> |
| 413 | <td class="paramtype">float & </td> |
| 414 | <td class="paramname"><em>outB</em> </td> |
| 415 | </tr> |
| 416 | <tr> |
| 417 | <td></td> |
| 418 | <td>)</td> |
| 419 | <td></td><td></td> |
| 420 | </tr> |
| 421 | </table> |
| 422 | </div><div class="memdoc"> |
| 423 | |
| 424 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00258">258</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 425 | |
| 426 | <p class="reference">References <a class="el" href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9eaabc5a0f0d6e7cf7fca73299dcd46c0f0d">armnn::BoundedReLu</a>, <a class="el" href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9eaa3d90c0a5ab3fcf8e6f6608cb3d3a1559">armnn::ReLu</a>, <a class="el" href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9eaa21eebb164e4b8b9bcf64fdb4d8d5dff4">armnn::Sigmoid</a>, and <a class="el" href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9eaa23b68da1de2b77d74da9da2635722a3e">armnn::TanH</a>.</p> |
| 427 | |
| 428 | <p class="reference">Referenced by <a class="el" href="_ref_lstm_workload_8cpp_source.html#l00041">RefLstmWorkload::Execute()</a>.</p> |
| 429 | <div class="fragment"><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>  <span class="keywordflow">switch</span> (activation)</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">case</span> 0: <span class="comment">// None</span></div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  outA = 0;</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  outB = 0;</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span> </div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="keywordflow">case</span> 1: <span class="comment">// Relu</span></div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  outArmnnActivation = <a class="code" href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9eaa3d90c0a5ab3fcf8e6f6608cb3d3a1559">armnn::ActivationFunction::ReLu</a>;</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  outA = 0;</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  outB = 0;</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="keywordflow">return</span>;</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>  <span class="keywordflow">case</span> 3: <span class="comment">// Relu6</span></div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  outArmnnActivation = <a class="code" href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9eaabc5a0f0d6e7cf7fca73299dcd46c0f0d">armnn::ActivationFunction::BoundedReLu</a>;</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  outA = 6;</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  outB = 0;</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span> </div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="keywordflow">case</span> 4: <span class="comment">// Tanh</span></div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  outArmnnActivation = <a class="code" href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9eaa23b68da1de2b77d74da9da2635722a3e">armnn::ActivationFunction::TanH</a>;</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  outA = 1;</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  outB = 1;</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <span class="keywordflow">return</span>;</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">case</span> 6: <span class="comment">// Sigmoid</span></div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  outArmnnActivation = <a class="code" href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9eaa21eebb164e4b8b9bcf64fdb4d8d5dff4">armnn::ActivationFunction::Sigmoid</a>;</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  outA = 0;</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  outB = 0;</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span> </div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_exception.html">armnn::Exception</a>(<span class="stringliteral">"Unsupported activation function: "</span> + std::to_string(activation));</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="ttc" id="namespacearmnn_html_a56297e0f7b215eea46c818cb7528d9eaa3d90c0a5ab3fcf8e6f6608cb3d3a1559"><div class="ttname"><a href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9eaa3d90c0a5ab3fcf8e6f6608cb3d3a1559">armnn::ActivationFunction::ReLu</a></div></div> |
| 430 | <div class="ttc" id="namespacearmnn_html_a56297e0f7b215eea46c818cb7528d9eaa21eebb164e4b8b9bcf64fdb4d8d5dff4"><div class="ttname"><a href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9eaa21eebb164e4b8b9bcf64fdb4d8d5dff4">armnn::ActivationFunction::Sigmoid</a></div></div> |
| 431 | <div class="ttc" id="classarmnn_1_1_exception_html"><div class="ttname"><a href="classarmnn_1_1_exception.html">armnn::Exception</a></div><div class="ttdoc">Base class for all ArmNN exceptions so that users can filter to just those. </div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00046">Exceptions.hpp:46</a></div></div> |
| 432 | <div class="ttc" id="namespacearmnn_html_a56297e0f7b215eea46c818cb7528d9eaabc5a0f0d6e7cf7fca73299dcd46c0f0d"><div class="ttname"><a href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9eaabc5a0f0d6e7cf7fca73299dcd46c0f0d">armnn::ActivationFunction::BoundedReLu</a></div><div class="ttdoc">min(a, max(b, input)) </div></div> |
| 433 | <div class="ttc" id="namespacearmnn_html_a56297e0f7b215eea46c818cb7528d9eaa23b68da1de2b77d74da9da2635722a3e"><div class="ttname"><a href="namespacearmnn.html#a56297e0f7b215eea46c818cb7528d9eaa23b68da1de2b77d74da9da2635722a3e">armnn::ActivationFunction::TanH</a></div></div> |
| 434 | </div><!-- fragment --> |
| 435 | </div> |
| 436 | </div> |
| 437 | <a id="aca7bd1dff180b6a5de894537f8220793"></a> |
| 438 | <h2 class="memtitle"><span class="permalink"><a href="#aca7bd1dff180b6a5de894537f8220793">◆ </a></span>Sub1Vector()</h2> |
| 439 | |
| 440 | <div class="memitem"> |
| 441 | <div class="memproto"> |
| 442 | <table class="memname"> |
| 443 | <tr> |
| 444 | <td class="memname">void Sub1Vector </td> |
| 445 | <td>(</td> |
| 446 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 447 | <td class="paramname"><em>vector</em>, </td> |
| 448 | </tr> |
| 449 | <tr> |
| 450 | <td class="paramkey"></td> |
| 451 | <td></td> |
| 452 | <td class="paramtype">uint32_t </td> |
| 453 | <td class="paramname"><em>vSize</em>, </td> |
| 454 | </tr> |
| 455 | <tr> |
| 456 | <td class="paramkey"></td> |
| 457 | <td></td> |
| 458 | <td class="paramtype"><a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > & </td> |
| 459 | <td class="paramname"><em>result</em> </td> |
| 460 | </tr> |
| 461 | <tr> |
| 462 | <td></td> |
| 463 | <td>)</td> |
| 464 | <td></td><td></td> |
| 465 | </tr> |
| 466 | </table> |
| 467 | </div><div class="memdoc"> |
| 468 | |
| 469 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00173">173</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 470 | |
| 471 | <p class="reference">References <a class="el" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Decoder< IType >::Get()</a>, and <a class="el" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Encoder< IType >::Set()</a>.</p> |
| 472 | |
| 473 | <p class="reference">Referenced by <a class="el" href="_ref_lstm_workload_8cpp_source.html#l00041">RefLstmWorkload::Execute()</a>.</p> |
| 474 | <div class="fragment"><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> {</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordflow">for</span> (uint32_t v = 0; v < vSize; v++)</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  {</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  result.<a class="code" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Set</a>(1.0f - vector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>());</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  ++vector;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  ++result;</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  }</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  vector -= vSize;</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  result -= vSize;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span> }</div><div class="ttc" id="classarmnn_1_1_decoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">armnn::Decoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 475 | <div class="ttc" id="classarmnn_1_1_encoder_html_ae3b62b846a9c239f332830b9e36030eb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">armnn::Encoder::Set</a></div><div class="ttdeci">virtual void Set(IType right)=0</div></div> |
| 476 | </div><!-- fragment --> |
| 477 | </div> |
| 478 | </div> |
| 479 | <a id="a389c4bbafd0fff7060cbb183f20a2134"></a> |
| 480 | <h2 class="memtitle"><span class="permalink"><a href="#a389c4bbafd0fff7060cbb183f20a2134">◆ </a></span>VectorBatchVectorAdd()</h2> |
| 481 | |
| 482 | <div class="memitem"> |
| 483 | <div class="memproto"> |
| 484 | <table class="memname"> |
| 485 | <tr> |
| 486 | <td class="memname">void VectorBatchVectorAdd </td> |
| 487 | <td>(</td> |
| 488 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 489 | <td class="paramname"><em>vector</em>, </td> |
| 490 | </tr> |
| 491 | <tr> |
| 492 | <td class="paramkey"></td> |
| 493 | <td></td> |
| 494 | <td class="paramtype">uint32_t </td> |
| 495 | <td class="paramname"><em>vSize</em>, </td> |
| 496 | </tr> |
| 497 | <tr> |
| 498 | <td class="paramkey"></td> |
| 499 | <td></td> |
| 500 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 501 | <td class="paramname"><em>batchVector</em>, </td> |
| 502 | </tr> |
| 503 | <tr> |
| 504 | <td class="paramkey"></td> |
| 505 | <td></td> |
| 506 | <td class="paramtype">uint32_t </td> |
| 507 | <td class="paramname"><em>nBatch</em>, </td> |
| 508 | </tr> |
| 509 | <tr> |
| 510 | <td class="paramkey"></td> |
| 511 | <td></td> |
| 512 | <td class="paramtype"><a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > & </td> |
| 513 | <td class="paramname"><em>outResult</em> </td> |
| 514 | </tr> |
| 515 | <tr> |
| 516 | <td></td> |
| 517 | <td>)</td> |
| 518 | <td></td><td></td> |
| 519 | </tr> |
| 520 | </table> |
| 521 | </div><div class="memdoc"> |
| 522 | |
| 523 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00016">16</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 524 | |
| 525 | <p class="reference">References <a class="el" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Decoder< IType >::Get()</a>, and <a class="el" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Encoder< IType >::Set()</a>.</p> |
| 526 | |
| 527 | <p class="reference">Referenced by <a class="el" href="_ref_lstm_workload_8cpp_source.html#l00041">RefLstmWorkload::Execute()</a>.</p> |
| 528 | <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">for</span> (uint32_t b = 0; b < nBatch; b++)</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  {</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  <span class="keywordflow">for</span> (uint32_t v = 0; v < vSize; v++)</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  {</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  outResult.<a class="code" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Set</a>(batchVector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>() + vector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>());</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  ++outResult;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  ++vector;</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  ++batchVector;</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>  vector -= vSize;</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>  batchVector -= vSize * nBatch;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  outResult -= vSize * nBatch;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> }</div><div class="ttc" id="classarmnn_1_1_decoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">armnn::Decoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 529 | <div class="ttc" id="classarmnn_1_1_encoder_html_ae3b62b846a9c239f332830b9e36030eb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">armnn::Encoder::Set</a></div><div class="ttdeci">virtual void Set(IType right)=0</div></div> |
| 530 | </div><!-- fragment --> |
| 531 | </div> |
| 532 | </div> |
| 533 | <a id="a8c4a96233c9b62c76d611316da11124b"></a> |
| 534 | <h2 class="memtitle"><span class="permalink"><a href="#a8c4a96233c9b62c76d611316da11124b">◆ </a></span>VectorBatchVectorAssign()</h2> |
| 535 | |
| 536 | <div class="memitem"> |
| 537 | <div class="memproto"> |
| 538 | <table class="memname"> |
| 539 | <tr> |
| 540 | <td class="memname">void VectorBatchVectorAssign </td> |
| 541 | <td>(</td> |
| 542 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 543 | <td class="paramname"><em>vector</em>, </td> |
| 544 | </tr> |
| 545 | <tr> |
| 546 | <td class="paramkey"></td> |
| 547 | <td></td> |
| 548 | <td class="paramtype">uint32_t </td> |
| 549 | <td class="paramname"><em>vSize</em>, </td> |
| 550 | </tr> |
| 551 | <tr> |
| 552 | <td class="paramkey"></td> |
| 553 | <td></td> |
| 554 | <td class="paramtype">uint32_t </td> |
| 555 | <td class="paramname"><em>nBatch</em>, </td> |
| 556 | </tr> |
| 557 | <tr> |
| 558 | <td class="paramkey"></td> |
| 559 | <td></td> |
| 560 | <td class="paramtype"><a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > & </td> |
| 561 | <td class="paramname"><em>outBatchVector</em> </td> |
| 562 | </tr> |
| 563 | <tr> |
| 564 | <td></td> |
| 565 | <td>)</td> |
| 566 | <td></td><td></td> |
| 567 | </tr> |
| 568 | </table> |
| 569 | </div><div class="memdoc"> |
| 570 | |
| 571 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00113">113</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 572 | |
| 573 | <p class="reference">References <a class="el" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Decoder< IType >::Get()</a>, and <a class="el" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Encoder< IType >::Set()</a>.</p> |
| 574 | |
| 575 | <p class="reference">Referenced by <a class="el" href="_ref_lstm_workload_8cpp_source.html#l00041">RefLstmWorkload::Execute()</a>.</p> |
| 576 | <div class="fragment"><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> {</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">for</span> (uint32_t b = 0; b < nBatch; b++)</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  {</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">for</span> (uint32_t v = 0; v < vSize; v++)</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  {</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  outBatchVector.<a class="code" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Set</a>(vector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>());</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  ++outBatchVector;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  ++vector;</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>  vector -= vSize;</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  }</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  outBatchVector -= (nBatch * vSize);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span> }</div><div class="ttc" id="classarmnn_1_1_decoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">armnn::Decoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 577 | <div class="ttc" id="classarmnn_1_1_encoder_html_ae3b62b846a9c239f332830b9e36030eb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">armnn::Encoder::Set</a></div><div class="ttdeci">virtual void Set(IType right)=0</div></div> |
| 578 | </div><!-- fragment --> |
| 579 | </div> |
| 580 | </div> |
| 581 | <a id="a1d7ad9698b02282a57fdb17b3af745f9"></a> |
| 582 | <h2 class="memtitle"><span class="permalink"><a href="#a1d7ad9698b02282a57fdb17b3af745f9">◆ </a></span>VectorBatchVectorCwiseProduct()</h2> |
| 583 | |
| 584 | <div class="memitem"> |
| 585 | <div class="memproto"> |
| 586 | <table class="memname"> |
| 587 | <tr> |
| 588 | <td class="memname">void VectorBatchVectorCwiseProduct </td> |
| 589 | <td>(</td> |
| 590 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 591 | <td class="paramname"><em>vector</em>, </td> |
| 592 | </tr> |
| 593 | <tr> |
| 594 | <td class="paramkey"></td> |
| 595 | <td></td> |
| 596 | <td class="paramtype">uint32_t </td> |
| 597 | <td class="paramname"><em>vSize</em>, </td> |
| 598 | </tr> |
| 599 | <tr> |
| 600 | <td class="paramkey"></td> |
| 601 | <td></td> |
| 602 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 603 | <td class="paramname"><em>batchVector</em>, </td> |
| 604 | </tr> |
| 605 | <tr> |
| 606 | <td class="paramkey"></td> |
| 607 | <td></td> |
| 608 | <td class="paramtype">uint32_t </td> |
| 609 | <td class="paramname"><em>nBatch</em>, </td> |
| 610 | </tr> |
| 611 | <tr> |
| 612 | <td class="paramkey"></td> |
| 613 | <td></td> |
| 614 | <td class="paramtype"><a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > & </td> |
| 615 | <td class="paramname"><em>outResult</em> </td> |
| 616 | </tr> |
| 617 | <tr> |
| 618 | <td></td> |
| 619 | <td>)</td> |
| 620 | <td></td><td></td> |
| 621 | </tr> |
| 622 | </table> |
| 623 | </div><div class="memdoc"> |
| 624 | |
| 625 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00152">152</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 626 | |
| 627 | <p class="reference">References <a class="el" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Decoder< IType >::Get()</a>, and <a class="el" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Encoder< IType >::Set()</a>.</p> |
| 628 | |
| 629 | <p class="reference">Referenced by <a class="el" href="_ref_lstm_workload_8cpp_source.html#l00041">RefLstmWorkload::Execute()</a>.</p> |
| 630 | <div class="fragment"><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="keywordflow">for</span> (uint32_t b = 0; b < nBatch; b++)</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  {</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordflow">for</span> (uint32_t v = 0; v < vSize; v++)</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>  outResult.<a class="code" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Set</a>(vector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>() * batchVector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>());</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  ++outResult;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  ++vector;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  ++batchVector;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  }</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  vector -= vSize;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  }</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  batchVector -= vSize * nBatch;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  outResult -= vSize * nBatch;</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span> }</div><div class="ttc" id="classarmnn_1_1_decoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">armnn::Decoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 631 | <div class="ttc" id="classarmnn_1_1_encoder_html_ae3b62b846a9c239f332830b9e36030eb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">armnn::Encoder::Set</a></div><div class="ttdeci">virtual void Set(IType right)=0</div></div> |
| 632 | </div><!-- fragment --> |
| 633 | </div> |
| 634 | </div> |
| 635 | <a id="a796323e16216b880043dc5ebbaa2372b"></a> |
| 636 | <h2 class="memtitle"><span class="permalink"><a href="#a796323e16216b880043dc5ebbaa2372b">◆ </a></span>VectorBatchVectorCwiseProductAccumulate()</h2> |
| 637 | |
| 638 | <div class="memitem"> |
| 639 | <div class="memproto"> |
| 640 | <table class="memname"> |
| 641 | <tr> |
| 642 | <td class="memname">void VectorBatchVectorCwiseProductAccumulate </td> |
| 643 | <td>(</td> |
| 644 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 645 | <td class="paramname"><em>vector</em>, </td> |
| 646 | </tr> |
| 647 | <tr> |
| 648 | <td class="paramkey"></td> |
| 649 | <td></td> |
| 650 | <td class="paramtype">uint32_t </td> |
| 651 | <td class="paramname"><em>vSize</em>, </td> |
| 652 | </tr> |
| 653 | <tr> |
| 654 | <td class="paramkey"></td> |
| 655 | <td></td> |
| 656 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 657 | <td class="paramname"><em>batchVector</em>, </td> |
| 658 | </tr> |
| 659 | <tr> |
| 660 | <td class="paramkey"></td> |
| 661 | <td></td> |
| 662 | <td class="paramtype">uint32_t </td> |
| 663 | <td class="paramname"><em>nBatch</em>, </td> |
| 664 | </tr> |
| 665 | <tr> |
| 666 | <td class="paramkey"></td> |
| 667 | <td></td> |
| 668 | <td class="paramtype"><a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > & </td> |
| 669 | <td class="paramname"><em>outResult</em> </td> |
| 670 | </tr> |
| 671 | <tr> |
| 672 | <td></td> |
| 673 | <td>)</td> |
| 674 | <td></td><td></td> |
| 675 | </tr> |
| 676 | </table> |
| 677 | </div><div class="memdoc"> |
| 678 | |
| 679 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00131">131</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 680 | |
| 681 | <p class="reference">References <a class="el" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Decoder< IType >::Get()</a>, <a class="el" href="classarmnn_1_1_encoder.html#ac729108381e2340bea12877971713ecb">Encoder< IType >::Get()</a>, and <a class="el" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Encoder< IType >::Set()</a>.</p> |
| 682 | |
| 683 | <p class="reference">Referenced by <a class="el" href="_ref_lstm_workload_8cpp_source.html#l00041">RefLstmWorkload::Execute()</a>.</p> |
| 684 | <div class="fragment"><div class="line"><a name="l00136"></a><span class="lineno"> 136</span> {</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keywordflow">for</span> (uint32_t b = 0; b < nBatch; b++)</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>  <span class="keywordflow">for</span> (uint32_t v = 0; v < vSize; v++)</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  {</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  outResult.<a class="code" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Set</a>(outResult.<a class="code" href="classarmnn_1_1_encoder.html#ac729108381e2340bea12877971713ecb">Get</a>() + vector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>() * batchVector.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>());</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  ++outResult;</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  ++vector;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  ++batchVector;</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>  vector -= vSize;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  }</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  batchVector -= vSize * nBatch;</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  outResult -= vSize * nBatch;</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> }</div><div class="ttc" id="classarmnn_1_1_decoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">armnn::Decoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 685 | <div class="ttc" id="classarmnn_1_1_encoder_html_ae3b62b846a9c239f332830b9e36030eb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">armnn::Encoder::Set</a></div><div class="ttdeci">virtual void Set(IType right)=0</div></div> |
| 686 | <div class="ttc" id="classarmnn_1_1_encoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ac729108381e2340bea12877971713ecb">armnn::Encoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 687 | </div><!-- fragment --> |
| 688 | </div> |
| 689 | </div> |
| 690 | <a id="a5b81dc0a1a9a2bccab8bb79dfa3e77b7"></a> |
| 691 | <h2 class="memtitle"><span class="permalink"><a href="#a5b81dc0a1a9a2bccab8bb79dfa3e77b7">◆ </a></span>VectorVectorCwiseProduct()</h2> |
| 692 | |
| 693 | <div class="memitem"> |
| 694 | <div class="memproto"> |
| 695 | <table class="memname"> |
| 696 | <tr> |
| 697 | <td class="memname">void VectorVectorCwiseProduct </td> |
| 698 | <td>(</td> |
| 699 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 700 | <td class="paramname"><em>vector1</em>, </td> |
| 701 | </tr> |
| 702 | <tr> |
| 703 | <td class="paramkey"></td> |
| 704 | <td></td> |
| 705 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 706 | <td class="paramname"><em>vector2</em>, </td> |
| 707 | </tr> |
| 708 | <tr> |
| 709 | <td class="paramkey"></td> |
| 710 | <td></td> |
| 711 | <td class="paramtype">uint32_t </td> |
| 712 | <td class="paramname"><em>vSize</em>, </td> |
| 713 | </tr> |
| 714 | <tr> |
| 715 | <td class="paramkey"></td> |
| 716 | <td></td> |
| 717 | <td class="paramtype"><a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > & </td> |
| 718 | <td class="paramname"><em>outResult</em> </td> |
| 719 | </tr> |
| 720 | <tr> |
| 721 | <td></td> |
| 722 | <td>)</td> |
| 723 | <td></td><td></td> |
| 724 | </tr> |
| 725 | </table> |
| 726 | </div><div class="memdoc"> |
| 727 | |
| 728 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00187">187</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 729 | |
| 730 | <p class="reference">References <a class="el" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Decoder< IType >::Get()</a>, and <a class="el" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Encoder< IType >::Set()</a>.</p> |
| 731 | |
| 732 | <p class="reference">Referenced by <a class="el" href="_ref_lstm_workload_8cpp_source.html#l00041">RefLstmWorkload::Execute()</a>.</p> |
| 733 | <div class="fragment"><div class="line"><a name="l00191"></a><span class="lineno"> 191</span> {</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordflow">for</span> (uint32_t v = 0; v < vSize; v++)</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>  outResult.<a class="code" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Set</a>(vector1.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>() * vector2.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>());</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  ++outResult;</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  ++vector1;</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  ++vector2;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  }</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  outResult -= vSize;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  vector1 -= vSize;</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  vector2 -= vSize;</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span> }</div><div class="ttc" id="classarmnn_1_1_decoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">armnn::Decoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 734 | <div class="ttc" id="classarmnn_1_1_encoder_html_ae3b62b846a9c239f332830b9e36030eb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">armnn::Encoder::Set</a></div><div class="ttdeci">virtual void Set(IType right)=0</div></div> |
| 735 | </div><!-- fragment --> |
| 736 | </div> |
| 737 | </div> |
| 738 | <a id="a2e653f948d93f4177f267a7b1b4ed47d"></a> |
| 739 | <h2 class="memtitle"><span class="permalink"><a href="#a2e653f948d93f4177f267a7b1b4ed47d">◆ </a></span>VectorVectorCwiseProductAccumulate()</h2> |
| 740 | |
| 741 | <div class="memitem"> |
| 742 | <div class="memproto"> |
| 743 | <table class="memname"> |
| 744 | <tr> |
| 745 | <td class="memname">void VectorVectorCwiseProductAccumulate </td> |
| 746 | <td>(</td> |
| 747 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 748 | <td class="paramname"><em>vector1</em>, </td> |
| 749 | </tr> |
| 750 | <tr> |
| 751 | <td class="paramkey"></td> |
| 752 | <td></td> |
| 753 | <td class="paramtype"><a class="el" href="classarmnn_1_1_decoder.html">armnn::Decoder</a>< float > & </td> |
| 754 | <td class="paramname"><em>vector2</em>, </td> |
| 755 | </tr> |
| 756 | <tr> |
| 757 | <td class="paramkey"></td> |
| 758 | <td></td> |
| 759 | <td class="paramtype">uint32_t </td> |
| 760 | <td class="paramname"><em>vSize</em>, </td> |
| 761 | </tr> |
| 762 | <tr> |
| 763 | <td class="paramkey"></td> |
| 764 | <td></td> |
| 765 | <td class="paramtype"><a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > & </td> |
| 766 | <td class="paramname"><em>outResult</em> </td> |
| 767 | </tr> |
| 768 | <tr> |
| 769 | <td></td> |
| 770 | <td>)</td> |
| 771 | <td></td><td></td> |
| 772 | </tr> |
| 773 | </table> |
| 774 | </div><div class="memdoc"> |
| 775 | |
| 776 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00204">204</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 777 | |
| 778 | <p class="reference">References <a class="el" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Decoder< IType >::Get()</a>, <a class="el" href="classarmnn_1_1_encoder.html#ac729108381e2340bea12877971713ecb">Encoder< IType >::Get()</a>, and <a class="el" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Encoder< IType >::Set()</a>.</p> |
| 779 | |
| 780 | <p class="reference">Referenced by <a class="el" href="_ref_lstm_workload_8cpp_source.html#l00041">RefLstmWorkload::Execute()</a>.</p> |
| 781 | <div class="fragment"><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>  <span class="keywordflow">for</span> (uint32_t v = 0; v < vSize; v++)</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>  outResult.<a class="code" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Set</a>(outResult.<a class="code" href="classarmnn_1_1_encoder.html#ac729108381e2340bea12877971713ecb">Get</a>() + vector1.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>() * vector2.<a class="code" href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">Get</a>());</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  ++outResult;</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  ++vector1;</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  ++vector2;</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>  outResult -= vSize;</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  vector1 -= vSize;</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  vector2 -= vSize;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span> }</div><div class="ttc" id="classarmnn_1_1_decoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_decoder.html#ac729108381e2340bea12877971713ecb">armnn::Decoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 782 | <div class="ttc" id="classarmnn_1_1_encoder_html_ae3b62b846a9c239f332830b9e36030eb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">armnn::Encoder::Set</a></div><div class="ttdeci">virtual void Set(IType right)=0</div></div> |
| 783 | <div class="ttc" id="classarmnn_1_1_encoder_html_ac729108381e2340bea12877971713ecb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ac729108381e2340bea12877971713ecb">armnn::Encoder::Get</a></div><div class="ttdeci">virtual IType Get() const =0</div></div> |
| 784 | </div><!-- fragment --> |
| 785 | </div> |
| 786 | </div> |
| 787 | <a id="a4c20bc573b70e89327b334f924da97b5"></a> |
| 788 | <h2 class="memtitle"><span class="permalink"><a href="#a4c20bc573b70e89327b334f924da97b5">◆ </a></span>ZeroVector()</h2> |
| 789 | |
| 790 | <div class="memitem"> |
| 791 | <div class="memproto"> |
| 792 | <table class="memname"> |
| 793 | <tr> |
| 794 | <td class="memname">void ZeroVector </td> |
| 795 | <td>(</td> |
| 796 | <td class="paramtype"><a class="el" href="classarmnn_1_1_encoder.html">armnn::Encoder</a>< float > & </td> |
| 797 | <td class="paramname"><em>vector</em>, </td> |
| 798 | </tr> |
| 799 | <tr> |
| 800 | <td class="paramkey"></td> |
| 801 | <td></td> |
| 802 | <td class="paramtype">uint32_t </td> |
| 803 | <td class="paramname"><em>vSize</em> </td> |
| 804 | </tr> |
| 805 | <tr> |
| 806 | <td></td> |
| 807 | <td>)</td> |
| 808 | <td></td><td></td> |
| 809 | </tr> |
| 810 | </table> |
| 811 | </div><div class="memdoc"> |
| 812 | |
| 813 | <p class="definition">Definition at line <a class="el" href="_lstm_utils_8cpp_source.html#l00076">76</a> of file <a class="el" href="_lstm_utils_8cpp_source.html">LstmUtils.cpp</a>.</p> |
| 814 | |
| 815 | <p class="reference">References <a class="el" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Encoder< IType >::Set()</a>.</p> |
| 816 | |
| 817 | <p class="reference">Referenced by <a class="el" href="_ref_lstm_workload_8cpp_source.html#l00041">RefLstmWorkload::Execute()</a>.</p> |
| 818 | <div class="fragment"><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="keywordflow">for</span> (uint32_t v = 0; v < vSize; v++)</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  {</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  vector.<a class="code" href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">Set</a>(0.0f);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  ++vector;</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>  vector -= vSize;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> }</div><div class="ttc" id="classarmnn_1_1_encoder_html_ae3b62b846a9c239f332830b9e36030eb"><div class="ttname"><a href="classarmnn_1_1_encoder.html#ae3b62b846a9c239f332830b9e36030eb">armnn::Encoder::Set</a></div><div class="ttdeci">virtual void Set(IType right)=0</div></div> |
| 819 | </div><!-- fragment --> |
| 820 | </div> |
| 821 | </div> |
| 822 | </div><!-- contents --> |
| 823 | </div><!-- doc-content --> |
| 824 | <!-- start footer part --> |
| 825 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 826 | <ul> |
| 827 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_0f3cdec46afbc61a1ded8e1687c9c9a0.html">backends</a></li><li class="navelem"><a class="el" href="dir_efae4012d0e357ebeaba7d02491d70e5.html">reference</a></li><li class="navelem"><a class="el" href="dir_d2f3b8e2e64df3181ebe92efcc0a3012.html">workloads</a></li><li class="navelem"><a class="el" href="_lstm_utils_8hpp.html">LstmUtils.hpp</a></li> |
| 828 | <li class="footer">Generated on Fri Mar 13 2020 16:07:01 for ArmNN by |
| 829 | <a href="http://www.doxygen.org/index.html"> |
| 830 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 831 | </ul> |
| 832 | </div> |
| 833 | </body> |
| 834 | </html> |