1 <!-- HTML header for doxygen 1.8.9.1-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
7 <meta name="generator" content="Doxygen 1.8.6"/>
8 <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
9 <title>Compute Library: tests/validation/FixedPoint.h Source File</title>
10 <link href="tabs.css" rel="stylesheet" type="text/css"/>
11 <script type="text/javascript" src="jquery.js"></script>
12 <script type="text/javascript" src="dynsections.js"></script>
13 <link href="navtree.css" rel="stylesheet" type="text/css"/>
14 <script type="text/javascript" src="resize.js"></script>
15 <script type="text/javascript" src="navtree.js"></script>
16 <script type="text/javascript">
17 $(document).ready(initResizable);
18 $(window).load(resizeHeight);
20 <link href="search/search.css" rel="stylesheet" type="text/css"/>
21 <script type="text/javascript" src="search/search.js"></script>
22 <script type="text/javascript">
23 $(document).ready(function() { searchBox.OnSelectItem(0); });
25 <script type="text/x-mathjax-config">
27 extensions: ["tex2jax.js"],
28 jax: ["input/TeX","output/HTML-CSS"],
30 </script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
31 <link href="doxygen.css" rel="stylesheet" type="text/css" />
34 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
36 <table cellspacing="0" cellpadding="0">
38 <tr style="height: 56px;">
39 <td style="padding-left: 0.5em;">
40 <div id="projectname">Compute Library
41  <span id="projectnumber">17.09</span>
48 <!-- end header part -->
49 <!-- Generated by Doxygen 1.8.6 -->
50 <script type="text/javascript">
51 var searchBox = new SearchBox("searchBox", "search",false,'Search');
53 <div id="navrow1" class="tabs">
55 <li><a href="index.xhtml"><span>Main Page</span></a></li>
56 <li><a href="pages.xhtml"><span>Related Pages</span></a></li>
57 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
58 <li><a href="annotated.xhtml"><span>Data Structures</span></a></li>
59 <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
61 <div id="MSearchBox" class="MSearchBoxInactive">
63 <img id="MSearchSelect" src="search/mag_sel.png"
64 onmouseover="return searchBox.OnSearchSelectShow()"
65 onmouseout="return searchBox.OnSearchSelectHide()"
67 <input type="text" id="MSearchField" value="Search" accesskey="S"
68 onfocus="searchBox.OnSearchFieldFocus(true)"
69 onblur="searchBox.OnSearchFieldFocus(false)"
70 onkeyup="searchBox.OnSearchFieldChange(event)"/>
71 </span><span class="right">
72 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
78 <div id="navrow2" class="tabs2">
80 <li><a href="files.xhtml"><span>File List</span></a></li>
81 <li><a href="globals.xhtml"><span>Globals</span></a></li>
85 <div id="side-nav" class="ui-resizable side-nav-resizable">
87 <div id="nav-tree-contents">
88 <div id="nav-sync" class="sync"></div>
91 <div id="splitbar" style="-moz-user-select:none;"
92 class="ui-resizable-handle">
95 <script type="text/javascript">
96 $(document).ready(function(){initNavTree('tests_2validation_2_fixed_point_8h_source.xhtml','');});
98 <div id="doc-content">
99 <!-- window showing the filter options -->
100 <div id="MSearchSelectWindow"
101 onmouseover="return searchBox.OnSearchSelectShow()"
102 onmouseout="return searchBox.OnSearchSelectHide()"
103 onkeydown="return searchBox.OnSearchSelectKey(event)">
104 <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Pages</a></div>
106 <!-- iframe showing the search results (closed by default) -->
107 <div id="MSearchResultsWindow">
108 <iframe src="javascript:void(0)" frameborder="0"
109 name="MSearchResults" id="MSearchResults">
114 <div class="headertitle">
115 <div class="title">FixedPoint.h</div> </div>
117 <div class="contents">
118 <a href="tests_2validation_2_fixed_point_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>
119 <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2017 ARM Limited.</span></div>
120 <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div>
121 <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * SPDX-License-Identifier: MIT</span></div>
122 <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div>
123 <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>
124 <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>
125 <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>
126 <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>
127 <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>
128 <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>
129 <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> *</span></div>
130 <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>
131 <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * copies or substantial portions of the Software.</span></div>
132 <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div>
133 <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>
134 <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>
135 <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>
136 <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>
137 <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>
138 <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>
139 <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * SOFTWARE.</span></div>
140 <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> */</span></div>
141 <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#ifndef __ARM_COMPUTE_TEST_VALIDATION_FIXEDPOINT_H__</span></div>
142 <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor"></span><span class="preprocessor">#define __ARM_COMPUTE_TEST_VALIDATION_FIXEDPOINT_H__</span></div>
143 <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor"></span></div>
144 <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include "<a class="code" href="_toolchain_support_8h.xhtml">support/ToolchainSupport.h</a>"</span></div>
145 <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include "<a class="code" href="tests_2_utils_8h.xhtml">tests/Utils.h</a>"</span></div>
146 <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div>
147 <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include <cassert></span></div>
148 <div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include <cstdint></span></div>
149 <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include <cstdlib></span></div>
150 <div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include <limits></span></div>
151 <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include <string></span></div>
152 <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include <type_traits></span></div>
153 <div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div>
154 <div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="keyword">namespace </span>arm_compute</div>
155 <div class="line"><a name="l00038"></a><span class="lineno"> 38</span> {</div>
156 <div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="keyword">namespace </span>test</div>
157 <div class="line"><a name="l00040"></a><span class="lineno"> 40</span> {</div>
158 <div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml"> 41</a></span> <span class="keyword">namespace </span>fixed_point_arithmetic</div>
159 <div class="line"><a name="l00042"></a><span class="lineno"> 42</span> {</div>
160 <div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml"> 43</a></span> <span class="keyword">namespace </span>detail</div>
161 <div class="line"><a name="l00044"></a><span class="lineno"> 44</span> {</div>
162 <div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment">// Forward declare structs</span></div>
163 <div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml">functions</a>;</div>
164 <div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
165 <div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml"> 48</a></span> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml">constant_expr</a>;</div>
166 <div class="line"><a name="l00049"></a><span class="lineno"> 49</span> }</div>
167 <div class="line"><a name="l00050"></a><span class="lineno"> 50</span> </div>
168 <div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits.xhtml"> 52</a></span> <span class="keyword">namespace </span>traits</div>
169 <div class="line"><a name="l00053"></a><span class="lineno"> 53</span> {</div>
170 <div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment">// Promote types</span></div>
171 <div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment">// *INDENT-OFF*</span></div>
172 <div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="comment">// clang-format off</span></div>
173 <div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml"> 57</a></span> <span class="keyword">template</span> <<span class="keyword">typename</span> T> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">promote</a> { };</div>
174 <div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint8__t_01_4.xhtml#a3085ed9ad7c9b1c88dcec24108730e54"> 58</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">promote</a><uint8_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint8__t_01_4.xhtml#a3085ed9ad7c9b1c88dcec24108730e54">type</a> = uint16_t; };</div>
175 <div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int8__t_01_4.xhtml#a8812bf779dca54354aa6ad00cef14a73"> 59</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">promote</a><int8_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int8__t_01_4.xhtml#a8812bf779dca54354aa6ad00cef14a73">type</a> = int16_t; };</div>
176 <div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint16__t_01_4.xhtml#a43022da9f622deba3284b748a6885e23"> 60</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">promote</a><uint16_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint16__t_01_4.xhtml#a43022da9f622deba3284b748a6885e23">type</a> = uint32_t; };</div>
177 <div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int16__t_01_4.xhtml#a4f14ffc6d6f6ca92afb1baf996fc9305"> 61</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">promote</a><int16_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int16__t_01_4.xhtml#a4f14ffc6d6f6ca92afb1baf996fc9305">type</a> = int32_t; };</div>
178 <div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint32__t_01_4.xhtml#a9659bbcc7fc016eda242219021c7980b"> 62</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">promote</a><uint32_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint32__t_01_4.xhtml#a9659bbcc7fc016eda242219021c7980b">type</a> = uint64_t; };</div>
179 <div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int32__t_01_4.xhtml#a70ca3d636283d6713220cd8af5fc07b3"> 63</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">promote</a><int32_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int32__t_01_4.xhtml#a70ca3d636283d6713220cd8af5fc07b3">type</a> = int64_t; };</div>
180 <div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint64__t_01_4.xhtml#a9659bbcc7fc016eda242219021c7980b"> 64</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">promote</a><uint64_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint64__t_01_4.xhtml#a9659bbcc7fc016eda242219021c7980b">type</a> = uint64_t; };</div>
181 <div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int64__t_01_4.xhtml#a70ca3d636283d6713220cd8af5fc07b3"> 65</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">promote</a><int64_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int64__t_01_4.xhtml#a70ca3d636283d6713220cd8af5fc07b3">type</a> = int64_t; };</div>
182 <div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
183 <div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits.xhtml#ac20ca549fa27b2eed44367745055a233"> 67</a></span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits.xhtml#ac20ca549fa27b2eed44367745055a233">promote_t</a> = <span class="keyword">typename</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">promote<T>::type</a>;</div>
184 <div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <span class="comment">// clang-format on</span></div>
185 <div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="comment">// *INDENT-ON*</span></div>
186 <div class="line"><a name="l00070"></a><span class="lineno"> 70</span> }</div>
187 <div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div>
188 <div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ff"> 73</a></span> <span class="keyword">enum class</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ff">OverflowPolicy</a></div>
189 <div class="line"><a name="l00074"></a><span class="lineno"> 74</span> {</div>
190 <div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffae1c8555fcf0ea2bb648a6fd527d658c0">WRAP</a>, </div>
191 <div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">SATURATE</a> </div>
192 <div class="line"><a name="l00077"></a><span class="lineno"> 77</span> };</div>
193 <div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#add6426cbf2e057a195846d4ba09a50be"> 79</a></span> <span class="keyword">enum class</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#add6426cbf2e057a195846d4ba09a50be">RoundingPolicy</a></div>
194 <div class="line"><a name="l00080"></a><span class="lineno"> 80</span> {</div>
195 <div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#add6426cbf2e057a195846d4ba09a50bea5631ad8e27788edfca7e13535d862c06">TO_ZERO</a>, </div>
196 <div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#add6426cbf2e057a195846d4ba09a50bea02ff1fff1812f84c89547fcd6c176150">TO_NEAREST_EVEN</a> </div>
197 <div class="line"><a name="l00083"></a><span class="lineno"> 83</span> };</div>
198 <div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div>
199 <div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
200 <div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml"> 87</a></span> <span class="keyword">class </span><a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a></div>
201 <div class="line"><a name="l00088"></a><span class="lineno"> 88</span> {</div>
202 <div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="keyword">public</span>:</div>
203 <div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="comment">// Static Checks</span></div>
204 <div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  static_assert(<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_integral<T>::value</a>, <span class="stringliteral">"Type is not an integer"</span>);</div>
205 <div class="line"><a name="l00092"></a><span class="lineno"> 92</span> </div>
206 <div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> U></div>
207 <div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#ad9fb776e0556cf222c31feb9f372ea32"> 99</a></span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#ad9fb776e0556cf222c31feb9f372ea32">fixed_point</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<U></a> val, uint8_t p)</div>
208 <div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  : _value(0), _fixed_point_position(p)</div>
209 <div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  {</div>
210 <div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  assert(p > 0 && p < std::numeric_limits<T>::digits);</div>
211 <div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  T v = 0;</div>
212 <div class="line"><a name="l00104"></a><span class="lineno"> 104</span> </div>
213 <div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keywordflow">if</span>(std::numeric_limits<T>::digits < std::numeric_limits<U>::digits)</div>
214 <div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  {</div>
215 <div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  val.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
216 <div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  v = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">detail::constant_expr<T>::saturate_cast</a>(val.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>());</div>
217 <div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  }</div>
218 <div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordflow">else</span></div>
219 <div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  {</div>
220 <div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keyword">auto</span> v_cast = <span class="keyword">static_cast<</span><a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a><span class="keyword">></span>(val);</div>
221 <div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  v_cast.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
222 <div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  v = v_cast.raw();</div>
223 <div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  }</div>
224 <div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  _value = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(v);</div>
225 <div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  }</div>
226 <div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">template <typename U, typename = typename std::enable_if<std::is_integral<U>::value</a>><a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">::type</a>></div>
227 <div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a2449f6f85fd30e253be0a03fa9c5baa4"> 125</a></span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a2449f6f85fd30e253be0a03fa9c5baa4">fixed_point</a>(U val, uint8_t p, <span class="keywordtype">bool</span> is_raw = <span class="keyword">false</span>)</div>
228 <div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  : _value(val << p), _fixed_point_position(p)</div>
229 <div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  {</div>
230 <div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordflow">if</span>(is_raw)</div>
231 <div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  {</div>
232 <div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  _value = val;</div>
233 <div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  }</div>
234 <div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  }</div>
235 <div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a5047b169040344c060aa685e9f63627c"> 138</a></span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a5047b169040344c060aa685e9f63627c">fixed_point</a>(<span class="keywordtype">float</span> val, uint8_t p)</div>
236 <div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  : _value(detail::constant_expr<T>::to_fixed(val, p)), _fixed_point_position(p)</div>
237 <div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  {</div>
238 <div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  assert(p > 0 && p < std::numeric_limits<T>::digits);</div>
239 <div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  }</div>
240 <div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a4c96f1365088f36447883d79469dc52b"> 148</a></span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a4c96f1365088f36447883d79469dc52b">fixed_point</a>(std::string str, uint8_t p)</div>
241 <div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  : _value(detail::constant_expr<T>::to_fixed(support::cpp11::<a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#aa4152693b62db2a43edcc0039de95e38">stof</a>(str), p)), _fixed_point_position(p)</div>
242 <div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  {</div>
243 <div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  assert(p > 0 && p < std::numeric_limits<T>::digits);</div>
244 <div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  }</div>
245 <div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> &<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#aac73fe4dd453222d7858e879f5a2871c">operator=</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> &) = <span class="keywordflow">default</span>;</div>
246 <div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> &<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#aac73fe4dd453222d7858e879f5a2871c">operator=</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> &&) = <span class="keywordflow">default</span>;</div>
247 <div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#ad9fb776e0556cf222c31feb9f372ea32">fixed_point</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> &) = <span class="keywordflow">default</span>;</div>
248 <div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#ad9fb776e0556cf222c31feb9f372ea32">fixed_point</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a> &&) = <span class="keywordflow">default</span>;</div>
249 <div class="line"><a name="l00161"></a><span class="lineno"> 161</span> </div>
250 <div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#ae80f6077a5ac6ce1710cda5b30039890"> 166</a></span>  <span class="keyword">operator</span> float()<span class="keyword"> const</span></div>
251 <div class="line"><a name="l00167"></a><span class="lineno"> 167</span> <span class="keyword"> </span>{</div>
252 <div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a995c73a5ff995cc1b4c0c730892c792a">detail::constant_expr<T>::to_float</a>(_value, _fixed_point_position);</div>
253 <div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  }</div>
254 <div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">template <typename U, typename = typename std::enable_if<std::is_integral<T>::value</a>><a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">::type</a>></div>
255 <div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a2dc268e2f29a84e2a777befb77128c1a"> 175</a></span>  <span class="keyword">operator</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">U</a>()<span class="keyword"> const</span></div>
256 <div class="line"><a name="l00176"></a><span class="lineno"> 176</span> <span class="keyword"> </span>{</div>
257 <div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a918ab57096fdfe5e2cbf70de5145b9fa">detail::constant_expr<T>::to_int</a>(_value, _fixed_point_position);</div>
258 <div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  }</div>
259 <div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> U></div>
260 <div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a7c0a35a6e4249b5d463ddb797dbe3ed8"> 184</a></span>  <span class="keyword">operator</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<U></a>()</div>
261 <div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  {</div>
262 <div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">U</a> val = <span class="keyword">static_cast<</span><a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">U</a><span class="keyword">></span>(_value);</div>
263 <div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <span class="keywordflow">if</span>(std::numeric_limits<U>::digits < std::numeric_limits<T>::digits)</div>
264 <div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  {</div>
265 <div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">detail::constant_expr<U>::saturate_cast</a>(_value);</div>
266 <div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  }</div>
267 <div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<U></a>(val, _fixed_point_position, <span class="keyword">true</span>);</div>
268 <div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  }</div>
269 <div class="line"><a name="l00193"></a><span class="lineno"> 193</span> </div>
270 <div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> U></div>
271 <div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a2654e1d67fbb9afb7fb00ee7ec521c11"> 201</a></span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a2654e1d67fbb9afb7fb00ee7ec521c11">operator+=</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<U></a> &rhs)</div>
272 <div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  {</div>
273 <div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> val(rhs, _fixed_point_position);</div>
274 <div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  _value += val.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>();</div>
275 <div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
276 <div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  }</div>
277 <div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> U></div>
278 <div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#af180cc5812cd005d63a4ec8eea34ae2e"> 214</a></span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#af180cc5812cd005d63a4ec8eea34ae2e">operator-=</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<U></a> &rhs)</div>
279 <div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  {</div>
280 <div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> val(rhs, _fixed_point_position);</div>
281 <div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  _value -= val.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>();</div>
282 <div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
283 <div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  }</div>
284 <div class="line"><a name="l00220"></a><span class="lineno"> 220</span> </div>
285 <div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0"> 225</a></span>  T <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>()<span class="keyword"> const</span></div>
286 <div class="line"><a name="l00226"></a><span class="lineno"> 226</span> <span class="keyword"> </span>{</div>
287 <div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="keywordflow">return</span> _value;</div>
288 <div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  }</div>
289 <div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9"> 233</a></span>  uint8_t <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>()<span class="keyword"> const</span></div>
290 <div class="line"><a name="l00234"></a><span class="lineno"> 234</span> <span class="keyword"> </span>{</div>
291 <div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keywordflow">return</span> _fixed_point_position;</div>
292 <div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  }</div>
293 <div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132"> 241</a></span>  <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(uint8_t p)</div>
294 <div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  {</div>
295 <div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  assert(p > 0 && p < std::numeric_limits<T>::digits);</div>
296 <div class="line"><a name="l00244"></a><span class="lineno"> 244</span> </div>
297 <div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">traits::promote<T>::type</a>;</div>
298 <div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  promoted_T val = _value;</div>
299 <div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="keywordflow">if</span>(p > _fixed_point_position)</div>
300 <div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  {</div>
301 <div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  val <<= (p - _fixed_point_position);</div>
302 <div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  }</div>
303 <div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(p < _fixed_point_position)</div>
304 <div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  {</div>
305 <div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  uint8_t pbar = _fixed_point_position - p;</div>
306 <div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  val += (pbar != 0) ? (1 << (pbar - 1)) : 0;</div>
307 <div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  val >>= pbar;</div>
308 <div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  }</div>
309 <div class="line"><a name="l00257"></a><span class="lineno"> 257</span> </div>
310 <div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  _value = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">detail::constant_expr<T>::saturate_cast</a>(val);</div>
311 <div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  _fixed_point_position = p;</div>
312 <div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  }</div>
313 <div class="line"><a name="l00261"></a><span class="lineno"> 261</span> </div>
314 <div class="line"><a name="l00262"></a><span class="lineno"> 262</span> <span class="keyword">private</span>:</div>
315 <div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  T _value; </div>
316 <div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  uint8_t _fixed_point_position; </div>
317 <div class="line"><a name="l00265"></a><span class="lineno"> 265</span> };</div>
318 <div class="line"><a name="l00266"></a><span class="lineno"> 266</span> </div>
319 <div class="line"><a name="l00267"></a><span class="lineno"> 267</span> <span class="keyword">namespace </span>detail</div>
320 <div class="line"><a name="l00268"></a><span class="lineno"> 268</span> {</div>
321 <div class="line"><a name="l00275"></a><span class="lineno"> 275</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
322 <div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa43c67a536c661ec28398d06bc8ba5af"> 276</a></span> constexpr <span class="keywordtype">int</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa43c67a536c661ec28398d06bc8ba5af">clz</a>(T <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a>)</div>
323 <div class="line"><a name="l00277"></a><span class="lineno"> 277</span> {</div>
324 <div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <span class="keyword">using</span> unsigned_T = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">std::make_unsigned<T>::type</a>;</div>
325 <div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="comment">// __builtin_clz is available for int. Need to correct reported number to</span></div>
326 <div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="comment">// match the original type.</span></div>
327 <div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keywordflow">return</span> __builtin_clz(value) - (32 - std::numeric_limits<unsigned_T>::digits);</div>
328 <div class="line"><a name="l00282"></a><span class="lineno"> 282</span> }</div>
329 <div class="line"><a name="l00283"></a><span class="lineno"> 283</span> </div>
330 <div class="line"><a name="l00284"></a><span class="lineno"> 284</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
331 <div class="line"><a name="l00285"></a><span class="lineno"> 285</span> <span class="keyword">struct </span>constant_expr</div>
332 <div class="line"><a name="l00286"></a><span class="lineno"> 286</span> {</div>
333 <div class="line"><a name="l00293"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a9c4b593f19fb9053fd52697eaa30c5d7"> 293</a></span>  <span class="keyword">static</span> constexpr T <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a9c4b593f19fb9053fd52697eaa30c5d7">fixed_one</a>(uint8_t p)</div>
334 <div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  {</div>
335 <div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="keywordflow">return</span> (1 << p);</div>
336 <div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  }</div>
337 <div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a125e978e1d6df0f6d9f738b0c580f980"> 303</a></span>  <span class="keyword">static</span> constexpr <span class="keywordtype">float</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a125e978e1d6df0f6d9f738b0c580f980">fixed_step</a>(uint8_t p)</div>
338 <div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  {</div>
339 <div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  <span class="keywordflow">return</span> (1.0f / static_cast<float>(1 << p));</div>
340 <div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  }</div>
341 <div class="line"><a name="l00307"></a><span class="lineno"> 307</span> </div>
342 <div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a995c73a5ff995cc1b4c0c730892c792a"> 315</a></span>  <span class="keyword">static</span> constexpr <span class="keywordtype">float</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a995c73a5ff995cc1b4c0c730892c792a">to_float</a>(T val, uint8_t p)</div>
343 <div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  {</div>
344 <div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(val * <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a125e978e1d6df0f6d9f738b0c580f980">fixed_step</a>(p));</div>
345 <div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  }</div>
346 <div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a918ab57096fdfe5e2cbf70de5145b9fa"> 326</a></span>  <span class="keyword">static</span> constexpr T <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a918ab57096fdfe5e2cbf70de5145b9fa">to_int</a>(T val, uint8_t p)</div>
347 <div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  {</div>
348 <div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  <span class="keywordflow">return</span> val >> p;</div>
349 <div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  }</div>
350 <div class="line"><a name="l00337"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a682a2eb8869b48647719e194cbbcb4e1"> 337</a></span>  <span class="keyword">static</span> constexpr T <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a682a2eb8869b48647719e194cbbcb4e1">to_fixed</a>(<span class="keywordtype">float</span> val, uint8_t p)</div>
351 <div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  {</div>
352 <div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  <span class="keywordflow">return</span> <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">saturate_cast</a><<span class="keywordtype">float</span>>(val * <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a9c4b593f19fb9053fd52697eaa30c5d7">fixed_one</a>(p) + ((val >= 0) ? 0.5 : -0.5)));</div>
353 <div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  }</div>
354 <div class="line"><a name="l00349"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a996cf0a2779076326d094ef9d75ddd1f"> 349</a></span>  <span class="keyword">static</span> constexpr T <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a996cf0a2779076326d094ef9d75ddd1f">clamp</a>(T val, T <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>, T <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>)</div>
355 <div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  {</div>
356 <div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::max</a>(val, min), max);</div>
357 <div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  }</div>
358 <div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> U></div>
359 <div class="line"><a name="l00360"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187"> 360</a></span>  <span class="keyword">static</span> constexpr T <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">saturate_cast</a>(U val)</div>
360 <div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  {</div>
361 <div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  <span class="keywordflow">return</span> <span class="keyword">static_cast<</span>T<span class="keyword">></span>(std::min<U>(std::max<U>(val, <span class="keyword">static_cast<</span><a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">U</a><span class="keyword">></span>(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::numeric_limits<T>::min</a>())), <span class="keyword">static_cast<</span><a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">U</a><span class="keyword">></span>(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits<T>::max</a>())));</div>
362 <div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  }</div>
363 <div class="line"><a name="l00364"></a><span class="lineno"> 364</span> };</div>
364 <div class="line"><a name="l00365"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml"> 365</a></span> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml">functions</a></div>
365 <div class="line"><a name="l00366"></a><span class="lineno"> 366</span> {</div>
366 <div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keyword">typename</span> traits></div>
367 <div class="line"><a name="l00375"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a69b97b34f32a6fc05665fc8605806326"> 375</a></span>  <span class="keyword">static</span> std::basic_ostream<T, traits> &<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a69b97b34f32a6fc05665fc8605806326">write</a>(std::basic_ostream<T, traits> &s, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<U></a> &x)</div>
368 <div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  {</div>
369 <div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="keywordflow">return</span> s << static_cast<float>(x);</div>
370 <div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  }</div>
371 <div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
372 <div class="line"><a name="l00386"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a9efa14731a55e3d96adb961214e91734"> 386</a></span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a9efa14731a55e3d96adb961214e91734">signbit</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x)</div>
373 <div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  {</div>
374 <div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  <span class="keywordflow">return</span> ((x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>() >> std::numeric_limits<T>::digits) != 0);</div>
375 <div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  }</div>
376 <div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
377 <div class="line"><a name="l00398"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a304fe6cc15deaffb14929e42a4ff1c1b"> 398</a></span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a304fe6cc15deaffb14929e42a4ff1c1b">isequal</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
378 <div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  {</div>
379 <div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>());</div>
380 <div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
381 <div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
382 <div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  <span class="keywordflow">return</span> (x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>() == y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>());</div>
383 <div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  }</div>
384 <div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
385 <div class="line"><a name="l00413"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a866dbf3e096ad4a487820a8945be3dfe"> 413</a></span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a866dbf3e096ad4a487820a8945be3dfe">isnotequal</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
386 <div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  {</div>
387 <div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <span class="keywordflow">return</span> !<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a304fe6cc15deaffb14929e42a4ff1c1b">isequal</a>(x, y);</div>
388 <div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  }</div>
389 <div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
390 <div class="line"><a name="l00425"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#abd7f7757b9edb7cdd017d439bc5ba8b0"> 425</a></span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#abd7f7757b9edb7cdd017d439bc5ba8b0">isgreater</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
391 <div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  {</div>
392 <div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>());</div>
393 <div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
394 <div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
395 <div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  <span class="keywordflow">return</span> (x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>() > y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>());</div>
396 <div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  }</div>
397 <div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
398 <div class="line"><a name="l00440"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a49abe87ad33d2900c2255e4b79322207"> 440</a></span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a49abe87ad33d2900c2255e4b79322207">isgreaterequal</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
399 <div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  {</div>
400 <div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>());</div>
401 <div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
402 <div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
403 <div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  <span class="keywordflow">return</span> (x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>() >= y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>());</div>
404 <div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  }</div>
405 <div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
406 <div class="line"><a name="l00455"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac4dcad0e940cf826063ba1f6ea659c07"> 455</a></span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac4dcad0e940cf826063ba1f6ea659c07">isless</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
407 <div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  {</div>
408 <div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>());</div>
409 <div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
410 <div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
411 <div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  <span class="keywordflow">return</span> (x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>() < y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>());</div>
412 <div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  }</div>
413 <div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
414 <div class="line"><a name="l00470"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a47e151d622ee6e71a0e731585b4fa7d8"> 470</a></span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a47e151d622ee6e71a0e731585b4fa7d8">islessequal</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
415 <div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  {</div>
416 <div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>());</div>
417 <div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
418 <div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
419 <div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  <span class="keywordflow">return</span> (x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>() <= y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>());</div>
420 <div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  }</div>
421 <div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
422 <div class="line"><a name="l00485"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a814cf7d89e7dad18b0625b4c914dc628"> 485</a></span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a814cf7d89e7dad18b0625b4c914dc628">islessgreater</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
423 <div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  {</div>
424 <div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a866dbf3e096ad4a487820a8945be3dfe">isnotequal</a>(x, y);</div>
425 <div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  }</div>
426 <div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
427 <div class="line"><a name="l00498"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a2d681ad37360fc4497f147af98951ba0"> 498</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a2d681ad37360fc4497f147af98951ba0">clamp</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, T <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>, T <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>)</div>
428 <div class="line"><a name="l00499"></a><span class="lineno"> 499</span>  {</div>
429 <div class="line"><a name="l00500"></a><span class="lineno"> 500</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a996cf0a2779076326d094ef9d75ddd1f">constant_expr<T>::clamp</a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>(), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>, <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>), x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), <span class="keyword">true</span>);</div>
430 <div class="line"><a name="l00501"></a><span class="lineno"> 501</span>  }</div>
431 <div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  <span class="keyword">template</span> <OverflowPolicy OP = OverflowPolicy::SATURATE, <span class="keyword">typename</span> T></div>
432 <div class="line"><a name="l00509"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#aa78731a2479da19c6604b3baa3ffe33d"> 509</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#aa78731a2479da19c6604b3baa3ffe33d">negate</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x)</div>
433 <div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  {</div>
434 <div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">traits::promote<T>::type</a>;</div>
435 <div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  promoted_T val = -x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>();</div>
436 <div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
437 <div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  {</div>
438 <div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr<T>::saturate_cast</a>(val);</div>
439 <div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  }</div>
440 <div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(val), x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), <span class="keyword">true</span>);</div>
441 <div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  }</div>
442 <div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  <span class="keyword">template</span> <OverflowPolicy OP = OverflowPolicy::SATURATE, <span class="keyword">typename</span> T></div>
443 <div class="line"><a name="l00527"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a"> 527</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
444 <div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  {</div>
445 <div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>());</div>
446 <div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
447 <div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
448 <div class="line"><a name="l00532"></a><span class="lineno"> 532</span>  <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
449 <div class="line"><a name="l00533"></a><span class="lineno"> 533</span>  {</div>
450 <div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  <span class="keyword">using</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a> = <span class="keyword">typename</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">traits::promote<T>::type</a>;</div>
451 <div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a> val = <span class="keyword">static_cast<</span><a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a><span class="keyword">></span>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>()) + static_cast<type>(y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>());</div>
452 <div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr<T>::saturate_cast</a>(val);</div>
453 <div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(val), p, <span class="keyword">true</span>);</div>
454 <div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  }</div>
455 <div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  <span class="keywordflow">else</span></div>
456 <div class="line"><a name="l00540"></a><span class="lineno"> 540</span>  {</div>
457 <div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>() + y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>(), p, <span class="keyword">true</span>);</div>
458 <div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  }</div>
459 <div class="line"><a name="l00543"></a><span class="lineno"> 543</span>  }</div>
460 <div class="line"><a name="l00551"></a><span class="lineno"> 551</span>  <span class="keyword">template</span> <OverflowPolicy OP = OverflowPolicy::SATURATE, <span class="keyword">typename</span> T></div>
461 <div class="line"><a name="l00552"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a287e18f5dec27ac32bfd30039a57dddf"> 552</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a287e18f5dec27ac32bfd30039a57dddf">sub</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
462 <div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  {</div>
463 <div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>());</div>
464 <div class="line"><a name="l00555"></a><span class="lineno"> 555</span>  x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
465 <div class="line"><a name="l00556"></a><span class="lineno"> 556</span>  y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">rescale</a>(p);</div>
466 <div class="line"><a name="l00557"></a><span class="lineno"> 557</span>  <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
467 <div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  {</div>
468 <div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  <span class="keyword">using</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a> = <span class="keyword">typename</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">traits::promote<T>::type</a>;</div>
469 <div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a> val = <span class="keyword">static_cast<</span><a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a><span class="keyword">></span>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>()) - static_cast<type>(y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>());</div>
470 <div class="line"><a name="l00561"></a><span class="lineno"> 561</span>  val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr<T>::saturate_cast</a>(val);</div>
471 <div class="line"><a name="l00562"></a><span class="lineno"> 562</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(val), p, <span class="keyword">true</span>);</div>
472 <div class="line"><a name="l00563"></a><span class="lineno"> 563</span>  }</div>
473 <div class="line"><a name="l00564"></a><span class="lineno"> 564</span>  <span class="keywordflow">else</span></div>
474 <div class="line"><a name="l00565"></a><span class="lineno"> 565</span>  {</div>
475 <div class="line"><a name="l00566"></a><span class="lineno"> 566</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>() - y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>(), p, <span class="keyword">true</span>);</div>
476 <div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  }</div>
477 <div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  }</div>
478 <div class="line"><a name="l00576"></a><span class="lineno"> 576</span>  <span class="keyword">template</span> <OverflowPolicy OP = OverflowPolicy::SATURATE, <span class="keyword">typename</span> T></div>
479 <div class="line"><a name="l00577"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221"> 577</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
480 <div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  {</div>
481 <div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">traits::promote<T>::type</a>;</div>
482 <div class="line"><a name="l00580"></a><span class="lineno"> 580</span>  uint8_t p_min = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>());</div>
483 <div class="line"><a name="l00581"></a><span class="lineno"> 581</span>  uint8_t p_max = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::max</a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>());</div>
484 <div class="line"><a name="l00582"></a><span class="lineno"> 582</span>  promoted_T round_factor = (1 << (p_max - 1));</div>
485 <div class="line"><a name="l00583"></a><span class="lineno"> 583</span>  promoted_T val = ((<span class="keyword">static_cast<</span>promoted_T<span class="keyword">></span>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>()) * static_cast<promoted_T>(y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>())) + round_factor) >> p_max;</div>
486 <div class="line"><a name="l00584"></a><span class="lineno"> 584</span>  <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
487 <div class="line"><a name="l00585"></a><span class="lineno"> 585</span>  {</div>
488 <div class="line"><a name="l00586"></a><span class="lineno"> 586</span>  val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr<T>::saturate_cast</a>(val);</div>
489 <div class="line"><a name="l00587"></a><span class="lineno"> 587</span>  }</div>
490 <div class="line"><a name="l00588"></a><span class="lineno"> 588</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(val), p_min, <span class="keyword">true</span>);</div>
491 <div class="line"><a name="l00589"></a><span class="lineno"> 589</span>  }</div>
492 <div class="line"><a name="l00597"></a><span class="lineno"> 597</span>  <span class="keyword">template</span> <OverflowPolicy OP = OverflowPolicy::SATURATE, <span class="keyword">typename</span> T></div>
493 <div class="line"><a name="l00598"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a72d043524e13bf27c605c2dee2e20a2a"> 598</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a72d043524e13bf27c605c2dee2e20a2a">div</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
494 <div class="line"><a name="l00599"></a><span class="lineno"> 599</span>  {</div>
495 <div class="line"><a name="l00600"></a><span class="lineno"> 600</span>  <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">traits::promote<T>::type</a>;</div>
496 <div class="line"><a name="l00601"></a><span class="lineno"> 601</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>());</div>
497 <div class="line"><a name="l00602"></a><span class="lineno"> 602</span>  promoted_T denom = <span class="keyword">static_cast<</span>promoted_T<span class="keyword">></span>(y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>());</div>
498 <div class="line"><a name="l00603"></a><span class="lineno"> 603</span>  <span class="keywordflow">if</span>(denom != 0)</div>
499 <div class="line"><a name="l00604"></a><span class="lineno"> 604</span>  {</div>
500 <div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  promoted_T val = (<span class="keyword">static_cast<</span>promoted_T<span class="keyword">></span>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>()) << <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::max</a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), y.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>())) / denom;</div>
501 <div class="line"><a name="l00606"></a><span class="lineno"> 606</span>  <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
502 <div class="line"><a name="l00607"></a><span class="lineno"> 607</span>  {</div>
503 <div class="line"><a name="l00608"></a><span class="lineno"> 608</span>  val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr<T>::saturate_cast</a>(val);</div>
504 <div class="line"><a name="l00609"></a><span class="lineno"> 609</span>  }</div>
505 <div class="line"><a name="l00610"></a><span class="lineno"> 610</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(val), p, <span class="keyword">true</span>);</div>
506 <div class="line"><a name="l00611"></a><span class="lineno"> 611</span>  }</div>
507 <div class="line"><a name="l00612"></a><span class="lineno"> 612</span>  <span class="keywordflow">else</span></div>
508 <div class="line"><a name="l00613"></a><span class="lineno"> 613</span>  {</div>
509 <div class="line"><a name="l00614"></a><span class="lineno"> 614</span>  T val = (x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>() < 0) ? <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::numeric_limits<T>::min</a>() : <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits<T>::max</a>();</div>
510 <div class="line"><a name="l00615"></a><span class="lineno"> 615</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(val, p, <span class="keyword">true</span>);</div>
511 <div class="line"><a name="l00616"></a><span class="lineno"> 616</span>  }</div>
512 <div class="line"><a name="l00617"></a><span class="lineno"> 617</span>  }</div>
513 <div class="line"><a name="l00625"></a><span class="lineno"> 625</span>  <span class="keyword">template</span> <OverflowPolicy OP = OverflowPolicy::SATURATE, <span class="keyword">typename</span> T></div>
514 <div class="line"><a name="l00626"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a0e0473f8d30d0a8067f9903430ddcd85"> 626</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a0e0473f8d30d0a8067f9903430ddcd85">shift_left</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <span class="keywordtype">size_t</span> shift)</div>
515 <div class="line"><a name="l00627"></a><span class="lineno"> 627</span>  {</div>
516 <div class="line"><a name="l00628"></a><span class="lineno"> 628</span>  <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">traits::promote<T>::type</a>;</div>
517 <div class="line"><a name="l00629"></a><span class="lineno"> 629</span>  promoted_T val = <span class="keyword">static_cast<</span>promoted_T<span class="keyword">></span>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>()) << shift;</div>
518 <div class="line"><a name="l00630"></a><span class="lineno"> 630</span>  <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
519 <div class="line"><a name="l00631"></a><span class="lineno"> 631</span>  {</div>
520 <div class="line"><a name="l00632"></a><span class="lineno"> 632</span>  val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr<T>::saturate_cast</a>(val);</div>
521 <div class="line"><a name="l00633"></a><span class="lineno"> 633</span>  }</div>
522 <div class="line"><a name="l00634"></a><span class="lineno"> 634</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(val), x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), <span class="keyword">true</span>);</div>
523 <div class="line"><a name="l00635"></a><span class="lineno"> 635</span>  }</div>
524 <div class="line"><a name="l00643"></a><span class="lineno"> 643</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
525 <div class="line"><a name="l00644"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6"> 644</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">shift_right</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <span class="keywordtype">size_t</span> shift)</div>
526 <div class="line"><a name="l00645"></a><span class="lineno"> 645</span>  {</div>
527 <div class="line"><a name="l00646"></a><span class="lineno"> 646</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>() >> shift, x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), <span class="keyword">true</span>);</div>
528 <div class="line"><a name="l00647"></a><span class="lineno"> 647</span>  }</div>
529 <div class="line"><a name="l00654"></a><span class="lineno"> 654</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
530 <div class="line"><a name="l00655"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3c04cac868606ed11c00761f0d5b3d2c"> 655</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3c04cac868606ed11c00761f0d5b3d2c">abs</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x)</div>
531 <div class="line"><a name="l00656"></a><span class="lineno"> 656</span>  {</div>
532 <div class="line"><a name="l00657"></a><span class="lineno"> 657</span>  <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">traits::promote<T>::type</a>;</div>
533 <div class="line"><a name="l00658"></a><span class="lineno"> 658</span>  T val = (x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>() < 0) ? <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml">constant_expr<T>::saturate_cast</a>(-static_cast<promoted_T>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>())) : x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>();</div>
534 <div class="line"><a name="l00659"></a><span class="lineno"> 659</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(val, x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>(), <span class="keyword">true</span>);</div>
535 <div class="line"><a name="l00660"></a><span class="lineno"> 660</span>  }</div>
536 <div class="line"><a name="l00667"></a><span class="lineno"> 667</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
537 <div class="line"><a name="l00668"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a33520868a877b6b9a1beccdc1aaa4ec6"> 668</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a33520868a877b6b9a1beccdc1aaa4ec6">log</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x)</div>
538 <div class="line"><a name="l00669"></a><span class="lineno"> 669</span>  {</div>
539 <div class="line"><a name="l00670"></a><span class="lineno"> 670</span>  uint8_t p = x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>();</div>
540 <div class="line"><a name="l00671"></a><span class="lineno"> 671</span>  <span class="keyword">auto</span> const_one = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(1), p);</div>
541 <div class="line"><a name="l00672"></a><span class="lineno"> 672</span> </div>
542 <div class="line"><a name="l00673"></a><span class="lineno"> 673</span>  <span class="comment">// Logarithm of 1 is zero and logarithm of negative values is not defined in R, so return 0.</span></div>
543 <div class="line"><a name="l00674"></a><span class="lineno"> 674</span>  <span class="comment">// Also, log(x) == -log(1/x) for 0 < x < 1.</span></div>
544 <div class="line"><a name="l00675"></a><span class="lineno"> 675</span>  <span class="keywordflow">if</span>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a304fe6cc15deaffb14929e42a4ff1c1b">isequal</a>(x, const_one) || <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a47e151d622ee6e71a0e731585b4fa7d8">islessequal</a>(x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(static_cast<T>(0), p)))</div>
545 <div class="line"><a name="l00676"></a><span class="lineno"> 676</span>  {</div>
546 <div class="line"><a name="l00677"></a><span class="lineno"> 677</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(0), p, <span class="keyword">true</span>);</div>
547 <div class="line"><a name="l00678"></a><span class="lineno"> 678</span>  }</div>
548 <div class="line"><a name="l00679"></a><span class="lineno"> 679</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac4dcad0e940cf826063ba1f6ea659c07">isless</a>(x, const_one))</div>
549 <div class="line"><a name="l00680"></a><span class="lineno"> 680</span>  {</div>
550 <div class="line"><a name="l00681"></a><span class="lineno"> 681</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a33520868a877b6b9a1beccdc1aaa4ec6">log</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a72d043524e13bf27c605c2dee2e20a2a">div</a>(const_one, x)), <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(-1, p));</div>
551 <div class="line"><a name="l00682"></a><span class="lineno"> 682</span>  }</div>
552 <div class="line"><a name="l00683"></a><span class="lineno"> 683</span> </div>
553 <div class="line"><a name="l00684"></a><span class="lineno"> 684</span>  <span class="comment">// Remove even powers of 2</span></div>
554 <div class="line"><a name="l00685"></a><span class="lineno"> 685</span>  T shift_val = 31 - __builtin_clz(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>() >> p);</div>
555 <div class="line"><a name="l00686"></a><span class="lineno"> 686</span>  x = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">shift_right</a>(x, shift_val);</div>
556 <div class="line"><a name="l00687"></a><span class="lineno"> 687</span>  x = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a287e18f5dec27ac32bfd30039a57dddf">sub</a>(x, const_one);</div>
557 <div class="line"><a name="l00688"></a><span class="lineno"> 688</span> </div>
558 <div class="line"><a name="l00689"></a><span class="lineno"> 689</span>  <span class="comment">// Constants</span></div>
559 <div class="line"><a name="l00690"></a><span class="lineno"> 690</span>  <span class="keyword">auto</span> ln2 = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(0.6931471, p);</div>
560 <div class="line"><a name="l00691"></a><span class="lineno"> 691</span>  <span class="keyword">auto</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29">A</a> = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(1.4384189, p);</div>
561 <div class="line"><a name="l00692"></a><span class="lineno"> 692</span>  <span class="keyword">auto</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">B</a> = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(-0.67719, p);</div>
562 <div class="line"><a name="l00693"></a><span class="lineno"> 693</span>  <span class="keyword">auto</span> C = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(0.3218538, p);</div>
563 <div class="line"><a name="l00694"></a><span class="lineno"> 694</span>  <span class="keyword">auto</span> D = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(-0.0832229, p);</div>
564 <div class="line"><a name="l00695"></a><span class="lineno"> 695</span> </div>
565 <div class="line"><a name="l00696"></a><span class="lineno"> 696</span>  <span class="comment">// Polynomial expansion</span></div>
566 <div class="line"><a name="l00697"></a><span class="lineno"> 697</span>  <span class="keyword">auto</span> <a class="code" href="reduction__operation_8cl.xhtml#ab0df00f5333da51860deb93deb44a782">sum</a> = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(x, D), C);</div>
567 <div class="line"><a name="l00698"></a><span class="lineno"> 698</span>  sum = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(x, sum), B);</div>
568 <div class="line"><a name="l00699"></a><span class="lineno"> 699</span>  sum = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(x, sum), A);</div>
569 <div class="line"><a name="l00700"></a><span class="lineno"> 700</span>  sum = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(x, sum);</div>
570 <div class="line"><a name="l00701"></a><span class="lineno"> 701</span> </div>
571 <div class="line"><a name="l00702"></a><span class="lineno"> 702</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(sum, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(static_cast<T>(shift_val), p)), ln2);</div>
572 <div class="line"><a name="l00703"></a><span class="lineno"> 703</span>  }</div>
573 <div class="line"><a name="l00714"></a><span class="lineno"> 714</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
574 <div class="line"><a name="l00715"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac66bdd16622d4498cc0299db1efcef54"> 715</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac66bdd16622d4498cc0299db1efcef54">exp</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x)</div>
575 <div class="line"><a name="l00716"></a><span class="lineno"> 716</span>  {</div>
576 <div class="line"><a name="l00717"></a><span class="lineno"> 717</span>  uint8_t p = x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>();</div>
577 <div class="line"><a name="l00718"></a><span class="lineno"> 718</span>  <span class="comment">// Constants</span></div>
578 <div class="line"><a name="l00719"></a><span class="lineno"> 719</span>  <span class="keyword">auto</span> const_one = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(1, p);</div>
579 <div class="line"><a name="l00720"></a><span class="lineno"> 720</span>  <span class="keyword">auto</span> ln2 = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(0.6931471, p);</div>
580 <div class="line"><a name="l00721"></a><span class="lineno"> 721</span>  <span class="keyword">auto</span> inv_ln2 = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(1.442695, p);</div>
581 <div class="line"><a name="l00722"></a><span class="lineno"> 722</span>  <span class="keyword">auto</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29">A</a> = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(0.9978546, p);</div>
582 <div class="line"><a name="l00723"></a><span class="lineno"> 723</span>  <span class="keyword">auto</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">B</a> = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(0.4994721, p);</div>
583 <div class="line"><a name="l00724"></a><span class="lineno"> 724</span>  <span class="keyword">auto</span> C = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(0.1763723, p);</div>
584 <div class="line"><a name="l00725"></a><span class="lineno"> 725</span>  <span class="keyword">auto</span> D = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(0.0435108, p);</div>
585 <div class="line"><a name="l00726"></a><span class="lineno"> 726</span> </div>
586 <div class="line"><a name="l00727"></a><span class="lineno"> 727</span>  T scaled_int_part = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a918ab57096fdfe5e2cbf70de5145b9fa">detail::constant_expr<T>::to_int</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(x, inv_ln2).raw(), p);</div>
587 <div class="line"><a name="l00728"></a><span class="lineno"> 728</span> </div>
588 <div class="line"><a name="l00729"></a><span class="lineno"> 729</span>  <span class="comment">// Polynomial expansion</span></div>
589 <div class="line"><a name="l00730"></a><span class="lineno"> 730</span>  <span class="keyword">auto</span> frac_part = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a287e18f5dec27ac32bfd30039a57dddf">sub</a>(x, <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(ln2, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(scaled_int_part, p)));</div>
590 <div class="line"><a name="l00731"></a><span class="lineno"> 731</span>  <span class="keyword">auto</span> taylor = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(frac_part, D), C);</div>
591 <div class="line"><a name="l00732"></a><span class="lineno"> 732</span>  taylor = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(frac_part, taylor), B);</div>
592 <div class="line"><a name="l00733"></a><span class="lineno"> 733</span>  taylor = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(frac_part, taylor), A);</div>
593 <div class="line"><a name="l00734"></a><span class="lineno"> 734</span>  taylor = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(frac_part, taylor);</div>
594 <div class="line"><a name="l00735"></a><span class="lineno"> 735</span>  taylor = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(taylor, const_one);</div>
595 <div class="line"><a name="l00736"></a><span class="lineno"> 736</span> </div>
596 <div class="line"><a name="l00737"></a><span class="lineno"> 737</span>  <span class="comment">// Saturate value</span></div>
597 <div class="line"><a name="l00738"></a><span class="lineno"> 738</span>  <span class="keywordflow">if</span>(static_cast<T>(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa43c67a536c661ec28398d06bc8ba5af">clz</a>(taylor.raw())) <= scaled_int_part)</div>
598 <div class="line"><a name="l00739"></a><span class="lineno"> 739</span>  {</div>
599 <div class="line"><a name="l00740"></a><span class="lineno"> 740</span>  <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits<T>::max</a>(), p, <span class="keyword">true</span>);</div>
600 <div class="line"><a name="l00741"></a><span class="lineno"> 741</span>  }</div>
601 <div class="line"><a name="l00742"></a><span class="lineno"> 742</span> </div>
602 <div class="line"><a name="l00743"></a><span class="lineno"> 743</span>  <span class="keywordflow">return</span> (scaled_int_part < 0) ? <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">shift_right</a>(taylor, -scaled_int_part) : <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a0e0473f8d30d0a8067f9903430ddcd85">shift_left</a>(taylor, scaled_int_part);</div>
603 <div class="line"><a name="l00744"></a><span class="lineno"> 744</span>  }</div>
604 <div class="line"><a name="l00751"></a><span class="lineno"> 751</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
605 <div class="line"><a name="l00752"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a6a7c1ca385d21fe457259a8fd9debfbf"> 752</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a6a7c1ca385d21fe457259a8fd9debfbf">inv_sqrt</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x)</div>
606 <div class="line"><a name="l00753"></a><span class="lineno"> 753</span>  {</div>
607 <div class="line"><a name="l00754"></a><span class="lineno"> 754</span>  <span class="keyword">const</span> uint8_t p = x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>();</div>
608 <div class="line"><a name="l00755"></a><span class="lineno"> 755</span>  int8_t shift = std::numeric_limits<T>::digits - (p + <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa43c67a536c661ec28398d06bc8ba5af">detail::clz</a>(x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">raw</a>()));</div>
609 <div class="line"><a name="l00756"></a><span class="lineno"> 756</span> </div>
610 <div class="line"><a name="l00757"></a><span class="lineno"> 757</span>  shift += std::numeric_limits<T>::is_signed ? 1 : 0;</div>
611 <div class="line"><a name="l00758"></a><span class="lineno"> 758</span> </div>
612 <div class="line"><a name="l00759"></a><span class="lineno"> 759</span>  <span class="comment">// Use volatile to restrict compiler optimizations on shift as compiler reports maybe-uninitialized error on Android</span></div>
613 <div class="line"><a name="l00760"></a><span class="lineno"> 760</span>  <span class="keyword">volatile</span> int8_t *shift_ptr = &shift;</div>
614 <div class="line"><a name="l00761"></a><span class="lineno"> 761</span> </div>
615 <div class="line"><a name="l00762"></a><span class="lineno"> 762</span>  <span class="keyword">auto</span> const_three = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(3, p);</div>
616 <div class="line"><a name="l00763"></a><span class="lineno"> 763</span>  <span class="keyword">auto</span> a = (*shift_ptr < 0) ? <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a0e0473f8d30d0a8067f9903430ddcd85">shift_left</a>(x, -(shift)) : <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">shift_right</a>(x, shift);</div>
617 <div class="line"><a name="l00764"></a><span class="lineno"> 764</span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x2 = a;</div>
618 <div class="line"><a name="l00765"></a><span class="lineno"> 765</span> </div>
619 <div class="line"><a name="l00766"></a><span class="lineno"> 766</span>  <span class="comment">// We need three iterations to find the result for QS8 and five for QS16</span></div>
620 <div class="line"><a name="l00767"></a><span class="lineno"> 767</span>  constexpr <span class="keywordtype">int</span> num_iterations = <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same<T, int8_t>::value</a> ? 3 : 5;</div>
621 <div class="line"><a name="l00768"></a><span class="lineno"> 768</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i < num_iterations; ++i)</div>
622 <div class="line"><a name="l00769"></a><span class="lineno"> 769</span>  {</div>
623 <div class="line"><a name="l00770"></a><span class="lineno"> 770</span>  <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> three_minus_dx = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a287e18f5dec27ac32bfd30039a57dddf">sub</a>(const_three, <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(a, <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(x2, x2)));</div>
624 <div class="line"><a name="l00771"></a><span class="lineno"> 771</span>  x2 = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">shift_right</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(x2, three_minus_dx), 1);</div>
625 <div class="line"><a name="l00772"></a><span class="lineno"> 772</span>  }</div>
626 <div class="line"><a name="l00773"></a><span class="lineno"> 773</span> </div>
627 <div class="line"><a name="l00774"></a><span class="lineno"> 774</span>  <span class="keywordflow">return</span> (shift < 0) ? <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a0e0473f8d30d0a8067f9903430ddcd85">shift_left</a>(x2, (-shift) >> 1) : <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">shift_right</a>(x2, shift >> 1);</div>
628 <div class="line"><a name="l00775"></a><span class="lineno"> 775</span>  }</div>
629 <div class="line"><a name="l00782"></a><span class="lineno"> 782</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
630 <div class="line"><a name="l00783"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3260014222a62b212c096956c0605fd5"> 783</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3260014222a62b212c096956c0605fd5">tanh</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x)</div>
631 <div class="line"><a name="l00784"></a><span class="lineno"> 784</span>  {</div>
632 <div class="line"><a name="l00785"></a><span class="lineno"> 785</span>  uint8_t p = x.<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">precision</a>();</div>
633 <div class="line"><a name="l00786"></a><span class="lineno"> 786</span>  <span class="comment">// Constants</span></div>
634 <div class="line"><a name="l00787"></a><span class="lineno"> 787</span>  <span class="keyword">auto</span> const_one = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(1, p);</div>
635 <div class="line"><a name="l00788"></a><span class="lineno"> 788</span>  <span class="keyword">auto</span> const_two = <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a>(2, p);</div>
636 <div class="line"><a name="l00789"></a><span class="lineno"> 789</span> </div>
637 <div class="line"><a name="l00790"></a><span class="lineno"> 790</span>  <span class="keyword">auto</span> exp2x = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac66bdd16622d4498cc0299db1efcef54">exp</a>(const_two * x);</div>
638 <div class="line"><a name="l00791"></a><span class="lineno"> 791</span>  <span class="keyword">auto</span> num = exp2x - const_one;</div>
639 <div class="line"><a name="l00792"></a><span class="lineno"> 792</span>  <span class="keyword">auto</span> den = exp2x + const_one;</div>
640 <div class="line"><a name="l00793"></a><span class="lineno"> 793</span>  <span class="keyword">auto</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3260014222a62b212c096956c0605fd5">tanh</a> = num / den;</div>
641 <div class="line"><a name="l00794"></a><span class="lineno"> 794</span> </div>
642 <div class="line"><a name="l00795"></a><span class="lineno"> 795</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3260014222a62b212c096956c0605fd5">tanh</a>;</div>
643 <div class="line"><a name="l00796"></a><span class="lineno"> 796</span>  }</div>
644 <div class="line"><a name="l00806"></a><span class="lineno"> 806</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
645 <div class="line"><a name="l00807"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a74f7a6f0b0c31beaf3a0bc13e991b1c3"> 807</a></span>  <span class="keyword">static</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a74f7a6f0b0c31beaf3a0bc13e991b1c3">pow</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> a)</div>
646 <div class="line"><a name="l00808"></a><span class="lineno"> 808</span>  {</div>
647 <div class="line"><a name="l00809"></a><span class="lineno"> 809</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac66bdd16622d4498cc0299db1efcef54">exp</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a33520868a877b6b9a1beccdc1aaa4ec6">log</a>(x) * a);</div>
648 <div class="line"><a name="l00810"></a><span class="lineno"> 810</span>  }</div>
649 <div class="line"><a name="l00811"></a><span class="lineno"> 811</span> };</div>
650 <div class="line"><a name="l00812"></a><span class="lineno"> 812</span> </div>
651 <div class="line"><a name="l00813"></a><span class="lineno"> 813</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
652 <div class="line"><a name="l00814"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aff130425a85235bea11508b51ddb16de"> 814</a></span> <span class="keywordtype">bool</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aff130425a85235bea11508b51ddb16de">operator==</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &lhs, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &rhs)</div>
653 <div class="line"><a name="l00815"></a><span class="lineno"> 815</span> {</div>
654 <div class="line"><a name="l00816"></a><span class="lineno"> 816</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a304fe6cc15deaffb14929e42a4ff1c1b">functions::isequal</a>(lhs, rhs);</div>
655 <div class="line"><a name="l00817"></a><span class="lineno"> 817</span> }</div>
656 <div class="line"><a name="l00818"></a><span class="lineno"> 818</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
657 <div class="line"><a name="l00819"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a3d0ef475c458544f4ac7b56060f62f6e"> 819</a></span> <span class="keywordtype">bool</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a3d0ef475c458544f4ac7b56060f62f6e">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &lhs, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &rhs)</div>
658 <div class="line"><a name="l00820"></a><span class="lineno"> 820</span> {</div>
659 <div class="line"><a name="l00821"></a><span class="lineno"> 821</span>  <span class="keywordflow">return</span> !<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aff130425a85235bea11508b51ddb16de">operator==</a>(lhs, rhs);</div>
660 <div class="line"><a name="l00822"></a><span class="lineno"> 822</span> }</div>
661 <div class="line"><a name="l00823"></a><span class="lineno"> 823</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
662 <div class="line"><a name="l00824"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae9376d2e967c5c8067c6c72e7590ff01"> 824</a></span> <span class="keywordtype">bool</span> operator<(const fixed_point<T> &lhs, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &rhs)</div>
663 <div class="line"><a name="l00825"></a><span class="lineno"> 825</span> {</div>
664 <div class="line"><a name="l00826"></a><span class="lineno"> 826</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac4dcad0e940cf826063ba1f6ea659c07">functions::isless</a>(lhs, rhs);</div>
665 <div class="line"><a name="l00827"></a><span class="lineno"> 827</span> }</div>
666 <div class="line"><a name="l00828"></a><span class="lineno"> 828</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
667 <div class="line"><a name="l00829"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa4abd4e21ed690ccf2ba19cfe2ceefd2"> 829</a></span> <span class="keywordtype">bool</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa4abd4e21ed690ccf2ba19cfe2ceefd2">operator></a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &lhs, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &rhs)</div>
668 <div class="line"><a name="l00830"></a><span class="lineno"> 830</span> {</div>
669 <div class="line"><a name="l00831"></a><span class="lineno"> 831</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae9376d2e967c5c8067c6c72e7590ff01">operator<</a>(rhs, lhs);</div>
670 <div class="line"><a name="l00832"></a><span class="lineno"> 832</span> }</div>
671 <div class="line"><a name="l00833"></a><span class="lineno"> 833</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
672 <div class="line"><a name="l00834"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa8531b7f30573f513bbc997210559ab4"> 834</a></span> <span class="keywordtype">bool</span> operator<=(const fixed_point<T> &lhs, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &rhs)</div>
673 <div class="line"><a name="l00835"></a><span class="lineno"> 835</span> {</div>
674 <div class="line"><a name="l00836"></a><span class="lineno"> 836</span>  <span class="keywordflow">return</span> !<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa4abd4e21ed690ccf2ba19cfe2ceefd2">operator></a>(lhs, rhs);</div>
675 <div class="line"><a name="l00837"></a><span class="lineno"> 837</span> }</div>
676 <div class="line"><a name="l00838"></a><span class="lineno"> 838</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
677 <div class="line"><a name="l00839"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a6d4fc292ad316f39f20eb42393bad855"> 839</a></span> <span class="keywordtype">bool</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a6d4fc292ad316f39f20eb42393bad855">operator>=</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &lhs, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &rhs)</div>
678 <div class="line"><a name="l00840"></a><span class="lineno"> 840</span> {</div>
679 <div class="line"><a name="l00841"></a><span class="lineno"> 841</span>  <span class="keywordflow">return</span> !<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae9376d2e967c5c8067c6c72e7590ff01">operator<</a>(lhs, rhs);</div>
680 <div class="line"><a name="l00842"></a><span class="lineno"> 842</span> }</div>
681 <div class="line"><a name="l00843"></a><span class="lineno"> 843</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
682 <div class="line"><a name="l00844"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad702cf90d6fc9245b3d921dc09ccb76f"> 844</a></span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad702cf90d6fc9245b3d921dc09ccb76f">operator+</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &lhs, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &rhs)</div>
683 <div class="line"><a name="l00845"></a><span class="lineno"> 845</span> {</div>
684 <div class="line"><a name="l00846"></a><span class="lineno"> 846</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">functions::add</a>(lhs, rhs);</div>
685 <div class="line"><a name="l00847"></a><span class="lineno"> 847</span> }</div>
686 <div class="line"><a name="l00848"></a><span class="lineno"> 848</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
687 <div class="line"><a name="l00849"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a8cce3682a30b4a89af6ebf94e655f954"> 849</a></span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a8cce3682a30b4a89af6ebf94e655f954">operator-</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &lhs, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &rhs)</div>
688 <div class="line"><a name="l00850"></a><span class="lineno"> 850</span> {</div>
689 <div class="line"><a name="l00851"></a><span class="lineno"> 851</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a287e18f5dec27ac32bfd30039a57dddf">functions::sub</a>(lhs, rhs);</div>
690 <div class="line"><a name="l00852"></a><span class="lineno"> 852</span> }</div>
691 <div class="line"><a name="l00853"></a><span class="lineno"> 853</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
692 <div class="line"><a name="l00854"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a8143daf512f44a9403c8cd604df1b8f1"> 854</a></span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a8cce3682a30b4a89af6ebf94e655f954">operator-</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> &rhs)</div>
693 <div class="line"><a name="l00855"></a><span class="lineno"> 855</span> {</div>
694 <div class="line"><a name="l00856"></a><span class="lineno"> 856</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#aa78731a2479da19c6604b3baa3ffe33d">functions::negate</a>(rhs);</div>
695 <div class="line"><a name="l00857"></a><span class="lineno"> 857</span> }</div>
696 <div class="line"><a name="l00858"></a><span class="lineno"> 858</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
697 <div class="line"><a name="l00859"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#acdde00e55846c9f6704f87b9d2112cce"> 859</a></span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#acdde00e55846c9f6704f87b9d2112cce">operator*</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
698 <div class="line"><a name="l00860"></a><span class="lineno"> 860</span> {</div>
699 <div class="line"><a name="l00861"></a><span class="lineno"> 861</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">functions::mul</a>(x, y);</div>
700 <div class="line"><a name="l00862"></a><span class="lineno"> 862</span> }</div>
701 <div class="line"><a name="l00863"></a><span class="lineno"> 863</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
702 <div class="line"><a name="l00864"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a5f37e666dcd38888952f32592e93c2cb"> 864</a></span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a5f37e666dcd38888952f32592e93c2cb">operator/</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
703 <div class="line"><a name="l00865"></a><span class="lineno"> 865</span> {</div>
704 <div class="line"><a name="l00866"></a><span class="lineno"> 866</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a72d043524e13bf27c605c2dee2e20a2a">functions::div</a>(x, y);</div>
705 <div class="line"><a name="l00867"></a><span class="lineno"> 867</span> }</div>
706 <div class="line"><a name="l00868"></a><span class="lineno"> 868</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
707 <div class="line"><a name="l00869"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a26723c21135a6a96f98a9dc41143044d"> 869</a></span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a26723c21135a6a96f98a9dc41143044d">operator>></a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <span class="keywordtype">size_t</span> shift)</div>
708 <div class="line"><a name="l00870"></a><span class="lineno"> 870</span> {</div>
709 <div class="line"><a name="l00871"></a><span class="lineno"> 871</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">functions::shift_right</a>(x, shift);</div>
710 <div class="line"><a name="l00872"></a><span class="lineno"> 872</span> }</div>
711 <div class="line"><a name="l00873"></a><span class="lineno"> 873</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
712 <div class="line"><a name="l00874"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a9f5efc525bf714ab8538dc97fea1d1e4"> 874</a></span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> operator<<(fixed_point<T> x, <span class="keywordtype">size_t</span> shift)</div>
713 <div class="line"><a name="l00875"></a><span class="lineno"> 875</span> {</div>
714 <div class="line"><a name="l00876"></a><span class="lineno"> 876</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a0e0473f8d30d0a8067f9903430ddcd85">functions::shift_left</a>(x, shift);</div>
715 <div class="line"><a name="l00877"></a><span class="lineno"> 877</span> }</div>
716 <div class="line"><a name="l00878"></a><span class="lineno"> 878</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> U, <span class="keyword">typename</span> traits></div>
717 <div class="line"><a name="l00879"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a2716b652645cadf2a460c1259ccf7235"> 879</a></span> std::basic_ostream<T, traits> &operator<<(std::basic_ostream<T, traits> &s, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<U></a> x)</div>
718 <div class="line"><a name="l00880"></a><span class="lineno"> 880</span> {</div>
719 <div class="line"><a name="l00881"></a><span class="lineno"> 881</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a69b97b34f32a6fc05665fc8605806326">functions::write</a>(s, x);</div>
720 <div class="line"><a name="l00882"></a><span class="lineno"> 882</span> }</div>
721 <div class="line"><a name="l00883"></a><span class="lineno"> 883</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
722 <div class="line"><a name="l00884"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5"> 884</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
723 <div class="line"><a name="l00885"></a><span class="lineno"> 885</span> {</div>
724 <div class="line"><a name="l00886"></a><span class="lineno"> 886</span>  <span class="keywordflow">return</span> x > y ? y : x;</div>
725 <div class="line"><a name="l00887"></a><span class="lineno"> 887</span> }</div>
726 <div class="line"><a name="l00888"></a><span class="lineno"> 888</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
727 <div class="line"><a name="l00889"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849"> 889</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
728 <div class="line"><a name="l00890"></a><span class="lineno"> 890</span> {</div>
729 <div class="line"><a name="l00891"></a><span class="lineno"> 891</span>  <span class="keywordflow">return</span> x > y ? x : y;</div>
730 <div class="line"><a name="l00892"></a><span class="lineno"> 892</span> }</div>
731 <div class="line"><a name="l00893"></a><span class="lineno"> 893</span> <span class="keyword">template</span> <OverflowPolicy OP = OverflowPolicy::SATURATE, <span class="keyword">typename</span> T></div>
732 <div class="line"><a name="l00894"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a9d91c0affa9bc1921abc949791c514c0"> 894</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a9d91c0affa9bc1921abc949791c514c0">add</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
733 <div class="line"><a name="l00895"></a><span class="lineno"> 895</span> {</div>
734 <div class="line"><a name="l00896"></a><span class="lineno"> 896</span>  <span class="keywordflow">return</span> functions::add<OP>(x, y);</div>
735 <div class="line"><a name="l00897"></a><span class="lineno"> 897</span> }</div>
736 <div class="line"><a name="l00898"></a><span class="lineno"> 898</span> <span class="keyword">template</span> <OverflowPolicy OP = OverflowPolicy::SATURATE, <span class="keyword">typename</span> T></div>
737 <div class="line"><a name="l00899"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a42e82c32ccdbc5bc2899bc5cd3b04e27"> 899</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a42e82c32ccdbc5bc2899bc5cd3b04e27">sub</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
738 <div class="line"><a name="l00900"></a><span class="lineno"> 900</span> {</div>
739 <div class="line"><a name="l00901"></a><span class="lineno"> 901</span>  <span class="keywordflow">return</span> functions::sub<OP>(x, y);</div>
740 <div class="line"><a name="l00902"></a><span class="lineno"> 902</span> }</div>
741 <div class="line"><a name="l00903"></a><span class="lineno"> 903</span> <span class="keyword">template</span> <OverflowPolicy OP = OverflowPolicy::SATURATE, <span class="keyword">typename</span> T></div>
742 <div class="line"><a name="l00904"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a8d71db736fe80cae37a9c94c57b34ed6"> 904</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a8d71db736fe80cae37a9c94c57b34ed6">mul</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
743 <div class="line"><a name="l00905"></a><span class="lineno"> 905</span> {</div>
744 <div class="line"><a name="l00906"></a><span class="lineno"> 906</span>  <span class="keywordflow">return</span> functions::mul<OP>(x, y);</div>
745 <div class="line"><a name="l00907"></a><span class="lineno"> 907</span> }</div>
746 <div class="line"><a name="l00908"></a><span class="lineno"> 908</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
747 <div class="line"><a name="l00909"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a9d53af9692ab2f7ae6fc0017faeb46f0"> 909</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a9d53af9692ab2f7ae6fc0017faeb46f0">div</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> y)</div>
748 <div class="line"><a name="l00910"></a><span class="lineno"> 910</span> {</div>
749 <div class="line"><a name="l00911"></a><span class="lineno"> 911</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a72d043524e13bf27c605c2dee2e20a2a">functions::div</a>(x, y);</div>
750 <div class="line"><a name="l00912"></a><span class="lineno"> 912</span> }</div>
751 <div class="line"><a name="l00913"></a><span class="lineno"> 913</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
752 <div class="line"><a name="l00914"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56"> 914</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56">abs</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x)</div>
753 <div class="line"><a name="l00915"></a><span class="lineno"> 915</span> {</div>
754 <div class="line"><a name="l00916"></a><span class="lineno"> 916</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3c04cac868606ed11c00761f0d5b3d2c">functions::abs</a>(x);</div>
755 <div class="line"><a name="l00917"></a><span class="lineno"> 917</span> }</div>
756 <div class="line"><a name="l00918"></a><span class="lineno"> 918</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
757 <div class="line"><a name="l00919"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#affa3387066925d0ef7ded4f816f9cccb"> 919</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#affa3387066925d0ef7ded4f816f9cccb">clamp</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, T <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>, T <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>)</div>
758 <div class="line"><a name="l00920"></a><span class="lineno"> 920</span> {</div>
759 <div class="line"><a name="l00921"></a><span class="lineno"> 921</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a2d681ad37360fc4497f147af98951ba0">functions::clamp</a>(x, min, max);</div>
760 <div class="line"><a name="l00922"></a><span class="lineno"> 922</span> }</div>
761 <div class="line"><a name="l00923"></a><span class="lineno"> 923</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
762 <div class="line"><a name="l00924"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa4e01e9be9adcc40a69a4da48fa83a43"> 924</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa4e01e9be9adcc40a69a4da48fa83a43">exp</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x)</div>
763 <div class="line"><a name="l00925"></a><span class="lineno"> 925</span> {</div>
764 <div class="line"><a name="l00926"></a><span class="lineno"> 926</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac66bdd16622d4498cc0299db1efcef54">functions::exp</a>(x);</div>
765 <div class="line"><a name="l00927"></a><span class="lineno"> 927</span> }</div>
766 <div class="line"><a name="l00928"></a><span class="lineno"> 928</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
767 <div class="line"><a name="l00929"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a8c8ce35c61b4f71cccec28d18161eaa1"> 929</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a8c8ce35c61b4f71cccec28d18161eaa1">log</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x)</div>
768 <div class="line"><a name="l00930"></a><span class="lineno"> 930</span> {</div>
769 <div class="line"><a name="l00931"></a><span class="lineno"> 931</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a33520868a877b6b9a1beccdc1aaa4ec6">functions::log</a>(x);</div>
770 <div class="line"><a name="l00932"></a><span class="lineno"> 932</span> }</div>
771 <div class="line"><a name="l00933"></a><span class="lineno"> 933</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
772 <div class="line"><a name="l00934"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a2b7623d9dd3fde1d0a3bbe034967cff5"> 934</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a2b7623d9dd3fde1d0a3bbe034967cff5">inv_sqrt</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x)</div>
773 <div class="line"><a name="l00935"></a><span class="lineno"> 935</span> {</div>
774 <div class="line"><a name="l00936"></a><span class="lineno"> 936</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a6a7c1ca385d21fe457259a8fd9debfbf">functions::inv_sqrt</a>(x);</div>
775 <div class="line"><a name="l00937"></a><span class="lineno"> 937</span> }</div>
776 <div class="line"><a name="l00938"></a><span class="lineno"> 938</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
777 <div class="line"><a name="l00939"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a6854479935f66029852441b051e1a3e0"> 939</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a6854479935f66029852441b051e1a3e0">tanh</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x)</div>
778 <div class="line"><a name="l00940"></a><span class="lineno"> 940</span> {</div>
779 <div class="line"><a name="l00941"></a><span class="lineno"> 941</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3260014222a62b212c096956c0605fd5">functions::tanh</a>(x);</div>
780 <div class="line"><a name="l00942"></a><span class="lineno"> 942</span> }</div>
781 <div class="line"><a name="l00943"></a><span class="lineno"> 943</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div>
782 <div class="line"><a name="l00944"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#af782da2c5016738c96c16fee5e17670f"> 944</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#af782da2c5016738c96c16fee5e17670f">pow</a>(<a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> x, <a class="code" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point<T></a> a)</div>
783 <div class="line"><a name="l00945"></a><span class="lineno"> 945</span> {</div>
784 <div class="line"><a name="l00946"></a><span class="lineno"> 946</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a74f7a6f0b0c31beaf3a0bc13e991b1c3">functions::pow</a>(x, a);</div>
785 <div class="line"><a name="l00947"></a><span class="lineno"> 947</span> }</div>
786 <div class="line"><a name="l00948"></a><span class="lineno"> 948</span> } <span class="comment">// namespace detail</span></div>
787 <div class="line"><a name="l00949"></a><span class="lineno"> 949</span> </div>
788 <div class="line"><a name="l00950"></a><span class="lineno"> 950</span> <span class="comment">// Expose operators</span></div>
789 <div class="line"><a name="l00951"></a><span class="lineno"> 951</span> <span class="keyword">using</span> detail::operator==;</div>
790 <div class="line"><a name="l00952"></a><span class="lineno"> 952</span> <span class="keyword">using</span> detail::operator!=;</div>
791 <div class="line"><a name="l00953"></a><span class="lineno"> 953</span> <span class="keyword">using</span> detail::operator<;</div>
792 <div class="line"><a name="l00954"></a><span class="lineno"> 954</span> <span class="keyword">using</span> detail::operator>;</div>
793 <div class="line"><a name="l00955"></a><span class="lineno"> 955</span> <span class="keyword">using</span> detail::operator<=;</div>
794 <div class="line"><a name="l00956"></a><span class="lineno"> 956</span> <span class="keyword">using</span> detail::operator>=;</div>
795 <div class="line"><a name="l00957"></a><span class="lineno"> 957</span> <span class="keyword">using</span> detail::operator+;</div>
796 <div class="line"><a name="l00958"></a><span class="lineno"> 958</span> <span class="keyword">using</span> detail::operator-;</div>
797 <div class="line"><a name="l00959"></a><span class="lineno"> 959</span> <span class="keyword">using</span> detail::operator*;</div>
798 <div class="line"><a name="l00960"></a><span class="lineno"> 960</span> <span class="keyword">using</span> detail::operator/;</div>
799 <div class="line"><a name="l00961"></a><span class="lineno"> 961</span> <span class="keyword">using</span> detail::operator>>;</div>
800 <div class="line"><a name="l00962"></a><span class="lineno"> 962</span> <span class="keyword">using</span> detail::operator<<;</div>
801 <div class="line"><a name="l00963"></a><span class="lineno"> 963</span> </div>
802 <div class="line"><a name="l00964"></a><span class="lineno"> 964</span> <span class="comment">// Expose additional functions</span></div>
803 <div class="line"><a name="l00965"></a><span class="lineno"> 965</span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">detail::min</a>;</div>
804 <div class="line"><a name="l00966"></a><span class="lineno"> 966</span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">detail::max</a>;</div>
805 <div class="line"><a name="l00967"></a><span class="lineno"> 967</span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a9d91c0affa9bc1921abc949791c514c0">detail::add</a>;</div>
806 <div class="line"><a name="l00968"></a><span class="lineno"> 968</span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a42e82c32ccdbc5bc2899bc5cd3b04e27">detail::sub</a>;</div>
807 <div class="line"><a name="l00969"></a><span class="lineno"> 969</span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a8d71db736fe80cae37a9c94c57b34ed6">detail::mul</a>;</div>
808 <div class="line"><a name="l00970"></a><span class="lineno"> 970</span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a9d53af9692ab2f7ae6fc0017faeb46f0">detail::div</a>;</div>
809 <div class="line"><a name="l00971"></a><span class="lineno"> 971</span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56">detail::abs</a>;</div>
810 <div class="line"><a name="l00972"></a><span class="lineno"> 972</span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#affa3387066925d0ef7ded4f816f9cccb">detail::clamp</a>;</div>
811 <div class="line"><a name="l00973"></a><span class="lineno"> 973</span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa4e01e9be9adcc40a69a4da48fa83a43">detail::exp</a>;</div>
812 <div class="line"><a name="l00974"></a><span class="lineno"> 974</span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a8c8ce35c61b4f71cccec28d18161eaa1">detail::log</a>;</div>
813 <div class="line"><a name="l00975"></a><span class="lineno"> 975</span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a2b7623d9dd3fde1d0a3bbe034967cff5">detail::inv_sqrt</a>;</div>
814 <div class="line"><a name="l00976"></a><span class="lineno"> 976</span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a6854479935f66029852441b051e1a3e0">detail::tanh</a>;</div>
815 <div class="line"><a name="l00977"></a><span class="lineno"> 977</span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#af782da2c5016738c96c16fee5e17670f">detail::pow</a>;</div>
816 <div class="line"><a name="l00978"></a><span class="lineno"> 978</span> } <span class="comment">// namespace fixed_point_arithmetic</span></div>
817 <div class="line"><a name="l00979"></a><span class="lineno"> 979</span> } <span class="comment">// namespace test</span></div>
818 <div class="line"><a name="l00980"></a><span class="lineno"> 980</span> } <span class="comment">// namespace arm_compute</span></div>
819 <div class="line"><a name="l00981"></a><span class="lineno"> 981</span> <span class="preprocessor">#endif </span><span class="comment">/*__ARM_COMPUTE_TEST_VALIDATION_FIXEDPOINT_H__ */</span><span class="preprocessor"></span></div>
820 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_a8d71db736fe80cae37a9c94c57b34ed6"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a8d71db736fe80cae37a9c94c57b34ed6">arm_compute::test::fixed_point_arithmetic::detail::mul</a></div><div class="ttdeci">fixed_point< T > mul(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00904">FixedPoint.h:904</a></div></div>
821 <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>
822 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aabcf39e3917f842dbc5fbb0d802f24d5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">arm_compute::test::fixed_point_arithmetic::detail::min</a></div><div class="ttdeci">fixed_point< T > min(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">FixedPoint.h:884</a></div></div>
823 <div class="ttc" id="_toolchain_support_8h_xhtml"><div class="ttname"><a href="_toolchain_support_8h.xhtml">ToolchainSupport.h</a></div></div>
824 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_xhtml_add6426cbf2e057a195846d4ba09a50be"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#add6426cbf2e057a195846d4ba09a50be">arm_compute::test::fixed_point_arithmetic::RoundingPolicy</a></div><div class="ttdeci">RoundingPolicy</div><div class="ttdoc">Strongly typed enum class representing the rounding policy. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00079">FixedPoint.h:79</a></div></div>
825 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a996cf0a2779076326d094ef9d75ddd1f"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a996cf0a2779076326d094ef9d75ddd1f">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::clamp</a></div><div class="ttdeci">static constexpr T clamp(T val, T min, T max)</div><div class="ttdoc">Clamp value between two ranges. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00349">FixedPoint.h:349</a></div></div>
826 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_affa3387066925d0ef7ded4f816f9cccb"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#affa3387066925d0ef7ded4f816f9cccb">arm_compute::test::fixed_point_arithmetic::detail::clamp</a></div><div class="ttdeci">fixed_point< T > clamp(fixed_point< T > x, T min, T max)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00919">FixedPoint.h:919</a></div></div>
827 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_a26723c21135a6a96f98a9dc41143044d"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a26723c21135a6a96f98a9dc41143044d">arm_compute::test::fixed_point_arithmetic::detail::operator>></a></div><div class="ttdeci">fixed_point< T > operator>>(fixed_point< T > x, size_t shift)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00869">FixedPoint.h:869</a></div></div>
828 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a995c73a5ff995cc1b4c0c730892c792a"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a995c73a5ff995cc1b4c0c730892c792a">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::to_float</a></div><div class="ttdeci">static constexpr float to_float(T val, uint8_t p)</div><div class="ttdoc">Convert a fixed point value to float given its precision. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00315">FixedPoint.h:315</a></div></div>
829 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_abd7f7757b9edb7cdd017d439bc5ba8b0"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#abd7f7757b9edb7cdd017d439bc5ba8b0">arm_compute::test::fixed_point_arithmetic::detail::functions::isgreater</a></div><div class="ttdeci">static bool isgreater(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Checks if one fixed point is greater than the other. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00425">FixedPoint.h:425</a></div></div>
830 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a918ab57096fdfe5e2cbf70de5145b9fa"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a918ab57096fdfe5e2cbf70de5145b9fa">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::to_int</a></div><div class="ttdeci">static constexpr T to_int(T val, uint8_t p)</div><div class="ttdoc">Convert a fixed point value to integer given its precision. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00326">FixedPoint.h:326</a></div></div>
831 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a9efa14731a55e3d96adb961214e91734"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a9efa14731a55e3d96adb961214e91734">arm_compute::test::fixed_point_arithmetic::detail::functions::signbit</a></div><div class="ttdeci">static bool signbit(fixed_point< T > x)</div><div class="ttdoc">Signbit of a fixed point number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00386">FixedPoint.h:386</a></div></div>
832 <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>
833 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aa4e01e9be9adcc40a69a4da48fa83a43"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa4e01e9be9adcc40a69a4da48fa83a43">arm_compute::test::fixed_point_arithmetic::detail::exp</a></div><div class="ttdeci">fixed_point< T > exp(fixed_point< T > x)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00924">FixedPoint.h:924</a></div></div>
834 <div class="ttc" id="reduction__operation_8cl_xhtml_ab0df00f5333da51860deb93deb44a782"><div class="ttname"><a href="reduction__operation_8cl.xhtml#ab0df00f5333da51860deb93deb44a782">sum</a></div><div class="ttdeci">DATA_TYPE sum(__global const DATA_TYPE *input)</div><div class="ttdoc">Calculate sum of a vector. </div><div class="ttdef"><b>Definition:</b> <a href="reduction__operation_8cl_source.xhtml#l00052">reduction_operation.cl:52</a></div></div>
835 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a40956c61706d70b8978c2b87ac455d2a"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">arm_compute::test::fixed_point_arithmetic::detail::functions::add</a></div><div class="ttdeci">static fixed_point< T > add(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Perform addition among two fixed point numbers. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00527">FixedPoint.h:527</a></div></div>
836 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_xhtml_ac20ca549fa27b2eed44367745055a233"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits.xhtml#ac20ca549fa27b2eed44367745055a233">arm_compute::test::fixed_point_arithmetic::traits::promote_t</a></div><div class="ttdeci">typename promote< T >::type promote_t</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00067">FixedPoint.h:67</a></div></div>
837 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int8__t_01_4_xhtml_a8812bf779dca54354aa6ad00cef14a73"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int8__t_01_4.xhtml#a8812bf779dca54354aa6ad00cef14a73">arm_compute::test::fixed_point_arithmetic::traits::promote< int8_t >::type</a></div><div class="ttdeci">int16_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00059">FixedPoint.h:59</a></div></div>
838 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a304fe6cc15deaffb14929e42a4ff1c1b"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a304fe6cc15deaffb14929e42a4ff1c1b">arm_compute::test::fixed_point_arithmetic::detail::functions::isequal</a></div><div class="ttdeci">static bool isequal(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Checks if two fixed point numbers are equal. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00398">FixedPoint.h:398</a></div></div>
839 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_a5f37e666dcd38888952f32592e93c2cb"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a5f37e666dcd38888952f32592e93c2cb">arm_compute::test::fixed_point_arithmetic::detail::operator/</a></div><div class="ttdeci">fixed_point< T > operator/(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00864">FixedPoint.h:864</a></div></div>
840 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint32__t_01_4_xhtml_a9659bbcc7fc016eda242219021c7980b"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint32__t_01_4.xhtml#a9659bbcc7fc016eda242219021c7980b">arm_compute::test::fixed_point_arithmetic::traits::promote< uint32_t >::type</a></div><div class="ttdeci">uint64_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00062">FixedPoint.h:62</a></div></div>
841 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_xhtml"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote.xhtml">arm_compute::test::fixed_point_arithmetic::traits::promote</a></div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00057">FixedPoint.h:57</a></div></div>
842 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aff130425a85235bea11508b51ddb16de"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aff130425a85235bea11508b51ddb16de">arm_compute::test::fixed_point_arithmetic::detail::operator==</a></div><div class="ttdeci">bool operator==(const fixed_point< T > &lhs, const fixed_point< T > &rhs)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00814">FixedPoint.h:814</a></div></div>
843 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a49abe87ad33d2900c2255e4b79322207"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a49abe87ad33d2900c2255e4b79322207">arm_compute::test::fixed_point_arithmetic::detail::functions::isgreaterequal</a></div><div class="ttdeci">static bool isgreaterequal(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Checks if one fixed point is greater or equal than the other. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00440">FixedPoint.h:440</a></div></div>
844 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_a6d4fc292ad316f39f20eb42393bad855"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a6d4fc292ad316f39f20eb42393bad855">arm_compute::test::fixed_point_arithmetic::detail::operator>=</a></div><div class="ttdeci">bool operator>=(const fixed_point< T > &lhs, const fixed_point< T > &rhs)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00839">FixedPoint.h:839</a></div></div>
845 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a69b97b34f32a6fc05665fc8605806326"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a69b97b34f32a6fc05665fc8605806326">arm_compute::test::fixed_point_arithmetic::detail::functions::write</a></div><div class="ttdeci">static std::basic_ostream< T, traits > & write(std::basic_ostream< T, traits > &s, fixed_point< U > &x)</div><div class="ttdoc">Output stream operator. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00375">FixedPoint.h:375</a></div></div>
846 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_xhtml_a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">arm_compute::test::fixed_point_arithmetic::OverflowPolicy::SATURATE</a></div><div class="ttdoc">Saturate policy. </div></div>
847 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a74f7a6f0b0c31beaf3a0bc13e991b1c3"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a74f7a6f0b0c31beaf3a0bc13e991b1c3">arm_compute::test::fixed_point_arithmetic::detail::functions::pow</a></div><div class="ttdeci">static fixed_point< T > pow(fixed_point< T > x, fixed_point< T > a)</div><div class="ttdoc">Calculate the a-th power of a fixed point number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00807">FixedPoint.h:807</a></div></div>
848 <div class="ttc" id="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point_xhtml_a2449f6f85fd30e253be0a03fa9c5baa4"><div class="ttname"><a href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a2449f6f85fd30e253be0a03fa9c5baa4">arm_compute::test::fixed_point_arithmetic::fixed_point::fixed_point</a></div><div class="ttdeci">fixed_point(U val, uint8_t p, bool is_raw=false)</div><div class="ttdoc">Constructor (from integer) </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00125">FixedPoint.h:125</a></div></div>
849 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint64__t_01_4_xhtml_a9659bbcc7fc016eda242219021c7980b"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint64__t_01_4.xhtml#a9659bbcc7fc016eda242219021c7980b">arm_compute::test::fixed_point_arithmetic::traits::promote< uint64_t >::type</a></div><div class="ttdeci">uint64_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00064">FixedPoint.h:64</a></div></div>
850 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a0e0473f8d30d0a8067f9903430ddcd85"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a0e0473f8d30d0a8067f9903430ddcd85">arm_compute::test::fixed_point_arithmetic::detail::functions::shift_left</a></div><div class="ttdeci">static fixed_point< T > shift_left(fixed_point< T > x, size_t shift)</div><div class="ttdoc">Shift left. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00626">FixedPoint.h:626</a></div></div>
851 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_a8c8ce35c61b4f71cccec28d18161eaa1"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a8c8ce35c61b4f71cccec28d18161eaa1">arm_compute::test::fixed_point_arithmetic::detail::log</a></div><div class="ttdeci">fixed_point< T > log(fixed_point< T > x)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00929">FixedPoint.h:929</a></div></div>
852 <div class="ttc" id="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point_xhtml_a4c96f1365088f36447883d79469dc52b"><div class="ttname"><a href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a4c96f1365088f36447883d79469dc52b">arm_compute::test::fixed_point_arithmetic::fixed_point::fixed_point</a></div><div class="ttdeci">fixed_point(std::string str, uint8_t p)</div><div class="ttdoc">Constructor (from float string) </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00148">FixedPoint.h:148</a></div></div>
853 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_a9d91c0affa9bc1921abc949791c514c0"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a9d91c0affa9bc1921abc949791c514c0">arm_compute::test::fixed_point_arithmetic::detail::add</a></div><div class="ttdeci">fixed_point< T > add(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00894">FixedPoint.h:894</a></div></div>
854 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a9c4b593f19fb9053fd52697eaa30c5d7"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a9c4b593f19fb9053fd52697eaa30c5d7">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::fixed_one</a></div><div class="ttdeci">static constexpr T fixed_one(uint8_t p)</div><div class="ttdoc">Calculate representation of 1 in fixed point given a fixed point precision. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00293">FixedPoint.h:293</a></div></div>
855 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a59cfd98dfc03fbc5540092aa196d7187"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::saturate_cast</a></div><div class="ttdeci">static constexpr T saturate_cast(U val)</div><div class="ttdoc">Saturate given number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00360">FixedPoint.h:360</a></div></div>
856 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a3260014222a62b212c096956c0605fd5"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3260014222a62b212c096956c0605fd5">arm_compute::test::fixed_point_arithmetic::detail::functions::tanh</a></div><div class="ttdeci">static fixed_point< T > tanh(fixed_point< T > x)</div><div class="ttdoc">Calculate the hyperbolic tangent of a fixed point number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00783">FixedPoint.h:783</a></div></div>
857 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a287e18f5dec27ac32bfd30039a57dddf"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a287e18f5dec27ac32bfd30039a57dddf">arm_compute::test::fixed_point_arithmetic::detail::functions::sub</a></div><div class="ttdeci">static fixed_point< T > sub(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Perform subtraction among two fixed point numbers. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00552">FixedPoint.h:552</a></div></div>
858 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a72d043524e13bf27c605c2dee2e20a2a"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a72d043524e13bf27c605c2dee2e20a2a">arm_compute::test::fixed_point_arithmetic::detail::functions::div</a></div><div class="ttdeci">static fixed_point< T > div(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Perform division among two fixed point numbers. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00598">FixedPoint.h:598</a></div></div>
859 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml">arm_compute::test::fixed_point_arithmetic::detail::constant_expr</a></div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00048">FixedPoint.h:48</a></div></div>
860 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_ad1429c74912e4335cd55e6f860acf3b6"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">arm_compute::test::fixed_point_arithmetic::detail::functions::shift_right</a></div><div class="ttdeci">static fixed_point< T > shift_right(fixed_point< T > x, size_t shift)</div><div class="ttdoc">Shift right. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00644">FixedPoint.h:644</a></div></div>
861 <div class="ttc" id="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point_xhtml_af180cc5812cd005d63a4ec8eea34ae2e"><div class="ttname"><a href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#af180cc5812cd005d63a4ec8eea34ae2e">arm_compute::test::fixed_point_arithmetic::fixed_point::operator-=</a></div><div class="ttdeci">fixed_point< T > & operator-=(const fixed_point< U > &rhs)</div><div class="ttdoc">Arithmetic -= assignment operator. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00214">FixedPoint.h:214</a></div></div>
862 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml">arm_compute::test::fixed_point_arithmetic::detail::functions</a></div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00365">FixedPoint.h:365</a></div></div>
863 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_ad02ce21c48a8f9e419a2ec5f762f3221"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">arm_compute::test::fixed_point_arithmetic::detail::functions::mul</a></div><div class="ttdeci">static fixed_point< T > mul(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Perform multiplication among two fixed point numbers. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00577">FixedPoint.h:577</a></div></div>
864 <div class="ttc" id="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point_xhtml_ad9fb776e0556cf222c31feb9f372ea32"><div class="ttname"><a href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#ad9fb776e0556cf222c31feb9f372ea32">arm_compute::test::fixed_point_arithmetic::fixed_point::fixed_point</a></div><div class="ttdeci">fixed_point(fixed_point< U > val, uint8_t p)</div><div class="ttdoc">Constructor (from different fixed point type) </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00099">FixedPoint.h:99</a></div></div>
865 <div class="ttc" id="namespacearm__compute_xhtml_a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb"><div class="ttname"><a href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">arm_compute::Channel::U</a></div><div class="ttdoc">Cb/U channel. </div></div>
866 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_aa78731a2479da19c6604b3baa3ffe33d"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#aa78731a2479da19c6604b3baa3ffe33d">arm_compute::test::fixed_point_arithmetic::detail::functions::negate</a></div><div class="ttdeci">static fixed_point< T > negate(fixed_point< T > x)</div><div class="ttdoc">Negate number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00509">FixedPoint.h:509</a></div></div>
867 <div class="ttc" id="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">arm_compute::test::fixed_point_arithmetic::fixed_point</a></div><div class="ttdoc">Arbitrary fixed-point arithmetic class. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00087">FixedPoint.h:87</a></div></div>
868 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_a42e82c32ccdbc5bc2899bc5cd3b04e27"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a42e82c32ccdbc5bc2899bc5cd3b04e27">arm_compute::test::fixed_point_arithmetic::detail::sub</a></div><div class="ttdeci">fixed_point< T > sub(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00899">FixedPoint.h:899</a></div></div>
869 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ae9376d2e967c5c8067c6c72e7590ff01"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae9376d2e967c5c8067c6c72e7590ff01">arm_compute::test::fixed_point_arithmetic::detail::operator<</a></div><div class="ttdeci">bool operator<(const fixed_point< T > &lhs, const fixed_point< T > &rhs)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00824">FixedPoint.h:824</a></div></div>
870 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a3c04cac868606ed11c00761f0d5b3d2c"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3c04cac868606ed11c00761f0d5b3d2c">arm_compute::test::fixed_point_arithmetic::detail::functions::abs</a></div><div class="ttdeci">static fixed_point< T > abs(fixed_point< T > x)</div><div class="ttdoc">Calculate absolute value. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00655">FixedPoint.h:655</a></div></div>
871 <div class="ttc" id="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point_xhtml_a89deb954a617641af987e59a483ca5e9"><div class="ttname"><a href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a89deb954a617641af987e59a483ca5e9">arm_compute::test::fixed_point_arithmetic::fixed_point::precision</a></div><div class="ttdeci">uint8_t precision() const </div><div class="ttdoc">Precision accessor. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">FixedPoint.h:233</a></div></div>
872 <div class="ttc" id="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point_xhtml_a3fe723fdc332e453550710b2925002a0"><div class="ttname"><a href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a3fe723fdc332e453550710b2925002a0">arm_compute::test::fixed_point_arithmetic::fixed_point::raw</a></div><div class="ttdeci">T raw() const </div><div class="ttdoc">Raw value accessor. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">FixedPoint.h:225</a></div></div>
873 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a125e978e1d6df0f6d9f738b0c580f980"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a125e978e1d6df0f6d9f738b0c580f980">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::fixed_step</a></div><div class="ttdeci">static constexpr float fixed_step(uint8_t p)</div><div class="ttdoc">Calculate fixed point precision step given a fixed point precision. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00303">FixedPoint.h:303</a></div></div>
874 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a2d681ad37360fc4497f147af98951ba0"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a2d681ad37360fc4497f147af98951ba0">arm_compute::test::fixed_point_arithmetic::detail::functions::clamp</a></div><div class="ttdeci">static fixed_point< T > clamp(fixed_point< T > x, T min, T max)</div><div class="ttdoc">Clamp fixed point to specific range. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00498">FixedPoint.h:498</a></div></div>
875 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint16__t_01_4_xhtml_a43022da9f622deba3284b748a6885e23"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint16__t_01_4.xhtml#a43022da9f622deba3284b748a6885e23">arm_compute::test::fixed_point_arithmetic::traits::promote< uint16_t >::type</a></div><div class="ttdeci">uint32_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00060">FixedPoint.h:60</a></div></div>
876 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_a2b7623d9dd3fde1d0a3bbe034967cff5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a2b7623d9dd3fde1d0a3bbe034967cff5">arm_compute::test::fixed_point_arithmetic::detail::inv_sqrt</a></div><div class="ttdeci">fixed_point< T > inv_sqrt(fixed_point< T > x)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00934">FixedPoint.h:934</a></div></div>
877 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a6a7c1ca385d21fe457259a8fd9debfbf"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a6a7c1ca385d21fe457259a8fd9debfbf">arm_compute::test::fixed_point_arithmetic::detail::functions::inv_sqrt</a></div><div class="ttdeci">static fixed_point< T > inv_sqrt(fixed_point< T > x)</div><div class="ttdoc">Calculate the inverse square root of a fixed point number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00752">FixedPoint.h:752</a></div></div>
878 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_ac4dcad0e940cf826063ba1f6ea659c07"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac4dcad0e940cf826063ba1f6ea659c07">arm_compute::test::fixed_point_arithmetic::detail::functions::isless</a></div><div class="ttdeci">static bool isless(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Checks if one fixed point is less than the other. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00455">FixedPoint.h:455</a></div></div>
879 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_ac66bdd16622d4498cc0299db1efcef54"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac66bdd16622d4498cc0299db1efcef54">arm_compute::test::fixed_point_arithmetic::detail::functions::exp</a></div><div class="ttdeci">static fixed_point< T > exp(fixed_point< T > x)</div><div class="ttdoc">Calculate the exponential of a fixed point number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00715">FixedPoint.h:715</a></div></div>
880 <div class="ttc" id="hwc_8hpp_xhtml_a0f61d63b009d0880a89c843bd50d8d76"><div class="ttname"><a href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a></div><div class="ttdeci">void * value</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00269">hwc.hpp:269</a></div></div>
881 <div class="ttc" id="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point_xhtml_a5047b169040344c060aa685e9f63627c"><div class="ttname"><a href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a5047b169040344c060aa685e9f63627c">arm_compute::test::fixed_point_arithmetic::fixed_point::fixed_point</a></div><div class="ttdeci">fixed_point(float val, uint8_t p)</div><div class="ttdoc">Constructor (from float) </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00138">FixedPoint.h:138</a></div></div>
882 <div class="ttc" id="tests_2_utils_8h_xhtml"><div class="ttname"><a href="tests_2_utils_8h.xhtml">Utils.h</a></div></div>
883 <div class="ttc" id="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point_xhtml_a2654e1d67fbb9afb7fb00ee7ec521c11"><div class="ttname"><a href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a2654e1d67fbb9afb7fb00ee7ec521c11">arm_compute::test::fixed_point_arithmetic::fixed_point::operator+=</a></div><div class="ttdeci">fixed_point< T > & operator+=(const fixed_point< U > &rhs)</div><div class="ttdoc">Arithmetic += assignment operator. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00201">FixedPoint.h:201</a></div></div>
884 <div class="ttc" id="namespacemali__userspace_xhtml_ad44b615021ed3ccb734fcaf583ef4a03"><div class="ttname"><a href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">mali_userspace::type</a></div><div class="ttdeci">uint32_t type</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00204">hwc.hpp:204</a></div></div>
885 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a814cf7d89e7dad18b0625b4c914dc628"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a814cf7d89e7dad18b0625b4c914dc628">arm_compute::test::fixed_point_arithmetic::detail::functions::islessgreater</a></div><div class="ttdeci">static bool islessgreater(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Checks if one fixed point is less or greater than the other. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00485">FixedPoint.h:485</a></div></div>
886 <div class="ttc" id="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point_xhtml_a80db15090eed5a0bb5e7977eabeae132"><div class="ttname"><a href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#a80db15090eed5a0bb5e7977eabeae132">arm_compute::test::fixed_point_arithmetic::fixed_point::rescale</a></div><div class="ttdeci">void rescale(uint8_t p)</div><div class="ttdoc">Rescale a fixed point to a new precision. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">FixedPoint.h:241</a></div></div>
887 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint8__t_01_4_xhtml_a3085ed9ad7c9b1c88dcec24108730e54"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01uint8__t_01_4.xhtml#a3085ed9ad7c9b1c88dcec24108730e54">arm_compute::test::fixed_point_arithmetic::traits::promote< uint8_t >::type</a></div><div class="ttdeci">uint16_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00058">FixedPoint.h:58</a></div></div>
888 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_a3d0ef475c458544f4ac7b56060f62f6e"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a3d0ef475c458544f4ac7b56060f62f6e">arm_compute::test::fixed_point_arithmetic::detail::operator!=</a></div><div class="ttdeci">bool operator!=(const fixed_point< T > &lhs, const fixed_point< T > &rhs)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00819">FixedPoint.h:819</a></div></div>
889 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad702cf90d6fc9245b3d921dc09ccb76f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad702cf90d6fc9245b3d921dc09ccb76f">arm_compute::test::fixed_point_arithmetic::detail::operator+</a></div><div class="ttdeci">fixed_point< T > operator+(const fixed_point< T > &lhs, const fixed_point< T > &rhs)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00844">FixedPoint.h:844</a></div></div>
890 <div class="ttc" id="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point_xhtml_aac73fe4dd453222d7858e879f5a2871c"><div class="ttname"><a href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml#aac73fe4dd453222d7858e879f5a2871c">arm_compute::test::fixed_point_arithmetic::fixed_point::operator=</a></div><div class="ttdeci">fixed_point & operator=(const fixed_point &)=default</div><div class="ttdoc">Default copy constructor. </div></div>
891 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a47e151d622ee6e71a0e731585b4fa7d8"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a47e151d622ee6e71a0e731585b4fa7d8">arm_compute::test::fixed_point_arithmetic::detail::functions::islessequal</a></div><div class="ttdeci">static bool islessequal(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Checks if one fixed point is less or equal than the other. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00470">FixedPoint.h:470</a></div></div>
892 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_xhtml_add6426cbf2e057a195846d4ba09a50bea5631ad8e27788edfca7e13535d862c06"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#add6426cbf2e057a195846d4ba09a50bea5631ad8e27788edfca7e13535d862c06">arm_compute::test::fixed_point_arithmetic::RoundingPolicy::TO_ZERO</a></div><div class="ttdoc">Round to zero policy. </div></div>
893 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_acdde00e55846c9f6704f87b9d2112cce"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#acdde00e55846c9f6704f87b9d2112cce">arm_compute::test::fixed_point_arithmetic::detail::operator*</a></div><div class="ttdeci">fixed_point< T > operator*(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00859">FixedPoint.h:859</a></div></div>
894 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a866dbf3e096ad4a487820a8945be3dfe"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a866dbf3e096ad4a487820a8945be3dfe">arm_compute::test::fixed_point_arithmetic::detail::functions::isnotequal</a></div><div class="ttdeci">static bool isnotequal(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Checks if two fixed point number are not equal. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00413">FixedPoint.h:413</a></div></div>
895 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_xhtml_a0ada8f647402027261407be09bdf25ff"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ff">arm_compute::test::fixed_point_arithmetic::OverflowPolicy</a></div><div class="ttdeci">OverflowPolicy</div><div class="ttdoc">Strongly typed enum class representing the overflow policy. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00073">FixedPoint.h:73</a></div></div>
896 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_a9d53af9692ab2f7ae6fc0017faeb46f0"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a9d53af9692ab2f7ae6fc0017faeb46f0">arm_compute::test::fixed_point_arithmetic::detail::div</a></div><div class="ttdeci">fixed_point< T > div(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00909">FixedPoint.h:909</a></div></div>
897 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_af782da2c5016738c96c16fee5e17670f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#af782da2c5016738c96c16fee5e17670f">arm_compute::test::fixed_point_arithmetic::detail::pow</a></div><div class="ttdeci">fixed_point< T > pow(fixed_point< T > x, fixed_point< T > a)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00944">FixedPoint.h:944</a></div></div>
898 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_xhtml_a0ada8f647402027261407be09bdf25ffae1c8555fcf0ea2bb648a6fd527d658c0"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffae1c8555fcf0ea2bb648a6fd527d658c0">arm_compute::test::fixed_point_arithmetic::OverflowPolicy::WRAP</a></div><div class="ttdoc">Wrap policy. </div></div>
899 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aa43c67a536c661ec28398d06bc8ba5af"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa43c67a536c661ec28398d06bc8ba5af">arm_compute::test::fixed_point_arithmetic::detail::clz</a></div><div class="ttdeci">constexpr int clz(T value)</div><div class="ttdoc">Count the number of leading zero bits in the given value. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00276">FixedPoint.h:276</a></div></div>
900 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int32__t_01_4_xhtml_a70ca3d636283d6713220cd8af5fc07b3"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int32__t_01_4.xhtml#a70ca3d636283d6713220cd8af5fc07b3">arm_compute::test::fixed_point_arithmetic::traits::promote< int32_t >::type</a></div><div class="ttdeci">int64_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00063">FixedPoint.h:63</a></div></div>
901 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point< T > max(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">FixedPoint.h:889</a></div></div>
902 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions_xhtml_a33520868a877b6b9a1beccdc1aaa4ec6"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a33520868a877b6b9a1beccdc1aaa4ec6">arm_compute::test::fixed_point_arithmetic::detail::functions::log</a></div><div class="ttdeci">static fixed_point< T > log(fixed_point< T > x)</div><div class="ttdoc">Calculate the logarithm of a fixed point number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">FixedPoint.h:668</a></div></div>
903 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_a6854479935f66029852441b051e1a3e0"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a6854479935f66029852441b051e1a3e0">arm_compute::test::fixed_point_arithmetic::detail::tanh</a></div><div class="ttdeci">fixed_point< T > tanh(fixed_point< T > x)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00939">FixedPoint.h:939</a></div></div>
904 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ae115fc750a92fb6a5e094998b56fcc56"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56">arm_compute::test::fixed_point_arithmetic::detail::abs</a></div><div class="ttdeci">fixed_point< T > abs(fixed_point< T > x)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00914">FixedPoint.h:914</a></div></div>
905 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aa4abd4e21ed690ccf2ba19cfe2ceefd2"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa4abd4e21ed690ccf2ba19cfe2ceefd2">arm_compute::test::fixed_point_arithmetic::detail::operator></a></div><div class="ttdeci">bool operator>(const fixed_point< T > &lhs, const fixed_point< T > &rhs)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00829">FixedPoint.h:829</a></div></div>
906 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_a8cce3682a30b4a89af6ebf94e655f954"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#a8cce3682a30b4a89af6ebf94e655f954">arm_compute::test::fixed_point_arithmetic::detail::operator-</a></div><div class="ttdeci">fixed_point< T > operator-(const fixed_point< T > &lhs, const fixed_point< T > &rhs)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00849">FixedPoint.h:849</a></div></div>
907 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr_xhtml_a682a2eb8869b48647719e194cbbcb4e1"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a682a2eb8869b48647719e194cbbcb4e1">arm_compute::test::fixed_point_arithmetic::detail::constant_expr::to_fixed</a></div><div class="ttdeci">static constexpr T to_fixed(float val, uint8_t p)</div><div class="ttdoc">Convert a single precision floating point value to a fixed point representation given its precision...</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00337">FixedPoint.h:337</a></div></div>
908 <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_xhtml_add6426cbf2e057a195846d4ba09a50bea02ff1fff1812f84c89547fcd6c176150"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#add6426cbf2e057a195846d4ba09a50bea02ff1fff1812f84c89547fcd6c176150">arm_compute::test::fixed_point_arithmetic::RoundingPolicy::TO_NEAREST_EVEN</a></div><div class="ttdoc">Round to nearest even policy. </div></div>
909 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int16__t_01_4_xhtml_a4f14ffc6d6f6ca92afb1baf996fc9305"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int16__t_01_4.xhtml#a4f14ffc6d6f6ca92afb1baf996fc9305">arm_compute::test::fixed_point_arithmetic::traits::promote< int16_t >::type</a></div><div class="ttdeci">int32_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00061">FixedPoint.h:61</a></div></div>
910 <div class="ttc" id="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int64__t_01_4_xhtml_a70ca3d636283d6713220cd8af5fc07b3"><div class="ttname"><a href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1traits_1_1promote_3_01int64__t_01_4.xhtml#a70ca3d636283d6713220cd8af5fc07b3">arm_compute::test::fixed_point_arithmetic::traits::promote< int64_t >::type</a></div><div class="ttdeci">int64_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00065">FixedPoint.h:65</a></div></div>
911 <div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_aa4152693b62db2a43edcc0039de95e38"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#aa4152693b62db2a43edcc0039de95e38">arm_compute::support::cpp11::stof</a></div><div class="ttdeci">int stof(Ts &&...args)</div><div class="ttdoc">Convert string values to float. </div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00213">ToolchainSupport.h:213</a></div></div>
912 </div><!-- fragment --></div><!-- contents -->
913 </div><!-- doc-content -->
914 <!-- start footer part -->
915 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
917 <li class="navelem"><a class="el" href="dir_3b4cc335dce0408d77b688e575522aa5.xhtml">tests</a></li><li class="navelem"><a class="el" href="dir_a54a3db5b521d39f12dbe18362fe1216.xhtml">validation</a></li><li class="navelem"><a class="el" href="tests_2validation_2_fixed_point_8h.xhtml">FixedPoint.h</a></li>
918 <li class="footer">Generated on Thu Sep 28 2017 14:37:49 for Compute Library by
919 <a href="http://www.doxygen.org/index.html">
920 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>