<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
-<title>ARM Compute Library: arm_compute/core/NEON/NEMath.h Source File</title>
+<title>Compute Library: arm_compute/core/NEON/NEMath.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
- <div id="projectname">ARM Compute Library
-  <span id="projectnumber">17.04</span>
+ <div id="projectname">Compute Library
+  <span id="projectnumber">18.05</span>
</div>
</td>
</tr>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.xhtml"><span>Main Page</span></a></li>
+ <li><a href="pages.xhtml"><span>Related Pages</span></a></li>
<li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
<li><a href="annotated.xhtml"><span>Data Structures</span></a></li>
<li class="current"><a href="files.xhtml"><span>Files</span></a></li>
<div class="title">NEMath.h</div> </div>
</div><!--header-->
<div class="contents">
-<a href="_n_e_math_8h.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2016, 2017 ARM Limited.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * of this software and associated documentation files (the "Software"), to</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * deal in the Software without restriction, including without limitation the</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#ifndef __ARM_COMPUTE_NEMATH_H__</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#define __ARM_COMPUTE_NEMATH_H__</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <arm_neon.h></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">namespace </span><a class="code" href="namespacearm__compute.xhtml">arm_compute</a></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> <span class="comment">/* Exponent polynomial coefficients */</span></div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="namespacearm__compute.xhtml#a869945609357fa552d94eb16f7aad4e9"> 32</a></span> <span class="keyword">const</span> std::array<float32x4_t, 8> <a class="code" href="namespacearm__compute.xhtml#a869945609357fa552d94eb16f7aad4e9">exp_tab</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>  {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  vdupq_n_f32(1.f),</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  vdupq_n_f32(0.0416598916054f),</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  vdupq_n_f32(0.500000596046f),</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  vdupq_n_f32(0.0014122662833f),</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  vdupq_n_f32(1.00000011921f),</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  vdupq_n_f32(0.00833693705499f),</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  vdupq_n_f32(0.166665703058f),</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  vdupq_n_f32(0.000195780929062f),</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> };</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> <span class="comment">/* Logarithm polynomial coefficients */</span></div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="namespacearm__compute.xhtml#a48fb9cf404e8f7043235bf14105c9793"> 47</a></span> <span class="keyword">const</span> std::array<float32x4_t, 8> <a class="code" href="namespacearm__compute.xhtml#a48fb9cf404e8f7043235bf14105c9793">log_tab</a> =</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> {</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  {</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  vdupq_n_f32(-2.29561495781f),</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  vdupq_n_f32(-2.47071170807f),</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  vdupq_n_f32(-5.68692588806f),</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  vdupq_n_f32(-0.165253549814f),</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  vdupq_n_f32(5.17591238022f),</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  vdupq_n_f32(0.844007015228f),</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  vdupq_n_f32(4.58445882797f),</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  vdupq_n_f32(0.0141278216615f),</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  }</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> };</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="namespacearm__compute.xhtml#aab4b53a52d617f05420711425f20ed4b"> 67</a></span> <span class="keyword">inline</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#aab4b53a52d617f05420711425f20ed4b">vinvsqrt_f32</a>(float32x4_t x)</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>  float32x4_t sqrt_reciprocal = vrsqrteq_f32(x);</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  sqrt_reciprocal = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x, sqrt_reciprocal), sqrt_reciprocal), sqrt_reciprocal);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  sqrt_reciprocal = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x, sqrt_reciprocal), sqrt_reciprocal), sqrt_reciprocal);</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="keywordflow">return</span> sqrt_reciprocal;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span> }</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="namespacearm__compute.xhtml#a99d2837a875fc6bca19755f40205f04a"> 82</a></span> <span class="keyword">inline</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#a99d2837a875fc6bca19755f40205f04a">vinv_f32</a>(<span class="keyword">const</span> float32x4_t &x)</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>  float32x4_t recip = vrecpeq_f32(x);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  recip = vmulq_f32(vrecpsq_f32(x, recip), recip);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  recip = vmulq_f32(vrecpsq_f32(x, recip), recip);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordflow">return</span> recip;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span> }</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span> </div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="namespacearm__compute.xhtml#aa4e5c4d2084010ee1c68475fde882f84"> 97</a></span> <span class="keyword">inline</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#aa4e5c4d2084010ee1c68475fde882f84">vtaylor_poly_f32</a>(<span class="keyword">const</span> float32x4_t &x, <span class="keyword">const</span> std::array<float32x4_t, 8> &coeffs)</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> {</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  float32x4_t <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29">A</a> = vmlaq_f32(coeffs[0], coeffs[4], x);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  float32x4_t <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">B</a> = vmlaq_f32(coeffs[2], coeffs[6], x);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  float32x4_t C = vmlaq_f32(coeffs[1], coeffs[5], x);</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  float32x4_t D = vmlaq_f32(coeffs[3], coeffs[7], x);</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  float32x4_t x2 = vmulq_f32(x, x);</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  float32x4_t x4 = vmulq_f32(x2, x2);</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  float32x4_t res = vmlaq_f32(vmlaq_f32(A, B, x2), vmlaq_f32(C, D, x2), x4);</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keywordflow">return</span> res;</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> </div><div class="line"><a name="l00115"></a><span class="lineno"><a class="line" href="namespacearm__compute.xhtml#ab61617950fb57bf883ee19fc4e219826"> 115</a></span> <span class="keyword">inline</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#ab61617950fb57bf883ee19fc4e219826">vexp_f32</a>(<span class="keyword">const</span> float32x4_t &x)</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> {</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keyword">static</span> <span class="keyword">const</span> float32x4_t CONST_LN2 = vdupq_n_f32(0.6931471805f); <span class="comment">// ln(2)</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keyword">static</span> <span class="keyword">const</span> float32x4_t CONST_INV_LN2 = vdupq_n_f32(1.4426950408f); <span class="comment">// 1/ln(2)</span></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="comment">// Perform range reduction [-log(2),log(2)]</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  int32x4_t m = vcvtq_s32_f32(vmulq_f32(x, CONST_INV_LN2));</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  float32x4_t val = vmlsq_f32(x, vcvtq_f32_s32(m), CONST_LN2);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> </div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="comment">// Polynomial Approximation</span></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  float32x4_t poly = <a class="code" href="namespacearm__compute.xhtml#aa4e5c4d2084010ee1c68475fde882f84">vtaylor_poly_f32</a>(val, exp_tab);</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span> </div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="comment">// Reconstruct</span></div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  poly = vreinterpretq_f32_s32(vaddq_s32(vreinterpretq_s32_f32(poly), vshlq_n_s32(m, 23)));</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span> </div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keywordflow">return</span> poly;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> }</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> </div><div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="namespacearm__compute.xhtml#afa7e6a89815b00d86c5ae6ec73d79c26"> 139</a></span> <span class="keyword">inline</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#afa7e6a89815b00d86c5ae6ec73d79c26">vlog_f32</a>(<span class="keyword">const</span> float32x4_t &x)</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>  <span class="keyword">static</span> <span class="keyword">const</span> int32x4_t CONST_127 = vdupq_n_s32(127); <span class="comment">// 127</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keyword">static</span> <span class="keyword">const</span> float32x4_t CONST_LN2 = vdupq_n_f32(0.6931471805f); <span class="comment">// ln(2)</span></div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span> </div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="comment">// Extract exponent</span></div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  int32x4_t m = vsubq_s32(vreinterpretq_s32_u32(vshrq_n_u32(vreinterpretq_u32_f32(x), 23)), CONST_127);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  float32x4_t val = vreinterpretq_f32_s32(vsubq_s32(vreinterpretq_s32_f32(x), vshlq_n_s32(m, 23)));</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>  <span class="comment">// Polynomial Approximation</span></div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  float32x4_t poly = <a class="code" href="namespacearm__compute.xhtml#aa4e5c4d2084010ee1c68475fde882f84">vtaylor_poly_f32</a>(val, log_tab);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> </div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="comment">// Reconstruct</span></div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  poly = vmlaq_f32(poly, vcvtq_f32_s32(m), CONST_LN2);</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span> </div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="keywordflow">return</span> poly;</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span> }</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span> </div><div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="namespacearm__compute.xhtml#af2002ba27e8c8033e3038da708248f32"> 165</a></span> <span class="keyword">inline</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#af2002ba27e8c8033e3038da708248f32">vtanh_f32</a>(<span class="keyword">const</span> float32x4_t &val)</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> {</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <span class="keyword">static</span> <span class="keyword">const</span> float32x4_t CONST_1 = vdupq_n_f32(1.f); <span class="comment">// 1.f</span></div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="keyword">static</span> <span class="keyword">const</span> float32x4_t CONST_2 = vdupq_n_f32(2.f); <span class="comment">// 2.f</span></div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span> </div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  float32x4_t exp2x = <a class="code" href="namespacearm__compute.xhtml#ab61617950fb57bf883ee19fc4e219826">vexp_f32</a>(vmulq_f32(CONST_2, val));</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  float32x4_t num = vsubq_f32(exp2x, CONST_1);</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  float32x4_t den = vaddq_f32(exp2x, CONST_1);</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  float32x4_t tanh = vmulq_f32(num, <a class="code" href="namespacearm__compute.xhtml#a99d2837a875fc6bca19755f40205f04a">vinv_f32</a>(den));</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keywordflow">return</span> tanh;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> }</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> </div><div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="namespacearm__compute.xhtml#ae0dbcd09c015bda4ab290b957d7bd6c7"> 186</a></span> <span class="keyword">inline</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#ae0dbcd09c015bda4ab290b957d7bd6c7">vpowq_f32</a>(<span class="keyword">const</span> float32x4_t &val, <span class="keyword">const</span> float32x4_t &n)</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span> {</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute.xhtml#ab61617950fb57bf883ee19fc4e219826">vexp_f32</a>(vmulq_f32(n, <a class="code" href="namespacearm__compute.xhtml#afa7e6a89815b00d86c5ae6ec73d79c26">vlog_f32</a>(val)));</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span> }</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span> }</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span> </div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span> <span class="preprocessor">#endif </span><span class="comment">/* __ARM_COMPUTE_NEMATH_H__ */</span><span class="preprocessor"></span></div><div class="ttc" id="namespacearm__compute_xhtml_a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29"><div class="ttname"><a href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29">arm_compute::Channel::A</a></div><div class="ttdoc">Alpha channel. </div></div>
-<div class="ttc" id="namespacearm__compute_xhtml_aa4e5c4d2084010ee1c68475fde882f84"><div class="ttname"><a href="namespacearm__compute.xhtml#aa4e5c4d2084010ee1c68475fde882f84">arm_compute::vtaylor_poly_f32</a></div><div class="ttdeci">float32x4_t vtaylor_poly_f32(const float32x4_t &x, const std::array< float32x4_t, 8 > &coeffs)</div><div class="ttdoc">Perform a 7th degree polynomial approximation using Estrin&#39;s method. </div><div class="ttdef"><b>Definition:</b> <a href="_n_e_math_8h_source.xhtml#l00097">NEMath.h:97</a></div></div>
-<div class="ttc" id="namespacearm__compute_xhtml_a99d2837a875fc6bca19755f40205f04a"><div class="ttname"><a href="namespacearm__compute.xhtml#a99d2837a875fc6bca19755f40205f04a">arm_compute::vinv_f32</a></div><div class="ttdeci">float32x4_t vinv_f32(const float32x4_t &x)</div><div class="ttdoc">Calculate reciprocal. </div><div class="ttdef"><b>Definition:</b> <a href="_n_e_math_8h_source.xhtml#l00082">NEMath.h:82</a></div></div>
-<div class="ttc" id="namespacearm__compute_xhtml_a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571"><div class="ttname"><a href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">arm_compute::Channel::B</a></div><div class="ttdoc">Blue channel. </div></div>
-<div class="ttc" id="namespacearm__compute_xhtml_af2002ba27e8c8033e3038da708248f32"><div class="ttname"><a href="namespacearm__compute.xhtml#af2002ba27e8c8033e3038da708248f32">arm_compute::vtanh_f32</a></div><div class="ttdeci">float32x4_t vtanh_f32(const float32x4_t &val)</div><div class="ttdoc">Calculate hyperbolic tangent. </div><div class="ttdef"><b>Definition:</b> <a href="_n_e_math_8h_source.xhtml#l00165">NEMath.h:165</a></div></div>
-<div class="ttc" id="namespacearm__compute_xhtml"><div class="ttname"><a href="namespacearm__compute.xhtml">arm_compute</a></div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_8dox_source.xhtml#l00001">arm_compute.dox:1</a></div></div>
-<div class="ttc" id="namespacearm__compute_xhtml_a869945609357fa552d94eb16f7aad4e9"><div class="ttname"><a href="namespacearm__compute.xhtml#a869945609357fa552d94eb16f7aad4e9">arm_compute::exp_tab</a></div><div class="ttdeci">const std::array< float32x4_t, 8 > exp_tab</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_math_8h_source.xhtml#l00032">NEMath.h:32</a></div></div>
-<div class="ttc" id="namespacearm__compute_xhtml_aab4b53a52d617f05420711425f20ed4b"><div class="ttname"><a href="namespacearm__compute.xhtml#aab4b53a52d617f05420711425f20ed4b">arm_compute::vinvsqrt_f32</a></div><div class="ttdeci">float32x4_t vinvsqrt_f32(float32x4_t x)</div><div class="ttdoc">Calculate inverse square root. </div><div class="ttdef"><b>Definition:</b> <a href="_n_e_math_8h_source.xhtml#l00067">NEMath.h:67</a></div></div>
-<div class="ttc" id="namespacearm__compute_xhtml_afa7e6a89815b00d86c5ae6ec73d79c26"><div class="ttname"><a href="namespacearm__compute.xhtml#afa7e6a89815b00d86c5ae6ec73d79c26">arm_compute::vlog_f32</a></div><div class="ttdeci">float32x4_t vlog_f32(const float32x4_t &x)</div><div class="ttdoc">Calculate logarithm. </div><div class="ttdef"><b>Definition:</b> <a href="_n_e_math_8h_source.xhtml#l00139">NEMath.h:139</a></div></div>
-<div class="ttc" id="namespacearm__compute_xhtml_ab61617950fb57bf883ee19fc4e219826"><div class="ttname"><a href="namespacearm__compute.xhtml#ab61617950fb57bf883ee19fc4e219826">arm_compute::vexp_f32</a></div><div class="ttdeci">float32x4_t vexp_f32(const float32x4_t &x)</div><div class="ttdoc">Calculate exponential. </div><div class="ttdef"><b>Definition:</b> <a href="_n_e_math_8h_source.xhtml#l00115">NEMath.h:115</a></div></div>
-<div class="ttc" id="namespacearm__compute_xhtml_ae0dbcd09c015bda4ab290b957d7bd6c7"><div class="ttname"><a href="namespacearm__compute.xhtml#ae0dbcd09c015bda4ab290b957d7bd6c7">arm_compute::vpowq_f32</a></div><div class="ttdeci">float32x4_t vpowq_f32(const float32x4_t &val, const float32x4_t &n)</div><div class="ttdoc">Calculate n power of a number. </div><div class="ttdef"><b>Definition:</b> <a href="_n_e_math_8h_source.xhtml#l00186">NEMath.h:186</a></div></div>
-<div class="ttc" id="namespacearm__compute_xhtml_a48fb9cf404e8f7043235bf14105c9793"><div class="ttname"><a href="namespacearm__compute.xhtml#a48fb9cf404e8f7043235bf14105c9793">arm_compute::log_tab</a></div><div class="ttdeci">const std::array< float32x4_t, 8 > log_tab</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_math_8h_source.xhtml#l00047">NEMath.h:47</a></div></div>
+<a href="_n_e_math_8h.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2016, 2017 ARM Limited.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * of this software and associated documentation files (the "Software"), to</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * deal in the Software without restriction, including without limitation the</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#ifndef __ARM_COMPUTE_NEMATH_H__</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#define __ARM_COMPUTE_NEMATH_H__</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include <arm_neon.h></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">namespace </span><a class="code" href="namespacearm__compute.xhtml">arm_compute</a></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#af7a0f3e622aa4bc8c6077d2262a04e2e">vfloorq_f32</a>(float32x4_t val);</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> float32x2_t <a class="code" href="namespacearm__compute.xhtml#afc415e7fc5e633a0b85b08b2bba5b5cf">vinvsqrt_f32</a>(float32x2_t x);</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> </div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#ab8970d7aed07d8649f5e3088455948b8">vinvsqrtq_f32</a>(float32x4_t x);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> float32x2_t <a class="code" href="namespacearm__compute.xhtml#acc6fd1bcd12ef1141e15401a04d31187">vinv_f32</a>(float32x2_t x);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#a2e0f2412b4d1302272d1aeb85d21ab25">vinvq_f32</a>(float32x4_t x);</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#a0c10bb00a86edd8d0cd4c33b494f6cd4">vtaylor_polyq_f32</a>(float32x4_t x, <span class="keyword">const</span> std::array<float32x4_t, 8> &coeffs);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#ab55486f1153a4c5f507d4923b59fc6a0">vexpq_f32</a>(float32x4_t x);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#a1d090b80b655e7f8fd8977bb93808b04">vlogq_f32</a>(float32x4_t x);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> </div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#a3e59419da344d02daca9c5b274a1da45">vtanhq_f32</a>(float32x4_t val);</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> float32x4_t <a class="code" href="namespacearm__compute.xhtml#aa6465367a67af2bae4ca46750231dae0">vpowq_f32</a>(float32x4_t val, float32x4_t n);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="preprocessor">#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC</span></div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span> </div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span> float16x8_t vtanhq_f16(float16x8_t val);</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> </div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span> float16x4_t vinv_f16(float16x4_t x);</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> </div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> float16x8_t vinvq_f16(float16x8_t x);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span> </div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span> float16x4_t vinvsqrt_f16(float16x4_t x);</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span> </div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> float16x8_t vinvsqrtq_f16(float16x8_t x);</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span> </div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span> float16x8_t vexpq_f16(float16x8_t x);</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span> </div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span> float16x8_t vpowq_f16(float16x8_t val, float16x8_t n);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <span class="preprocessor">#endif </span><span class="comment">/* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */</span><span class="preprocessor"></span></div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span> } <span class="comment">// namespace arm_compute</span></div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span> <span class="preprocessor">#include "<a class="code" href="_n_e_math_8inl.xhtml">arm_compute/core/NEON/NEMath.inl</a>"</span></div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span> <span class="preprocessor">#endif </span><span class="comment">/* __ARM_COMPUTE_NEMATH_H__ */</span><span class="preprocessor"></span></div><div class="ttc" id="namespacearm__compute_xhtml_a3e59419da344d02daca9c5b274a1da45"><div class="ttname"><a href="namespacearm__compute.xhtml#a3e59419da344d02daca9c5b274a1da45">arm_compute::vtanhq_f32</a></div><div class="ttdeci">float32x4_t vtanhq_f32(float32x4_t val)</div><div class="ttdoc">Calculate hyperbolic tangent. </div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_ab8970d7aed07d8649f5e3088455948b8"><div class="ttname"><a href="namespacearm__compute.xhtml#ab8970d7aed07d8649f5e3088455948b8">arm_compute::vinvsqrtq_f32</a></div><div class="ttdeci">float32x4_t vinvsqrtq_f32(float32x4_t x)</div><div class="ttdoc">Calculate inverse square root. </div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_acc6fd1bcd12ef1141e15401a04d31187"><div class="ttname"><a href="namespacearm__compute.xhtml#acc6fd1bcd12ef1141e15401a04d31187">arm_compute::vinv_f32</a></div><div class="ttdeci">float32x2_t vinv_f32(float32x2_t x)</div><div class="ttdoc">Calculate reciprocal. </div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_a0c10bb00a86edd8d0cd4c33b494f6cd4"><div class="ttname"><a href="namespacearm__compute.xhtml#a0c10bb00a86edd8d0cd4c33b494f6cd4">arm_compute::vtaylor_polyq_f32</a></div><div class="ttdeci">float32x4_t vtaylor_polyq_f32(float32x4_t x, const std::array< float32x4_t, 8 > &coeffs)</div><div class="ttdoc">Perform a 7th degree polynomial approximation using Estrin&#39;s method. </div></div>
+<div class="ttc" id="namespacearm__compute_xhtml"><div class="ttname"><a href="namespacearm__compute.xhtml">arm_compute</a></div><div class="ttdoc">This file contains all available output stages for GEMMLowp on OpenCL. </div><div class="ttdef"><b>Definition:</b> <a href="00__introduction_8dox_source.xhtml#l00001">00_introduction.dox:1</a></div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_af7a0f3e622aa4bc8c6077d2262a04e2e"><div class="ttname"><a href="namespacearm__compute.xhtml#af7a0f3e622aa4bc8c6077d2262a04e2e">arm_compute::vfloorq_f32</a></div><div class="ttdeci">float32x4_t vfloorq_f32(float32x4_t val)</div><div class="ttdoc">Calculate floor of a vector. </div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_aa6465367a67af2bae4ca46750231dae0"><div class="ttname"><a href="namespacearm__compute.xhtml#aa6465367a67af2bae4ca46750231dae0">arm_compute::vpowq_f32</a></div><div class="ttdeci">float32x4_t vpowq_f32(float32x4_t val, float32x4_t n)</div><div class="ttdoc">Calculate n power of a number. </div></div>
+<div class="ttc" id="_n_e_math_8inl_xhtml"><div class="ttname"><a href="_n_e_math_8inl.xhtml">NEMath.inl</a></div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_a1d090b80b655e7f8fd8977bb93808b04"><div class="ttname"><a href="namespacearm__compute.xhtml#a1d090b80b655e7f8fd8977bb93808b04">arm_compute::vlogq_f32</a></div><div class="ttdeci">float32x4_t vlogq_f32(float32x4_t x)</div><div class="ttdoc">Calculate logarithm. </div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_afc415e7fc5e633a0b85b08b2bba5b5cf"><div class="ttname"><a href="namespacearm__compute.xhtml#afc415e7fc5e633a0b85b08b2bba5b5cf">arm_compute::vinvsqrt_f32</a></div><div class="ttdeci">float32x2_t vinvsqrt_f32(float32x2_t x)</div><div class="ttdoc">Calculate inverse square root. </div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_ab55486f1153a4c5f507d4923b59fc6a0"><div class="ttname"><a href="namespacearm__compute.xhtml#ab55486f1153a4c5f507d4923b59fc6a0">arm_compute::vexpq_f32</a></div><div class="ttdeci">float32x4_t vexpq_f32(float32x4_t x)</div><div class="ttdoc">Calculate exponential. </div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_a2e0f2412b4d1302272d1aeb85d21ab25"><div class="ttname"><a href="namespacearm__compute.xhtml#a2e0f2412b4d1302272d1aeb85d21ab25">arm_compute::vinvq_f32</a></div><div class="ttdeci">float32x4_t vinvq_f32(float32x4_t x)</div><div class="ttdoc">Calculate reciprocal. </div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_214608ef36d61442cb2b0c1c4e9a7def.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="dir_1fb090f0c6070330bfaccc4236d3ca0d.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_315f6cf1ec0b2df3ae747ff8286a19f5.xhtml">NEON</a></li><li class="navelem"><a class="el" href="_n_e_math_8h.xhtml">NEMath.h</a></li>
- <li class="footer">Generated on Wed Apr 12 2017 14:26:04 for ARM Compute Library by
+ <li class="footer">Generated on Wed May 23 2018 11:36:35 for Compute Library by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
</ul>