310b4d520ff5dbe26b0e178b027b349493b19c9c
[platform/upstream/armcl.git] / documentation / structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml
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">
4 <head>
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: functions Struct Reference</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);
19 </script>
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); });
24 </script>
25 <script type="text/x-mathjax-config">
26   MathJax.Hub.Config({
27     extensions: ["tex2jax.js"],
28     jax: ["input/TeX","output/HTML-CSS"],
29 });
30 </script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
31 <link href="doxygen.css" rel="stylesheet" type="text/css" />
32 </head>
33 <body>
34 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
35 <div id="titlearea">
36 <table cellspacing="0" cellpadding="0">
37  <tbody>
38  <tr style="height: 56px;">
39   <td style="padding-left: 0.5em;">
40    <div id="projectname">Compute Library
41    &#160;<span id="projectnumber">17.09</span>
42    </div>
43   </td>
44  </tr>
45  </tbody>
46 </table>
47 </div>
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');
52 </script>
53   <div id="navrow1" class="tabs">
54     <ul class="tablist">
55       <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
56       <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
57       <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
58       <li class="current"><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
59       <li><a href="files.xhtml"><span>Files</span></a></li>
60       <li>
61         <div id="MSearchBox" class="MSearchBoxInactive">
62         <span class="left">
63           <img id="MSearchSelect" src="search/mag_sel.png"
64                onmouseover="return searchBox.OnSearchSelectShow()"
65                onmouseout="return searchBox.OnSearchSelectHide()"
66                alt=""/>
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>
73           </span>
74         </div>
75       </li>
76     </ul>
77   </div>
78   <div id="navrow2" class="tabs2">
79     <ul class="tablist">
80       <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
81       <li><a href="classes.xhtml"><span>Data&#160;Structure&#160;Index</span></a></li>
82       <li><a href="inherits.xhtml"><span>Class&#160;Hierarchy</span></a></li>
83       <li><a href="functions.xhtml"><span>Data&#160;Fields</span></a></li>
84     </ul>
85   </div>
86 </div><!-- top -->
87 <div id="side-nav" class="ui-resizable side-nav-resizable">
88   <div id="nav-tree">
89     <div id="nav-tree-contents">
90       <div id="nav-sync" class="sync"></div>
91     </div>
92   </div>
93   <div id="splitbar" style="-moz-user-select:none;" 
94        class="ui-resizable-handle">
95   </div>
96 </div>
97 <script type="text/javascript">
98 $(document).ready(function(){initNavTree('structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml','');});
99 </script>
100 <div id="doc-content">
101 <!-- window showing the filter options -->
102 <div id="MSearchSelectWindow"
103      onmouseover="return searchBox.OnSearchSelectShow()"
104      onmouseout="return searchBox.OnSearchSelectHide()"
105      onkeydown="return searchBox.OnSearchSelectKey(event)">
106 <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>
107
108 <!-- iframe showing the search results (closed by default) -->
109 <div id="MSearchResultsWindow">
110 <iframe src="javascript:void(0)" frameborder="0" 
111         name="MSearchResults" id="MSearchResults">
112 </iframe>
113 </div>
114
115 <div class="header">
116   <div class="summary">
117 <a href="#pub-static-methods">Static Public Member Functions</a>  </div>
118   <div class="headertitle">
119 <div class="title">functions Struct Reference</div>  </div>
120 </div><!--header-->
121 <div class="contents">
122
123 <p><code>#include &lt;<a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>&gt;</code></p>
124 <table class="memberdecls">
125 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
126 Static Public Member Functions</h2></td></tr>
127 <tr class="memitem:a69b97b34f32a6fc05665fc8605806326"><td class="memTemplParams" colspan="2">template&lt;typename T , typename U , typename traits &gt; </td></tr>
128 <tr class="memitem:a69b97b34f32a6fc05665fc8605806326"><td class="memTemplItemLeft" align="right" valign="top">static std::basic_ostream&lt; T, <br class="typebreak"/>
129 traits &gt; &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a69b97b34f32a6fc05665fc8605806326">write</a> (std::basic_ostream&lt; T, traits &gt; &amp;s, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; U &gt; &amp;x)</td></tr>
130 <tr class="memdesc:a69b97b34f32a6fc05665fc8605806326"><td class="mdescLeft">&#160;</td><td class="mdescRight">Output stream operator.  <a href="#a69b97b34f32a6fc05665fc8605806326">More...</a><br/></td></tr>
131 <tr class="separator:a69b97b34f32a6fc05665fc8605806326"><td class="memSeparator" colspan="2">&#160;</td></tr>
132 <tr class="memitem:a9efa14731a55e3d96adb961214e91734"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
133 <tr class="memitem:a9efa14731a55e3d96adb961214e91734"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a9efa14731a55e3d96adb961214e91734">signbit</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x)</td></tr>
134 <tr class="memdesc:a9efa14731a55e3d96adb961214e91734"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signbit of a fixed point number.  <a href="#a9efa14731a55e3d96adb961214e91734">More...</a><br/></td></tr>
135 <tr class="separator:a9efa14731a55e3d96adb961214e91734"><td class="memSeparator" colspan="2">&#160;</td></tr>
136 <tr class="memitem:a304fe6cc15deaffb14929e42a4ff1c1b"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
137 <tr class="memitem:a304fe6cc15deaffb14929e42a4ff1c1b"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a304fe6cc15deaffb14929e42a4ff1c1b">isequal</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; y)</td></tr>
138 <tr class="memdesc:a304fe6cc15deaffb14929e42a4ff1c1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if two fixed point numbers are equal.  <a href="#a304fe6cc15deaffb14929e42a4ff1c1b">More...</a><br/></td></tr>
139 <tr class="separator:a304fe6cc15deaffb14929e42a4ff1c1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
140 <tr class="memitem:a866dbf3e096ad4a487820a8945be3dfe"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
141 <tr class="memitem:a866dbf3e096ad4a487820a8945be3dfe"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a866dbf3e096ad4a487820a8945be3dfe">isnotequal</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; y)</td></tr>
142 <tr class="memdesc:a866dbf3e096ad4a487820a8945be3dfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if two fixed point number are not equal.  <a href="#a866dbf3e096ad4a487820a8945be3dfe">More...</a><br/></td></tr>
143 <tr class="separator:a866dbf3e096ad4a487820a8945be3dfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
144 <tr class="memitem:abd7f7757b9edb7cdd017d439bc5ba8b0"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
145 <tr class="memitem:abd7f7757b9edb7cdd017d439bc5ba8b0"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#abd7f7757b9edb7cdd017d439bc5ba8b0">isgreater</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; y)</td></tr>
146 <tr class="memdesc:abd7f7757b9edb7cdd017d439bc5ba8b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if one fixed point is greater than the other.  <a href="#abd7f7757b9edb7cdd017d439bc5ba8b0">More...</a><br/></td></tr>
147 <tr class="separator:abd7f7757b9edb7cdd017d439bc5ba8b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
148 <tr class="memitem:a49abe87ad33d2900c2255e4b79322207"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
149 <tr class="memitem:a49abe87ad33d2900c2255e4b79322207"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a49abe87ad33d2900c2255e4b79322207">isgreaterequal</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; y)</td></tr>
150 <tr class="memdesc:a49abe87ad33d2900c2255e4b79322207"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if one fixed point is greater or equal than the other.  <a href="#a49abe87ad33d2900c2255e4b79322207">More...</a><br/></td></tr>
151 <tr class="separator:a49abe87ad33d2900c2255e4b79322207"><td class="memSeparator" colspan="2">&#160;</td></tr>
152 <tr class="memitem:ac4dcad0e940cf826063ba1f6ea659c07"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
153 <tr class="memitem:ac4dcad0e940cf826063ba1f6ea659c07"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac4dcad0e940cf826063ba1f6ea659c07">isless</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; y)</td></tr>
154 <tr class="memdesc:ac4dcad0e940cf826063ba1f6ea659c07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if one fixed point is less than the other.  <a href="#ac4dcad0e940cf826063ba1f6ea659c07">More...</a><br/></td></tr>
155 <tr class="separator:ac4dcad0e940cf826063ba1f6ea659c07"><td class="memSeparator" colspan="2">&#160;</td></tr>
156 <tr class="memitem:a47e151d622ee6e71a0e731585b4fa7d8"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
157 <tr class="memitem:a47e151d622ee6e71a0e731585b4fa7d8"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a47e151d622ee6e71a0e731585b4fa7d8">islessequal</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; y)</td></tr>
158 <tr class="memdesc:a47e151d622ee6e71a0e731585b4fa7d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if one fixed point is less or equal than the other.  <a href="#a47e151d622ee6e71a0e731585b4fa7d8">More...</a><br/></td></tr>
159 <tr class="separator:a47e151d622ee6e71a0e731585b4fa7d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
160 <tr class="memitem:a814cf7d89e7dad18b0625b4c914dc628"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
161 <tr class="memitem:a814cf7d89e7dad18b0625b4c914dc628"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a814cf7d89e7dad18b0625b4c914dc628">islessgreater</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; y)</td></tr>
162 <tr class="memdesc:a814cf7d89e7dad18b0625b4c914dc628"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if one fixed point is less or greater than the other.  <a href="#a814cf7d89e7dad18b0625b4c914dc628">More...</a><br/></td></tr>
163 <tr class="separator:a814cf7d89e7dad18b0625b4c914dc628"><td class="memSeparator" colspan="2">&#160;</td></tr>
164 <tr class="memitem:a2d681ad37360fc4497f147af98951ba0"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
165 <tr class="memitem:a2d681ad37360fc4497f147af98951ba0"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a2d681ad37360fc4497f147af98951ba0">clamp</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, T <a class="el" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>, T <a class="el" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>)</td></tr>
166 <tr class="memdesc:a2d681ad37360fc4497f147af98951ba0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clamp fixed point to specific range.  <a href="#a2d681ad37360fc4497f147af98951ba0">More...</a><br/></td></tr>
167 <tr class="separator:a2d681ad37360fc4497f147af98951ba0"><td class="memSeparator" colspan="2">&#160;</td></tr>
168 <tr class="memitem:aa78731a2479da19c6604b3baa3ffe33d"><td class="memTemplParams" colspan="2">template&lt;OverflowPolicy OP = OverflowPolicy::SATURATE, typename T &gt; </td></tr>
169 <tr class="memitem:aa78731a2479da19c6604b3baa3ffe33d"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#aa78731a2479da19c6604b3baa3ffe33d">negate</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x)</td></tr>
170 <tr class="memdesc:aa78731a2479da19c6604b3baa3ffe33d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Negate number.  <a href="#aa78731a2479da19c6604b3baa3ffe33d">More...</a><br/></td></tr>
171 <tr class="separator:aa78731a2479da19c6604b3baa3ffe33d"><td class="memSeparator" colspan="2">&#160;</td></tr>
172 <tr class="memitem:a40956c61706d70b8978c2b87ac455d2a"><td class="memTemplParams" colspan="2">template&lt;OverflowPolicy OP = OverflowPolicy::SATURATE, typename T &gt; </td></tr>
173 <tr class="memitem:a40956c61706d70b8978c2b87ac455d2a"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; y)</td></tr>
174 <tr class="memdesc:a40956c61706d70b8978c2b87ac455d2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform addition among two fixed point numbers.  <a href="#a40956c61706d70b8978c2b87ac455d2a">More...</a><br/></td></tr>
175 <tr class="separator:a40956c61706d70b8978c2b87ac455d2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
176 <tr class="memitem:a287e18f5dec27ac32bfd30039a57dddf"><td class="memTemplParams" colspan="2">template&lt;OverflowPolicy OP = OverflowPolicy::SATURATE, typename T &gt; </td></tr>
177 <tr class="memitem:a287e18f5dec27ac32bfd30039a57dddf"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a287e18f5dec27ac32bfd30039a57dddf">sub</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; y)</td></tr>
178 <tr class="memdesc:a287e18f5dec27ac32bfd30039a57dddf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform subtraction among two fixed point numbers.  <a href="#a287e18f5dec27ac32bfd30039a57dddf">More...</a><br/></td></tr>
179 <tr class="separator:a287e18f5dec27ac32bfd30039a57dddf"><td class="memSeparator" colspan="2">&#160;</td></tr>
180 <tr class="memitem:ad02ce21c48a8f9e419a2ec5f762f3221"><td class="memTemplParams" colspan="2">template&lt;OverflowPolicy OP = OverflowPolicy::SATURATE, typename T &gt; </td></tr>
181 <tr class="memitem:ad02ce21c48a8f9e419a2ec5f762f3221"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; y)</td></tr>
182 <tr class="memdesc:ad02ce21c48a8f9e419a2ec5f762f3221"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform multiplication among two fixed point numbers.  <a href="#ad02ce21c48a8f9e419a2ec5f762f3221">More...</a><br/></td></tr>
183 <tr class="separator:ad02ce21c48a8f9e419a2ec5f762f3221"><td class="memSeparator" colspan="2">&#160;</td></tr>
184 <tr class="memitem:a72d043524e13bf27c605c2dee2e20a2a"><td class="memTemplParams" colspan="2">template&lt;OverflowPolicy OP = OverflowPolicy::SATURATE, typename T &gt; </td></tr>
185 <tr class="memitem:a72d043524e13bf27c605c2dee2e20a2a"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a72d043524e13bf27c605c2dee2e20a2a">div</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; y)</td></tr>
186 <tr class="memdesc:a72d043524e13bf27c605c2dee2e20a2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform division among two fixed point numbers.  <a href="#a72d043524e13bf27c605c2dee2e20a2a">More...</a><br/></td></tr>
187 <tr class="separator:a72d043524e13bf27c605c2dee2e20a2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
188 <tr class="memitem:a0e0473f8d30d0a8067f9903430ddcd85"><td class="memTemplParams" colspan="2">template&lt;OverflowPolicy OP = OverflowPolicy::SATURATE, typename T &gt; </td></tr>
189 <tr class="memitem:a0e0473f8d30d0a8067f9903430ddcd85"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a0e0473f8d30d0a8067f9903430ddcd85">shift_left</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, size_t shift)</td></tr>
190 <tr class="memdesc:a0e0473f8d30d0a8067f9903430ddcd85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shift left.  <a href="#a0e0473f8d30d0a8067f9903430ddcd85">More...</a><br/></td></tr>
191 <tr class="separator:a0e0473f8d30d0a8067f9903430ddcd85"><td class="memSeparator" colspan="2">&#160;</td></tr>
192 <tr class="memitem:ad1429c74912e4335cd55e6f860acf3b6"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
193 <tr class="memitem:ad1429c74912e4335cd55e6f860acf3b6"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">shift_right</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, size_t shift)</td></tr>
194 <tr class="memdesc:ad1429c74912e4335cd55e6f860acf3b6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shift right.  <a href="#ad1429c74912e4335cd55e6f860acf3b6">More...</a><br/></td></tr>
195 <tr class="separator:ad1429c74912e4335cd55e6f860acf3b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
196 <tr class="memitem:a3c04cac868606ed11c00761f0d5b3d2c"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
197 <tr class="memitem:a3c04cac868606ed11c00761f0d5b3d2c"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3c04cac868606ed11c00761f0d5b3d2c">abs</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x)</td></tr>
198 <tr class="memdesc:a3c04cac868606ed11c00761f0d5b3d2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate absolute value.  <a href="#a3c04cac868606ed11c00761f0d5b3d2c">More...</a><br/></td></tr>
199 <tr class="separator:a3c04cac868606ed11c00761f0d5b3d2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
200 <tr class="memitem:a33520868a877b6b9a1beccdc1aaa4ec6"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
201 <tr class="memitem:a33520868a877b6b9a1beccdc1aaa4ec6"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a33520868a877b6b9a1beccdc1aaa4ec6">log</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x)</td></tr>
202 <tr class="memdesc:a33520868a877b6b9a1beccdc1aaa4ec6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the logarithm of a fixed point number.  <a href="#a33520868a877b6b9a1beccdc1aaa4ec6">More...</a><br/></td></tr>
203 <tr class="separator:a33520868a877b6b9a1beccdc1aaa4ec6"><td class="memSeparator" colspan="2">&#160;</td></tr>
204 <tr class="memitem:ac66bdd16622d4498cc0299db1efcef54"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
205 <tr class="memitem:ac66bdd16622d4498cc0299db1efcef54"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac66bdd16622d4498cc0299db1efcef54">exp</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x)</td></tr>
206 <tr class="memdesc:ac66bdd16622d4498cc0299db1efcef54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the exponential of a fixed point number.  <a href="#ac66bdd16622d4498cc0299db1efcef54">More...</a><br/></td></tr>
207 <tr class="separator:ac66bdd16622d4498cc0299db1efcef54"><td class="memSeparator" colspan="2">&#160;</td></tr>
208 <tr class="memitem:a6a7c1ca385d21fe457259a8fd9debfbf"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
209 <tr class="memitem:a6a7c1ca385d21fe457259a8fd9debfbf"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a6a7c1ca385d21fe457259a8fd9debfbf">inv_sqrt</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x)</td></tr>
210 <tr class="memdesc:a6a7c1ca385d21fe457259a8fd9debfbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the inverse square root of a fixed point number.  <a href="#a6a7c1ca385d21fe457259a8fd9debfbf">More...</a><br/></td></tr>
211 <tr class="separator:a6a7c1ca385d21fe457259a8fd9debfbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
212 <tr class="memitem:a3260014222a62b212c096956c0605fd5"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
213 <tr class="memitem:a3260014222a62b212c096956c0605fd5"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3260014222a62b212c096956c0605fd5">tanh</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x)</td></tr>
214 <tr class="memdesc:a3260014222a62b212c096956c0605fd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the hyperbolic tangent of a fixed point number.  <a href="#a3260014222a62b212c096956c0605fd5">More...</a><br/></td></tr>
215 <tr class="separator:a3260014222a62b212c096956c0605fd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
216 <tr class="memitem:a74f7a6f0b0c31beaf3a0bc13e991b1c3"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
217 <tr class="memitem:a74f7a6f0b0c31beaf3a0bc13e991b1c3"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a74f7a6f0b0c31beaf3a0bc13e991b1c3">pow</a> (<a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt; a)</td></tr>
218 <tr class="memdesc:a74f7a6f0b0c31beaf3a0bc13e991b1c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the a-th power of a fixed point number.  <a href="#a74f7a6f0b0c31beaf3a0bc13e991b1c3">More...</a><br/></td></tr>
219 <tr class="separator:a74f7a6f0b0c31beaf3a0bc13e991b1c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
220 </table>
221 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
222 <div class="textblock">
223 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00365">365</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
224 </div><h2 class="groupheader">Member Function Documentation</h2>
225 <a class="anchor" id="a3c04cac868606ed11c00761f0d5b3d2c"></a>
226 <div class="memitem">
227 <div class="memproto">
228 <table class="mlabels">
229   <tr>
230   <td class="mlabels-left">
231       <table class="memname">
232         <tr>
233           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; abs </td>
234           <td>(</td>
235           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
236           <td class="paramname"><em>x</em></td><td>)</td>
237           <td></td>
238         </tr>
239       </table>
240   </td>
241   <td class="mlabels-right">
242 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
243   </tr>
244 </table>
245 </div><div class="memdoc">
246
247 <p>Calculate absolute value. </p>
248 <dl class="params"><dt>Parameters</dt><dd>
249   <table class="params">
250     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Fixed point operand</td></tr>
251   </table>
252   </dd>
253 </dl>
254 <dl class="section return"><dt>Returns</dt><dd>Absolute value of operand </dd></dl>
255
256 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00655">655</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
257
258 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>.</p>
259
260 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00914">arm_compute::test::fixed_point_arithmetic::detail::abs()</a>.</p>
261 <div class="fragment"><div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;    {</div>
262 <div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;        <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote&lt;T&gt;::type</a>;</div>
263 <div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;        T val            = (x.raw() &lt; 0) ? <a class="code" href="namespacearm__compute_1_1test.xhtml#a4965b2f6821e0cf0afee738158bd8377">constant_expr&lt;T&gt;::saturate_cast</a>(-static_cast&lt;promoted_T&gt;(x.raw())) : x.raw();</div>
264 <div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;        <span class="keywordflow">return</span> fixed_point&lt;T&gt;(val, x.precision(), <span class="keyword">true</span>);</div>
265 <div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;    }</div>
266 <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>
267 <div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4965b2f6821e0cf0afee738158bd8377"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4965b2f6821e0cf0afee738158bd8377">arm_compute::test::saturate_cast</a></div><div class="ttdeci">T saturate_cast(T val)</div><div class="ttdoc">Saturate a value of type T against the numeric limits of type U. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00278">Utils.h:278</a></div></div>
268 </div><!-- fragment -->
269 </div>
270 </div>
271 <a class="anchor" id="a40956c61706d70b8978c2b87ac455d2a"></a>
272 <div class="memitem">
273 <div class="memproto">
274 <table class="mlabels">
275   <tr>
276   <td class="mlabels-left">
277       <table class="memname">
278         <tr>
279           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; add </td>
280           <td>(</td>
281           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
282           <td class="paramname"><em>x</em>, </td>
283         </tr>
284         <tr>
285           <td class="paramkey"></td>
286           <td></td>
287           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
288           <td class="paramname"><em>y</em>&#160;</td>
289         </tr>
290         <tr>
291           <td></td>
292           <td>)</td>
293           <td></td><td></td>
294         </tr>
295       </table>
296   </td>
297   <td class="mlabels-right">
298 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
299   </tr>
300 </table>
301 </div><div class="memdoc">
302
303 <p>Perform addition among two fixed point numbers. </p>
304 <dl class="params"><dt>Parameters</dt><dd>
305   <table class="params">
306     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>First fixed point operand </td></tr>
307     <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Second fixed point operand</td></tr>
308   </table>
309   </dd>
310 </dl>
311 <dl class="section return"><dt>Returns</dt><dd>Result fixed point with precision equal to minimum precision of both operands </dd></dl>
312
313 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00527">527</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
314
315 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point&lt; T &gt;::rescale()</a>, <a class="el" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">arm_compute::test::fixed_point_arithmetic::SATURATE</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00360">constant_expr&lt; T &gt;::saturate_cast()</a>, and <a class="el" href="hwc_8hpp_source.xhtml#l00204">mali_userspace::type</a>.</p>
316
317 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00715">functions::exp()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">functions::log()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00844">arm_compute::test::fixed_point_arithmetic::detail::operator+()</a>.</p>
318 <div class="fragment"><div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;    {</div>
319 <div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;        uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
320 <div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;        x.rescale(p);</div>
321 <div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;        y.rescale(p);</div>
322 <div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;        <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
323 <div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;        {</div>
324 <div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;            <span class="keyword">using</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a> = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote&lt;T&gt;::type</a>;</div>
325 <div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;            <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a> val   = <span class="keyword">static_cast&lt;</span><a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a><span class="keyword">&gt;</span>(x.raw()) + static_cast&lt;type&gt;(y.raw());</div>
326 <div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;            val        = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr&lt;T&gt;::saturate_cast</a>(val);</div>
327 <div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;            <span class="keywordflow">return</span> fixed_point&lt;T&gt;(<span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(val), p, <span class="keyword">true</span>);</div>
328 <div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;        }</div>
329 <div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;        <span class="keywordflow">else</span></div>
330 <div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;        {</div>
331 <div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;            <span class="keywordflow">return</span> fixed_point&lt;T&gt;(x.raw() + y.raw(), p, <span class="keyword">true</span>);</div>
332 <div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;        }</div>
333 <div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;    }</div>
334 <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&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
335 <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>
336 <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>
337 <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>
338 </div><!-- fragment -->
339 </div>
340 </div>
341 <a class="anchor" id="a2d681ad37360fc4497f147af98951ba0"></a>
342 <div class="memitem">
343 <div class="memproto">
344 <table class="mlabels">
345   <tr>
346   <td class="mlabels-left">
347       <table class="memname">
348         <tr>
349           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; clamp </td>
350           <td>(</td>
351           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
352           <td class="paramname"><em>x</em>, </td>
353         </tr>
354         <tr>
355           <td class="paramkey"></td>
356           <td></td>
357           <td class="paramtype">T&#160;</td>
358           <td class="paramname"><em>min</em>, </td>
359         </tr>
360         <tr>
361           <td class="paramkey"></td>
362           <td></td>
363           <td class="paramtype">T&#160;</td>
364           <td class="paramname"><em>max</em>&#160;</td>
365         </tr>
366         <tr>
367           <td></td>
368           <td>)</td>
369           <td></td><td></td>
370         </tr>
371       </table>
372   </td>
373   <td class="mlabels-right">
374 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
375   </tr>
376 </table>
377 </div><div class="memdoc">
378
379 <p>Clamp fixed point to specific range. </p>
380 <dl class="params"><dt>Parameters</dt><dd>
381   <table class="params">
382     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Fixed point operand </td></tr>
383     <tr><td class="paramdir">[in]</td><td class="paramname">min</td><td>Minimum value to clamp to </td></tr>
384     <tr><td class="paramdir">[in]</td><td class="paramname">max</td><td>Maximum value to clamp to</td></tr>
385   </table>
386   </dd>
387 </dl>
388 <dl class="section return"><dt>Returns</dt><dd>Clamped result </dd></dl>
389
390 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00498">498</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
391
392 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00349">constant_expr&lt; T &gt;::clamp()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>.</p>
393
394 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00919">arm_compute::test::fixed_point_arithmetic::detail::clamp()</a>.</p>
395 <div class="fragment"><div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;    {</div>
396 <div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;        <span class="keywordflow">return</span> fixed_point&lt;T&gt;(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a996cf0a2779076326d094ef9d75ddd1f">constant_expr&lt;T&gt;::clamp</a>(x.raw(), <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.precision(), <span class="keyword">true</span>);</div>
397 <div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;    }</div>
398 <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&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
399 <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>
400 <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&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
401 </div><!-- fragment -->
402 </div>
403 </div>
404 <a class="anchor" id="a72d043524e13bf27c605c2dee2e20a2a"></a>
405 <div class="memitem">
406 <div class="memproto">
407 <table class="mlabels">
408   <tr>
409   <td class="mlabels-left">
410       <table class="memname">
411         <tr>
412           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; div </td>
413           <td>(</td>
414           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
415           <td class="paramname"><em>x</em>, </td>
416         </tr>
417         <tr>
418           <td class="paramkey"></td>
419           <td></td>
420           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
421           <td class="paramname"><em>y</em>&#160;</td>
422         </tr>
423         <tr>
424           <td></td>
425           <td>)</td>
426           <td></td><td></td>
427         </tr>
428       </table>
429   </td>
430   <td class="mlabels-right">
431 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
432   </tr>
433 </table>
434 </div><div class="memdoc">
435
436 <p>Perform division among two fixed point numbers. </p>
437 <dl class="params"><dt>Parameters</dt><dd>
438   <table class="params">
439     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>First fixed point operand </td></tr>
440     <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Second fixed point operand</td></tr>
441   </table>
442   </dd>
443 </dl>
444 <dl class="section return"><dt>Returns</dt><dd>Result fixed point with precision equal to minimum precision of both operands </dd></dl>
445
446 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00598">598</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
447
448 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>, <a class="el" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">arm_compute::test::fixed_point_arithmetic::SATURATE</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00360">constant_expr&lt; T &gt;::saturate_cast()</a>.</p>
449
450 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00909">arm_compute::test::fixed_point_arithmetic::detail::div()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">functions::log()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00864">arm_compute::test::fixed_point_arithmetic::detail::operator/()</a>.</p>
451 <div class="fragment"><div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;    {</div>
452 <div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;        <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote&lt;T&gt;::type</a>;</div>
453 <div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;        uint8_t    p     = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
454 <div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;        promoted_T denom = <span class="keyword">static_cast&lt;</span>promoted_T<span class="keyword">&gt;</span>(y.raw());</div>
455 <div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;        <span class="keywordflow">if</span>(denom != 0)</div>
456 <div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;        {</div>
457 <div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;            promoted_T val = (<span class="keyword">static_cast&lt;</span>promoted_T<span class="keyword">&gt;</span>(x.raw()) &lt;&lt; <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::max</a>(x.precision(), y.precision())) / denom;</div>
458 <div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;            <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
459 <div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;            {</div>
460 <div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;                val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr&lt;T&gt;::saturate_cast</a>(val);</div>
461 <div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;            }</div>
462 <div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;            <span class="keywordflow">return</span> fixed_point&lt;T&gt;(<span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(val), p, <span class="keyword">true</span>);</div>
463 <div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160;        }</div>
464 <div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;        <span class="keywordflow">else</span></div>
465 <div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;        {</div>
466 <div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;            T val = (x.raw() &lt; 0) ? <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::numeric_limits&lt;T&gt;::min</a>() : <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;T&gt;::max</a>();</div>
467 <div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;            <span class="keywordflow">return</span> fixed_point&lt;T&gt;(val, p, <span class="keyword">true</span>);</div>
468 <div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;        }</div>
469 <div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;    }</div>
470 <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&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
471 <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>
472 <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>
473 <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>
474 <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&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
475 </div><!-- fragment -->
476 </div>
477 </div>
478 <a class="anchor" id="ac66bdd16622d4498cc0299db1efcef54"></a>
479 <div class="memitem">
480 <div class="memproto">
481 <table class="mlabels">
482   <tr>
483   <td class="mlabels-left">
484       <table class="memname">
485         <tr>
486           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; exp </td>
487           <td>(</td>
488           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
489           <td class="paramname"><em>x</em></td><td>)</td>
490           <td></td>
491         </tr>
492       </table>
493   </td>
494   <td class="mlabels-right">
495 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
496   </tr>
497 </table>
498 </div><div class="memdoc">
499
500 <p>Calculate the exponential of a fixed point number. </p>
501 <p>exp(x) = exp(floor(x)) * exp(x - floor(x)) = pow(2, floor(x) / ln(2)) * exp(x - floor(x)) = exp(x - floor(x)) &lt;&lt; (floor(x) / ln(2))</p>
502 <dl class="params"><dt>Parameters</dt><dd>
503   <table class="params">
504     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Fixed point operand</td></tr>
505   </table>
506   </dd>
507 </dl>
508 <dl class="section return"><dt>Returns</dt><dd>Exponential value of operand </dd></dl>
509
510 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00715">715</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
511
512 <p>References <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29">arm_compute::A</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00527">functions::add()</a>, <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">arm_compute::B</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00276">arm_compute::test::fixed_point_arithmetic::detail::clz()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00577">functions::mul()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00626">functions::shift_left()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00644">functions::shift_right()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00552">functions::sub()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00326">constant_expr&lt; T &gt;::to_int()</a>.</p>
513
514 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00924">arm_compute::test::fixed_point_arithmetic::detail::exp()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00807">functions::pow()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00783">functions::tanh()</a>.</p>
515 <div class="fragment"><div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;    {</div>
516 <div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;        uint8_t p = x.precision();</div>
517 <div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;        <span class="comment">// Constants</span></div>
518 <div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;        <span class="keyword">auto</span> const_one = fixed_point&lt;T&gt;(1, p);</div>
519 <div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;        <span class="keyword">auto</span> ln2       = fixed_point&lt;T&gt;(0.6931471, p);</div>
520 <div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;        <span class="keyword">auto</span> inv_ln2   = fixed_point&lt;T&gt;(1.442695, p);</div>
521 <div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;        <span class="keyword">auto</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29">A</a>         = fixed_point&lt;T&gt;(0.9978546, p);</div>
522 <div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;        <span class="keyword">auto</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">B</a>         = fixed_point&lt;T&gt;(0.4994721, p);</div>
523 <div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;        <span class="keyword">auto</span> C         = fixed_point&lt;T&gt;(0.1763723, p);</div>
524 <div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;        <span class="keyword">auto</span> D         = fixed_point&lt;T&gt;(0.0435108, p);</div>
525 <div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;</div>
526 <div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;        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&lt;T&gt;::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>
527 <div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;</div>
528 <div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;        <span class="comment">// Polynomial expansion</span></div>
529 <div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;        <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, fixed_point&lt;T&gt;(scaled_int_part, p)));</div>
530 <div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;        <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>
531 <div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;        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>
532 <div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;        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>
533 <div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;        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>
534 <div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;        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>
535 <div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;</div>
536 <div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;        <span class="comment">// Saturate value</span></div>
537 <div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;        <span class="keywordflow">if</span>(static_cast&lt;T&gt;(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa43c67a536c661ec28398d06bc8ba5af">clz</a>(taylor.raw())) &lt;= scaled_int_part)</div>
538 <div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;        {</div>
539 <div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;            <span class="keywordflow">return</span> fixed_point&lt;T&gt;(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;T&gt;::max</a>(), p, <span class="keyword">true</span>);</div>
540 <div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160;        }</div>
541 <div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;</div>
542 <div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;        <span class="keywordflow">return</span> (scaled_int_part &lt; 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>
543 <div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;    }</div>
544 <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>
545 <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>
546 <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>
547 <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&lt; T &gt; add(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
548 <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&lt; T &gt; shift_left(fixed_point&lt; T &gt; 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>
549 <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&lt; T &gt; sub(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
550 <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&lt; T &gt; shift_right(fixed_point&lt; T &gt; 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>
551 <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&lt; T &gt; mul(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
552 <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>
553 <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&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
554 </div><!-- fragment -->
555 </div>
556 </div>
557 <a class="anchor" id="a6a7c1ca385d21fe457259a8fd9debfbf"></a>
558 <div class="memitem">
559 <div class="memproto">
560 <table class="mlabels">
561   <tr>
562   <td class="mlabels-left">
563       <table class="memname">
564         <tr>
565           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; inv_sqrt </td>
566           <td>(</td>
567           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
568           <td class="paramname"><em>x</em></td><td>)</td>
569           <td></td>
570         </tr>
571       </table>
572   </td>
573   <td class="mlabels-right">
574 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
575   </tr>
576 </table>
577 </div><div class="memdoc">
578
579 <p>Calculate the inverse square root of a fixed point number. </p>
580 <dl class="params"><dt>Parameters</dt><dd>
581   <table class="params">
582     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Fixed point operand</td></tr>
583   </table>
584   </dd>
585 </dl>
586 <dl class="section return"><dt>Returns</dt><dd>Inverse square root value of operand </dd></dl>
587
588 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00752">752</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
589
590 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00276">arm_compute::test::fixed_point_arithmetic::detail::clz()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00577">functions::mul()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00626">functions::shift_left()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00644">functions::shift_right()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00552">functions::sub()</a>, and <a class="el" href="hwc_8hpp_source.xhtml#l00269">value</a>.</p>
591
592 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00934">arm_compute::test::fixed_point_arithmetic::detail::inv_sqrt()</a>.</p>
593 <div class="fragment"><div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;    {</div>
594 <div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;        <span class="keyword">const</span> uint8_t p     = x.precision();</div>
595 <div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;        int8_t        shift = std::numeric_limits&lt;T&gt;::digits - (p + <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa43c67a536c661ec28398d06bc8ba5af">detail::clz</a>(x.raw()));</div>
596 <div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;</div>
597 <div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;        shift += std::numeric_limits&lt;T&gt;::is_signed ? 1 : 0;</div>
598 <div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;</div>
599 <div class="line"><a name="l00759"></a><span class="lineno">  759</span>&#160;        <span class="comment">// Use volatile to restrict compiler optimizations on shift as compiler reports maybe-uninitialized error on Android</span></div>
600 <div class="line"><a name="l00760"></a><span class="lineno">  760</span>&#160;        <span class="keyword">volatile</span> int8_t *shift_ptr = &amp;shift;</div>
601 <div class="line"><a name="l00761"></a><span class="lineno">  761</span>&#160;</div>
602 <div class="line"><a name="l00762"></a><span class="lineno">  762</span>&#160;        <span class="keyword">auto</span>           const_three = fixed_point&lt;T&gt;(3, p);</div>
603 <div class="line"><a name="l00763"></a><span class="lineno">  763</span>&#160;        <span class="keyword">auto</span>           a           = (*shift_ptr &lt; 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>
604 <div class="line"><a name="l00764"></a><span class="lineno">  764</span>&#160;        fixed_point&lt;T&gt; x2          = a;</div>
605 <div class="line"><a name="l00765"></a><span class="lineno">  765</span>&#160;</div>
606 <div class="line"><a name="l00766"></a><span class="lineno">  766</span>&#160;        <span class="comment">// We need three iterations to find the result for QS8 and five for QS16</span></div>
607 <div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160;        constexpr <span class="keywordtype">int</span> num_iterations = <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same&lt;T, int8_t&gt;::value</a> ? 3 : 5;</div>
608 <div class="line"><a name="l00768"></a><span class="lineno">  768</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; num_iterations; ++i)</div>
609 <div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;        {</div>
610 <div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;            fixed_point&lt;T&gt; 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>
611 <div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160;            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>
612 <div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;        }</div>
613 <div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160;</div>
614 <div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160;        <span class="keywordflow">return</span> (shift &lt; 0) ? <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a0e0473f8d30d0a8067f9903430ddcd85">shift_left</a>(x2, (-shift) &gt;&gt; 1) : <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">shift_right</a>(x2, shift &gt;&gt; 1);</div>
615 <div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;    }</div>
616 <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&lt; T &gt; shift_left(fixed_point&lt; T &gt; 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>
617 <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&lt; T &gt; sub(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
618 <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&lt; T &gt; shift_right(fixed_point&lt; T &gt; 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>
619 <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&lt; T &gt; mul(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
620 <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>
621 <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>
622 </div><!-- fragment -->
623 </div>
624 </div>
625 <a class="anchor" id="a304fe6cc15deaffb14929e42a4ff1c1b"></a>
626 <div class="memitem">
627 <div class="memproto">
628 <table class="mlabels">
629   <tr>
630   <td class="mlabels-left">
631       <table class="memname">
632         <tr>
633           <td class="memname">static bool isequal </td>
634           <td>(</td>
635           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
636           <td class="paramname"><em>x</em>, </td>
637         </tr>
638         <tr>
639           <td class="paramkey"></td>
640           <td></td>
641           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
642           <td class="paramname"><em>y</em>&#160;</td>
643         </tr>
644         <tr>
645           <td></td>
646           <td>)</td>
647           <td></td><td></td>
648         </tr>
649       </table>
650   </td>
651   <td class="mlabels-right">
652 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
653   </tr>
654 </table>
655 </div><div class="memdoc">
656
657 <p>Checks if two fixed point numbers are equal. </p>
658 <dl class="params"><dt>Parameters</dt><dd>
659   <table class="params">
660     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>First fixed point operand </td></tr>
661     <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Second fixed point operand</td></tr>
662   </table>
663   </dd>
664 </dl>
665 <dl class="section return"><dt>Returns</dt><dd>True if fixed points are equal else false </dd></dl>
666
667 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00398">398</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
668
669 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point&lt; T &gt;::rescale()</a>.</p>
670
671 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00413">functions::isnotequal()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">functions::log()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00814">arm_compute::test::fixed_point_arithmetic::detail::operator==()</a>.</p>
672 <div class="fragment"><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;    {</div>
673 <div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;        uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
674 <div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;        x.rescale(p);</div>
675 <div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;        y.rescale(p);</div>
676 <div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;        <span class="keywordflow">return</span> (x.raw() == y.raw());</div>
677 <div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;    }</div>
678 <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&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
679 </div><!-- fragment -->
680 </div>
681 </div>
682 <a class="anchor" id="abd7f7757b9edb7cdd017d439bc5ba8b0"></a>
683 <div class="memitem">
684 <div class="memproto">
685 <table class="mlabels">
686   <tr>
687   <td class="mlabels-left">
688       <table class="memname">
689         <tr>
690           <td class="memname">static bool isgreater </td>
691           <td>(</td>
692           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
693           <td class="paramname"><em>x</em>, </td>
694         </tr>
695         <tr>
696           <td class="paramkey"></td>
697           <td></td>
698           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
699           <td class="paramname"><em>y</em>&#160;</td>
700         </tr>
701         <tr>
702           <td></td>
703           <td>)</td>
704           <td></td><td></td>
705         </tr>
706       </table>
707   </td>
708   <td class="mlabels-right">
709 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
710   </tr>
711 </table>
712 </div><div class="memdoc">
713
714 <p>Checks if one fixed point is greater than the other. </p>
715 <dl class="params"><dt>Parameters</dt><dd>
716   <table class="params">
717     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>First fixed point operand </td></tr>
718     <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Second fixed point operand</td></tr>
719   </table>
720   </dd>
721 </dl>
722 <dl class="section return"><dt>Returns</dt><dd>True if fixed point is greater than other </dd></dl>
723
724 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00425">425</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
725
726 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point&lt; T &gt;::rescale()</a>.</p>
727 <div class="fragment"><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;    {</div>
728 <div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;        uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
729 <div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;        x.rescale(p);</div>
730 <div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;        y.rescale(p);</div>
731 <div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;        <span class="keywordflow">return</span> (x.raw() &gt; y.raw());</div>
732 <div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;    }</div>
733 <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&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
734 </div><!-- fragment -->
735 </div>
736 </div>
737 <a class="anchor" id="a49abe87ad33d2900c2255e4b79322207"></a>
738 <div class="memitem">
739 <div class="memproto">
740 <table class="mlabels">
741   <tr>
742   <td class="mlabels-left">
743       <table class="memname">
744         <tr>
745           <td class="memname">static bool isgreaterequal </td>
746           <td>(</td>
747           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
748           <td class="paramname"><em>x</em>, </td>
749         </tr>
750         <tr>
751           <td class="paramkey"></td>
752           <td></td>
753           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
754           <td class="paramname"><em>y</em>&#160;</td>
755         </tr>
756         <tr>
757           <td></td>
758           <td>)</td>
759           <td></td><td></td>
760         </tr>
761       </table>
762   </td>
763   <td class="mlabels-right">
764 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
765   </tr>
766 </table>
767 </div><div class="memdoc">
768
769 <p>Checks if one fixed point is greater or equal than the other. </p>
770 <dl class="params"><dt>Parameters</dt><dd>
771   <table class="params">
772     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>First fixed point operand </td></tr>
773     <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Second fixed point operand</td></tr>
774   </table>
775   </dd>
776 </dl>
777 <dl class="section return"><dt>Returns</dt><dd>True if fixed point is greater or equal than other </dd></dl>
778
779 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00440">440</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
780
781 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point&lt; T &gt;::rescale()</a>.</p>
782 <div class="fragment"><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;    {</div>
783 <div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;        uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
784 <div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;        x.rescale(p);</div>
785 <div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;        y.rescale(p);</div>
786 <div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;        <span class="keywordflow">return</span> (x.raw() &gt;= y.raw());</div>
787 <div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;    }</div>
788 <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&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
789 </div><!-- fragment -->
790 </div>
791 </div>
792 <a class="anchor" id="ac4dcad0e940cf826063ba1f6ea659c07"></a>
793 <div class="memitem">
794 <div class="memproto">
795 <table class="mlabels">
796   <tr>
797   <td class="mlabels-left">
798       <table class="memname">
799         <tr>
800           <td class="memname">static bool isless </td>
801           <td>(</td>
802           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
803           <td class="paramname"><em>x</em>, </td>
804         </tr>
805         <tr>
806           <td class="paramkey"></td>
807           <td></td>
808           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
809           <td class="paramname"><em>y</em>&#160;</td>
810         </tr>
811         <tr>
812           <td></td>
813           <td>)</td>
814           <td></td><td></td>
815         </tr>
816       </table>
817   </td>
818   <td class="mlabels-right">
819 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
820   </tr>
821 </table>
822 </div><div class="memdoc">
823
824 <p>Checks if one fixed point is less than the other. </p>
825 <dl class="params"><dt>Parameters</dt><dd>
826   <table class="params">
827     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>First fixed point operand </td></tr>
828     <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Second fixed point operand</td></tr>
829   </table>
830   </dd>
831 </dl>
832 <dl class="section return"><dt>Returns</dt><dd>True if fixed point is less than other </dd></dl>
833
834 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00455">455</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
835
836 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point&lt; T &gt;::rescale()</a>.</p>
837
838 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">functions::log()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00824">arm_compute::test::fixed_point_arithmetic::detail::operator&lt;()</a>.</p>
839 <div class="fragment"><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;    {</div>
840 <div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;        uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
841 <div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;        x.rescale(p);</div>
842 <div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;        y.rescale(p);</div>
843 <div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;        <span class="keywordflow">return</span> (x.raw() &lt; y.raw());</div>
844 <div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;    }</div>
845 <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&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
846 </div><!-- fragment -->
847 </div>
848 </div>
849 <a class="anchor" id="a47e151d622ee6e71a0e731585b4fa7d8"></a>
850 <div class="memitem">
851 <div class="memproto">
852 <table class="mlabels">
853   <tr>
854   <td class="mlabels-left">
855       <table class="memname">
856         <tr>
857           <td class="memname">static bool islessequal </td>
858           <td>(</td>
859           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
860           <td class="paramname"><em>x</em>, </td>
861         </tr>
862         <tr>
863           <td class="paramkey"></td>
864           <td></td>
865           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
866           <td class="paramname"><em>y</em>&#160;</td>
867         </tr>
868         <tr>
869           <td></td>
870           <td>)</td>
871           <td></td><td></td>
872         </tr>
873       </table>
874   </td>
875   <td class="mlabels-right">
876 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
877   </tr>
878 </table>
879 </div><div class="memdoc">
880
881 <p>Checks if one fixed point is less or equal than the other. </p>
882 <dl class="params"><dt>Parameters</dt><dd>
883   <table class="params">
884     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>First fixed point operand </td></tr>
885     <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Second fixed point operand</td></tr>
886   </table>
887   </dd>
888 </dl>
889 <dl class="section return"><dt>Returns</dt><dd>True if fixed point is less or equal than other </dd></dl>
890
891 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00470">470</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
892
893 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point&lt; T &gt;::rescale()</a>.</p>
894
895 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">functions::log()</a>.</p>
896 <div class="fragment"><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;    {</div>
897 <div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;        uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
898 <div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;        x.rescale(p);</div>
899 <div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;        y.rescale(p);</div>
900 <div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;        <span class="keywordflow">return</span> (x.raw() &lt;= y.raw());</div>
901 <div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;    }</div>
902 <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&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
903 </div><!-- fragment -->
904 </div>
905 </div>
906 <a class="anchor" id="a814cf7d89e7dad18b0625b4c914dc628"></a>
907 <div class="memitem">
908 <div class="memproto">
909 <table class="mlabels">
910   <tr>
911   <td class="mlabels-left">
912       <table class="memname">
913         <tr>
914           <td class="memname">static bool islessgreater </td>
915           <td>(</td>
916           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
917           <td class="paramname"><em>x</em>, </td>
918         </tr>
919         <tr>
920           <td class="paramkey"></td>
921           <td></td>
922           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
923           <td class="paramname"><em>y</em>&#160;</td>
924         </tr>
925         <tr>
926           <td></td>
927           <td>)</td>
928           <td></td><td></td>
929         </tr>
930       </table>
931   </td>
932   <td class="mlabels-right">
933 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
934   </tr>
935 </table>
936 </div><div class="memdoc">
937
938 <p>Checks if one fixed point is less or greater than the other. </p>
939 <dl class="params"><dt>Parameters</dt><dd>
940   <table class="params">
941     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>First fixed point operand </td></tr>
942     <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Second fixed point operand</td></tr>
943   </table>
944   </dd>
945 </dl>
946 <dl class="section return"><dt>Returns</dt><dd>True if fixed point is less or greater than other </dd></dl>
947
948 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00485">485</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
949
950 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00413">functions::isnotequal()</a>.</p>
951 <div class="fragment"><div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;    {</div>
952 <div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;        <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>
953 <div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;    }</div>
954 <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&lt; T &gt; x, fixed_point&lt; T &gt; 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>
955 </div><!-- fragment -->
956 </div>
957 </div>
958 <a class="anchor" id="a866dbf3e096ad4a487820a8945be3dfe"></a>
959 <div class="memitem">
960 <div class="memproto">
961 <table class="mlabels">
962   <tr>
963   <td class="mlabels-left">
964       <table class="memname">
965         <tr>
966           <td class="memname">static bool isnotequal </td>
967           <td>(</td>
968           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
969           <td class="paramname"><em>x</em>, </td>
970         </tr>
971         <tr>
972           <td class="paramkey"></td>
973           <td></td>
974           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
975           <td class="paramname"><em>y</em>&#160;</td>
976         </tr>
977         <tr>
978           <td></td>
979           <td>)</td>
980           <td></td><td></td>
981         </tr>
982       </table>
983   </td>
984   <td class="mlabels-right">
985 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
986   </tr>
987 </table>
988 </div><div class="memdoc">
989
990 <p>Checks if two fixed point number are not equal. </p>
991 <dl class="params"><dt>Parameters</dt><dd>
992   <table class="params">
993     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>First fixed point operand </td></tr>
994     <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Second fixed point operand</td></tr>
995   </table>
996   </dd>
997 </dl>
998 <dl class="section return"><dt>Returns</dt><dd>True if fixed points are not equal else false </dd></dl>
999
1000 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00413">413</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
1001
1002 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00398">functions::isequal()</a>.</p>
1003
1004 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00485">functions::islessgreater()</a>.</p>
1005 <div class="fragment"><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;    {</div>
1006 <div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;        <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>
1007 <div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;    }</div>
1008 <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&lt; T &gt; x, fixed_point&lt; T &gt; 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>
1009 </div><!-- fragment -->
1010 </div>
1011 </div>
1012 <a class="anchor" id="a33520868a877b6b9a1beccdc1aaa4ec6"></a>
1013 <div class="memitem">
1014 <div class="memproto">
1015 <table class="mlabels">
1016   <tr>
1017   <td class="mlabels-left">
1018       <table class="memname">
1019         <tr>
1020           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; log </td>
1021           <td>(</td>
1022           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
1023           <td class="paramname"><em>x</em></td><td>)</td>
1024           <td></td>
1025         </tr>
1026       </table>
1027   </td>
1028   <td class="mlabels-right">
1029 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
1030   </tr>
1031 </table>
1032 </div><div class="memdoc">
1033
1034 <p>Calculate the logarithm of a fixed point number. </p>
1035 <dl class="params"><dt>Parameters</dt><dd>
1036   <table class="params">
1037     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Fixed point operand</td></tr>
1038   </table>
1039   </dd>
1040 </dl>
1041 <dl class="section return"><dt>Returns</dt><dd>Logarithm value of operand </dd></dl>
1042
1043 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">668</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
1044
1045 <p>References <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29">arm_compute::A</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00527">functions::add()</a>, <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">arm_compute::B</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00598">functions::div()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00398">functions::isequal()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00455">functions::isless()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00470">functions::islessequal()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00577">functions::mul()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00644">functions::shift_right()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00552">functions::sub()</a>, and <a class="el" href="reduction__operation_8cl_source.xhtml#l00052">sum()</a>.</p>
1046
1047 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00929">arm_compute::test::fixed_point_arithmetic::detail::log()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00807">functions::pow()</a>.</p>
1048 <div class="fragment"><div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;    {</div>
1049 <div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;        uint8_t p         = x.precision();</div>
1050 <div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;        <span class="keyword">auto</span>    const_one = fixed_point&lt;T&gt;(<span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(1), p);</div>
1051 <div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;</div>
1052 <div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;        <span class="comment">// Logarithm of 1 is zero and logarithm of negative values is not defined in R, so return 0.</span></div>
1053 <div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;        <span class="comment">// Also, log(x) == -log(1/x) for 0 &lt; x &lt; 1.</span></div>
1054 <div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;        <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, fixed_point&lt;T&gt;(static_cast&lt;T&gt;(0), p)))</div>
1055 <div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;        {</div>
1056 <div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;            <span class="keywordflow">return</span> fixed_point&lt;T&gt;(<span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(0), p, <span class="keyword">true</span>);</div>
1057 <div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;        }</div>
1058 <div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;        <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>
1059 <div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;        {</div>
1060 <div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;            <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)), fixed_point&lt;T&gt;(-1, p));</div>
1061 <div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;        }</div>
1062 <div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;</div>
1063 <div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;        <span class="comment">// Remove even powers of 2</span></div>
1064 <div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;        T shift_val = 31 - __builtin_clz(x.raw() &gt;&gt; p);</div>
1065 <div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;        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>
1066 <div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;        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>
1067 <div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;</div>
1068 <div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;        <span class="comment">// Constants</span></div>
1069 <div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;        <span class="keyword">auto</span> ln2 = fixed_point&lt;T&gt;(0.6931471, p);</div>
1070 <div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;        <span class="keyword">auto</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29">A</a>   = fixed_point&lt;T&gt;(1.4384189, p);</div>
1071 <div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;        <span class="keyword">auto</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">B</a>   = fixed_point&lt;T&gt;(-0.67719, p);</div>
1072 <div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;        <span class="keyword">auto</span> C   = fixed_point&lt;T&gt;(0.3218538, p);</div>
1073 <div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;        <span class="keyword">auto</span> D   = fixed_point&lt;T&gt;(-0.0832229, p);</div>
1074 <div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;</div>
1075 <div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;        <span class="comment">// Polynomial expansion</span></div>
1076 <div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160;        <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>
1077 <div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;        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>
1078 <div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;        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>
1079 <div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;        sum      = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(x, sum);</div>
1080 <div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;</div>
1081 <div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;        <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, fixed_point&lt;T&gt;(static_cast&lt;T&gt;(shift_val), p)), ln2);</div>
1082 <div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;    }</div>
1083 <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>
1084 <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>
1085 <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>
1086 <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&lt; T &gt; add(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
1087 <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&lt; T &gt; x, fixed_point&lt; T &gt; 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>
1088 <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&lt; T &gt; sub(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
1089 <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&lt; T &gt; div(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
1090 <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&lt; T &gt; shift_right(fixed_point&lt; T &gt; 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>
1091 <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&lt; T &gt; mul(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
1092 <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&lt; T &gt; x, fixed_point&lt; T &gt; 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>
1093 <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&lt; T &gt; x, fixed_point&lt; T &gt; 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>
1094 <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&lt; T &gt; log(fixed_point&lt; T &gt; 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>
1095 </div><!-- fragment -->
1096 </div>
1097 </div>
1098 <a class="anchor" id="ad02ce21c48a8f9e419a2ec5f762f3221"></a>
1099 <div class="memitem">
1100 <div class="memproto">
1101 <table class="mlabels">
1102   <tr>
1103   <td class="mlabels-left">
1104       <table class="memname">
1105         <tr>
1106           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; mul </td>
1107           <td>(</td>
1108           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
1109           <td class="paramname"><em>x</em>, </td>
1110         </tr>
1111         <tr>
1112           <td class="paramkey"></td>
1113           <td></td>
1114           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
1115           <td class="paramname"><em>y</em>&#160;</td>
1116         </tr>
1117         <tr>
1118           <td></td>
1119           <td>)</td>
1120           <td></td><td></td>
1121         </tr>
1122       </table>
1123   </td>
1124   <td class="mlabels-right">
1125 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
1126   </tr>
1127 </table>
1128 </div><div class="memdoc">
1129
1130 <p>Perform multiplication among two fixed point numbers. </p>
1131 <dl class="params"><dt>Parameters</dt><dd>
1132   <table class="params">
1133     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>First fixed point operand </td></tr>
1134     <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Second fixed point operand</td></tr>
1135   </table>
1136   </dd>
1137 </dl>
1138 <dl class="section return"><dt>Returns</dt><dd>Result fixed point with precision equal to minimum precision of both operands </dd></dl>
1139
1140 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00577">577</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
1141
1142 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>, <a class="el" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">arm_compute::test::fixed_point_arithmetic::SATURATE</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00360">constant_expr&lt; T &gt;::saturate_cast()</a>.</p>
1143
1144 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00715">functions::exp()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00752">functions::inv_sqrt()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">functions::log()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00859">arm_compute::test::fixed_point_arithmetic::detail::operator*()</a>.</p>
1145 <div class="fragment"><div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;    {</div>
1146 <div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;        <span class="keyword">using</span> promoted_T        = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote&lt;T&gt;::type</a>;</div>
1147 <div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;        uint8_t    p_min        = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
1148 <div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;        uint8_t    p_max        = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::max</a>(x.precision(), y.precision());</div>
1149 <div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;        promoted_T round_factor = (1 &lt;&lt; (p_max - 1));</div>
1150 <div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;        promoted_T val          = ((<span class="keyword">static_cast&lt;</span>promoted_T<span class="keyword">&gt;</span>(x.raw()) * static_cast&lt;promoted_T&gt;(y.raw())) + round_factor) &gt;&gt; p_max;</div>
1151 <div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;        <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
1152 <div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;        {</div>
1153 <div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;            val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr&lt;T&gt;::saturate_cast</a>(val);</div>
1154 <div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;        }</div>
1155 <div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;        <span class="keywordflow">return</span> fixed_point&lt;T&gt;(<span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(val), p_min, <span class="keyword">true</span>);</div>
1156 <div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;    }</div>
1157 <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&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
1158 <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>
1159 <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>
1160 <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>
1161 <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&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
1162 </div><!-- fragment -->
1163 </div>
1164 </div>
1165 <a class="anchor" id="aa78731a2479da19c6604b3baa3ffe33d"></a>
1166 <div class="memitem">
1167 <div class="memproto">
1168 <table class="mlabels">
1169   <tr>
1170   <td class="mlabels-left">
1171       <table class="memname">
1172         <tr>
1173           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; negate </td>
1174           <td>(</td>
1175           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
1176           <td class="paramname"><em>x</em></td><td>)</td>
1177           <td></td>
1178         </tr>
1179       </table>
1180   </td>
1181   <td class="mlabels-right">
1182 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
1183   </tr>
1184 </table>
1185 </div><div class="memdoc">
1186
1187 <p>Negate number. </p>
1188 <dl class="params"><dt>Parameters</dt><dd>
1189   <table class="params">
1190     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Fixed point operand</td></tr>
1191   </table>
1192   </dd>
1193 </dl>
1194 <dl class="section return"><dt>Returns</dt><dd>Negated fixed point result </dd></dl>
1195
1196 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00509">509</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
1197
1198 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>, <a class="el" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">arm_compute::test::fixed_point_arithmetic::SATURATE</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00360">constant_expr&lt; T &gt;::saturate_cast()</a>.</p>
1199
1200 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00854">arm_compute::test::fixed_point_arithmetic::detail::operator-()</a>.</p>
1201 <div class="fragment"><div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;    {</div>
1202 <div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;        <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote&lt;T&gt;::type</a>;</div>
1203 <div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;        promoted_T val   = -x.raw();</div>
1204 <div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;        <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
1205 <div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;        {</div>
1206 <div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;            val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr&lt;T&gt;::saturate_cast</a>(val);</div>
1207 <div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;        }</div>
1208 <div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;        <span class="keywordflow">return</span> fixed_point&lt;T&gt;(<span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(val), x.precision(), <span class="keyword">true</span>);</div>
1209 <div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;    }</div>
1210 <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>
1211 <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>
1212 <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>
1213 </div><!-- fragment -->
1214 </div>
1215 </div>
1216 <a class="anchor" id="a74f7a6f0b0c31beaf3a0bc13e991b1c3"></a>
1217 <div class="memitem">
1218 <div class="memproto">
1219 <table class="mlabels">
1220   <tr>
1221   <td class="mlabels-left">
1222       <table class="memname">
1223         <tr>
1224           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; pow </td>
1225           <td>(</td>
1226           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
1227           <td class="paramname"><em>x</em>, </td>
1228         </tr>
1229         <tr>
1230           <td class="paramkey"></td>
1231           <td></td>
1232           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
1233           <td class="paramname"><em>a</em>&#160;</td>
1234         </tr>
1235         <tr>
1236           <td></td>
1237           <td>)</td>
1238           <td></td><td></td>
1239         </tr>
1240       </table>
1241   </td>
1242   <td class="mlabels-right">
1243 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
1244   </tr>
1245 </table>
1246 </div><div class="memdoc">
1247
1248 <p>Calculate the a-th power of a fixed point number. </p>
1249 <p>The power is computed as x^a = e^(log(x) * a)</p>
1250 <dl class="params"><dt>Parameters</dt><dd>
1251   <table class="params">
1252     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Fixed point operand </td></tr>
1253     <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>Fixed point exponent</td></tr>
1254   </table>
1255   </dd>
1256 </dl>
1257 <dl class="section return"><dt>Returns</dt><dd>a-th power of the operand </dd></dl>
1258
1259 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00807">807</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
1260
1261 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00715">functions::exp()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">functions::log()</a>.</p>
1262
1263 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00944">arm_compute::test::fixed_point_arithmetic::detail::pow()</a>.</p>
1264 <div class="fragment"><div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;    {</div>
1265 <div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160;        <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>
1266 <div class="line"><a name="l00810"></a><span class="lineno">  810</span>&#160;    }</div>
1267 <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&lt; T &gt; exp(fixed_point&lt; T &gt; 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>
1268 <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&lt; T &gt; log(fixed_point&lt; T &gt; 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>
1269 </div><!-- fragment -->
1270 </div>
1271 </div>
1272 <a class="anchor" id="a0e0473f8d30d0a8067f9903430ddcd85"></a>
1273 <div class="memitem">
1274 <div class="memproto">
1275 <table class="mlabels">
1276   <tr>
1277   <td class="mlabels-left">
1278       <table class="memname">
1279         <tr>
1280           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; shift_left </td>
1281           <td>(</td>
1282           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
1283           <td class="paramname"><em>x</em>, </td>
1284         </tr>
1285         <tr>
1286           <td class="paramkey"></td>
1287           <td></td>
1288           <td class="paramtype">size_t&#160;</td>
1289           <td class="paramname"><em>shift</em>&#160;</td>
1290         </tr>
1291         <tr>
1292           <td></td>
1293           <td>)</td>
1294           <td></td><td></td>
1295         </tr>
1296       </table>
1297   </td>
1298   <td class="mlabels-right">
1299 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
1300   </tr>
1301 </table>
1302 </div><div class="memdoc">
1303
1304 <p>Shift left. </p>
1305 <dl class="params"><dt>Parameters</dt><dd>
1306   <table class="params">
1307     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Fixed point operand </td></tr>
1308     <tr><td class="paramdir">[in]</td><td class="paramname">shift</td><td>Shift value</td></tr>
1309   </table>
1310   </dd>
1311 </dl>
1312 <dl class="section return"><dt>Returns</dt><dd>Shifted value </dd></dl>
1313
1314 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00626">626</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
1315
1316 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>, <a class="el" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">arm_compute::test::fixed_point_arithmetic::SATURATE</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00360">constant_expr&lt; T &gt;::saturate_cast()</a>.</p>
1317
1318 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00715">functions::exp()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00752">functions::inv_sqrt()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00874">arm_compute::test::fixed_point_arithmetic::detail::operator&lt;&lt;()</a>.</p>
1319 <div class="fragment"><div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;    {</div>
1320 <div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;        <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote&lt;T&gt;::type</a>;</div>
1321 <div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;        promoted_T val   = <span class="keyword">static_cast&lt;</span>promoted_T<span class="keyword">&gt;</span>(x.raw()) &lt;&lt; shift;</div>
1322 <div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;        <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
1323 <div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;        {</div>
1324 <div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;            val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr&lt;T&gt;::saturate_cast</a>(val);</div>
1325 <div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;        }</div>
1326 <div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;        <span class="keywordflow">return</span> fixed_point&lt;T&gt;(<span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(val), x.precision(), <span class="keyword">true</span>);</div>
1327 <div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;    }</div>
1328 <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>
1329 <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>
1330 <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>
1331 </div><!-- fragment -->
1332 </div>
1333 </div>
1334 <a class="anchor" id="ad1429c74912e4335cd55e6f860acf3b6"></a>
1335 <div class="memitem">
1336 <div class="memproto">
1337 <table class="mlabels">
1338   <tr>
1339   <td class="mlabels-left">
1340       <table class="memname">
1341         <tr>
1342           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; shift_right </td>
1343           <td>(</td>
1344           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
1345           <td class="paramname"><em>x</em>, </td>
1346         </tr>
1347         <tr>
1348           <td class="paramkey"></td>
1349           <td></td>
1350           <td class="paramtype">size_t&#160;</td>
1351           <td class="paramname"><em>shift</em>&#160;</td>
1352         </tr>
1353         <tr>
1354           <td></td>
1355           <td>)</td>
1356           <td></td><td></td>
1357         </tr>
1358       </table>
1359   </td>
1360   <td class="mlabels-right">
1361 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
1362   </tr>
1363 </table>
1364 </div><div class="memdoc">
1365
1366 <p>Shift right. </p>
1367 <dl class="params"><dt>Parameters</dt><dd>
1368   <table class="params">
1369     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Fixed point operand </td></tr>
1370     <tr><td class="paramdir">[in]</td><td class="paramname">shift</td><td>Shift value</td></tr>
1371   </table>
1372   </dd>
1373 </dl>
1374 <dl class="section return"><dt>Returns</dt><dd>Shifted value </dd></dl>
1375
1376 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00644">644</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
1377
1378 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>.</p>
1379
1380 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00715">functions::exp()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00752">functions::inv_sqrt()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">functions::log()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00869">arm_compute::test::fixed_point_arithmetic::detail::operator&gt;&gt;()</a>.</p>
1381 <div class="fragment"><div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;    {</div>
1382 <div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;        <span class="keywordflow">return</span> fixed_point&lt;T&gt;(x.raw() &gt;&gt; shift, x.precision(), <span class="keyword">true</span>);</div>
1383 <div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;    }</div>
1384 </div><!-- fragment -->
1385 </div>
1386 </div>
1387 <a class="anchor" id="a9efa14731a55e3d96adb961214e91734"></a>
1388 <div class="memitem">
1389 <div class="memproto">
1390 <table class="mlabels">
1391   <tr>
1392   <td class="mlabels-left">
1393       <table class="memname">
1394         <tr>
1395           <td class="memname">static bool signbit </td>
1396           <td>(</td>
1397           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
1398           <td class="paramname"><em>x</em></td><td>)</td>
1399           <td></td>
1400         </tr>
1401       </table>
1402   </td>
1403   <td class="mlabels-right">
1404 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
1405   </tr>
1406 </table>
1407 </div><div class="memdoc">
1408
1409 <p>Signbit of a fixed point number. </p>
1410 <dl class="params"><dt>Parameters</dt><dd>
1411   <table class="params">
1412     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Fixed point number</td></tr>
1413   </table>
1414   </dd>
1415 </dl>
1416 <dl class="section return"><dt>Returns</dt><dd>True if negative else false. </dd></dl>
1417
1418 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00386">386</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
1419
1420 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>.</p>
1421 <div class="fragment"><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    {</div>
1422 <div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;        <span class="keywordflow">return</span> ((x.raw() &gt;&gt; std::numeric_limits&lt;T&gt;::digits) != 0);</div>
1423 <div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    }</div>
1424 </div><!-- fragment -->
1425 </div>
1426 </div>
1427 <a class="anchor" id="a287e18f5dec27ac32bfd30039a57dddf"></a>
1428 <div class="memitem">
1429 <div class="memproto">
1430 <table class="mlabels">
1431   <tr>
1432   <td class="mlabels-left">
1433       <table class="memname">
1434         <tr>
1435           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; sub </td>
1436           <td>(</td>
1437           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
1438           <td class="paramname"><em>x</em>, </td>
1439         </tr>
1440         <tr>
1441           <td class="paramkey"></td>
1442           <td></td>
1443           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
1444           <td class="paramname"><em>y</em>&#160;</td>
1445         </tr>
1446         <tr>
1447           <td></td>
1448           <td>)</td>
1449           <td></td><td></td>
1450         </tr>
1451       </table>
1452   </td>
1453   <td class="mlabels-right">
1454 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
1455   </tr>
1456 </table>
1457 </div><div class="memdoc">
1458
1459 <p>Perform subtraction among two fixed point numbers. </p>
1460 <dl class="params"><dt>Parameters</dt><dd>
1461   <table class="params">
1462     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>First fixed point operand </td></tr>
1463     <tr><td class="paramdir">[in]</td><td class="paramname">y</td><td>Second fixed point operand</td></tr>
1464   </table>
1465   </dd>
1466 </dl>
1467 <dl class="section return"><dt>Returns</dt><dd>Result fixed point with precision equal to minimum precision of both operands </dd></dl>
1468
1469 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00552">552</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
1470
1471 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point&lt; T &gt;::raw()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point&lt; T &gt;::rescale()</a>, <a class="el" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">arm_compute::test::fixed_point_arithmetic::SATURATE</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00360">constant_expr&lt; T &gt;::saturate_cast()</a>, and <a class="el" href="hwc_8hpp_source.xhtml#l00204">mali_userspace::type</a>.</p>
1472
1473 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00715">functions::exp()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00752">functions::inv_sqrt()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">functions::log()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00849">arm_compute::test::fixed_point_arithmetic::detail::operator-()</a>.</p>
1474 <div class="fragment"><div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;    {</div>
1475 <div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;        uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
1476 <div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;        x.rescale(p);</div>
1477 <div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;        y.rescale(p);</div>
1478 <div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;        <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
1479 <div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;        {</div>
1480 <div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;            <span class="keyword">using</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a> = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote&lt;T&gt;::type</a>;</div>
1481 <div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;            <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a> val   = <span class="keyword">static_cast&lt;</span><a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a><span class="keyword">&gt;</span>(x.raw()) - static_cast&lt;type&gt;(y.raw());</div>
1482 <div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;            val        = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr&lt;T&gt;::saturate_cast</a>(val);</div>
1483 <div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;            <span class="keywordflow">return</span> fixed_point&lt;T&gt;(<span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(val), p, <span class="keyword">true</span>);</div>
1484 <div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;        }</div>
1485 <div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;        <span class="keywordflow">else</span></div>
1486 <div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;        {</div>
1487 <div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;            <span class="keywordflow">return</span> fixed_point&lt;T&gt;(x.raw() - y.raw(), p, <span class="keyword">true</span>);</div>
1488 <div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;        }</div>
1489 <div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;    }</div>
1490 <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&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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>
1491 <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>
1492 <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>
1493 <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>
1494 </div><!-- fragment -->
1495 </div>
1496 </div>
1497 <a class="anchor" id="a3260014222a62b212c096956c0605fd5"></a>
1498 <div class="memitem">
1499 <div class="memproto">
1500 <table class="mlabels">
1501   <tr>
1502   <td class="mlabels-left">
1503       <table class="memname">
1504         <tr>
1505           <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt;T&gt; tanh </td>
1506           <td>(</td>
1507           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; T &gt;&#160;</td>
1508           <td class="paramname"><em>x</em></td><td>)</td>
1509           <td></td>
1510         </tr>
1511       </table>
1512   </td>
1513   <td class="mlabels-right">
1514 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
1515   </tr>
1516 </table>
1517 </div><div class="memdoc">
1518
1519 <p>Calculate the hyperbolic tangent of a fixed point number. </p>
1520 <dl class="params"><dt>Parameters</dt><dd>
1521   <table class="params">
1522     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Fixed point operand</td></tr>
1523   </table>
1524   </dd>
1525 </dl>
1526 <dl class="section return"><dt>Returns</dt><dd>Hyperbolic tangent of the operand </dd></dl>
1527
1528 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00783">783</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
1529
1530 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00715">functions::exp()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point&lt; T &gt;::precision()</a>.</p>
1531
1532 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00939">arm_compute::test::fixed_point_arithmetic::detail::tanh()</a>.</p>
1533 <div class="fragment"><div class="line"><a name="l00784"></a><span class="lineno">  784</span>&#160;    {</div>
1534 <div class="line"><a name="l00785"></a><span class="lineno">  785</span>&#160;        uint8_t p = x.precision();</div>
1535 <div class="line"><a name="l00786"></a><span class="lineno">  786</span>&#160;        <span class="comment">// Constants</span></div>
1536 <div class="line"><a name="l00787"></a><span class="lineno">  787</span>&#160;        <span class="keyword">auto</span> const_one = fixed_point&lt;T&gt;(1, p);</div>
1537 <div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160;        <span class="keyword">auto</span> const_two = fixed_point&lt;T&gt;(2, p);</div>
1538 <div class="line"><a name="l00789"></a><span class="lineno">  789</span>&#160;</div>
1539 <div class="line"><a name="l00790"></a><span class="lineno">  790</span>&#160;        <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>
1540 <div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160;        <span class="keyword">auto</span> num   = exp2x - const_one;</div>
1541 <div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;        <span class="keyword">auto</span> den   = exp2x + const_one;</div>
1542 <div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;        <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>
1543 <div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;</div>
1544 <div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;        <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>
1545 <div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160;    }</div>
1546 <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&lt; T &gt; tanh(fixed_point&lt; T &gt; 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>
1547 <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&lt; T &gt; exp(fixed_point&lt; T &gt; 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>
1548 </div><!-- fragment -->
1549 </div>
1550 </div>
1551 <a class="anchor" id="a69b97b34f32a6fc05665fc8605806326"></a>
1552 <div class="memitem">
1553 <div class="memproto">
1554 <table class="mlabels">
1555   <tr>
1556   <td class="mlabels-left">
1557       <table class="memname">
1558         <tr>
1559           <td class="memname">static std::basic_ostream&lt;T, traits&gt;&amp; write </td>
1560           <td>(</td>
1561           <td class="paramtype">std::basic_ostream&lt; T, traits &gt; &amp;&#160;</td>
1562           <td class="paramname"><em>s</em>, </td>
1563         </tr>
1564         <tr>
1565           <td class="paramkey"></td>
1566           <td></td>
1567           <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>&lt; U &gt; &amp;&#160;</td>
1568           <td class="paramname"><em>x</em>&#160;</td>
1569         </tr>
1570         <tr>
1571           <td></td>
1572           <td>)</td>
1573           <td></td><td></td>
1574         </tr>
1575       </table>
1576   </td>
1577   <td class="mlabels-right">
1578 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
1579   </tr>
1580 </table>
1581 </div><div class="memdoc">
1582
1583 <p>Output stream operator. </p>
1584 <dl class="params"><dt>Parameters</dt><dd>
1585   <table class="params">
1586     <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>Output stream </td></tr>
1587     <tr><td class="paramdir">[in]</td><td class="paramname">x</td><td>Fixed point value</td></tr>
1588   </table>
1589   </dd>
1590 </dl>
1591 <dl class="section return"><dt>Returns</dt><dd>Reference output to updated stream </dd></dl>
1592
1593 <p>Definition at line <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00375">375</a> of file <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>.</p>
1594
1595 <p>Referenced by <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00879">arm_compute::test::fixed_point_arithmetic::detail::operator&lt;&lt;()</a>.</p>
1596 <div class="fragment"><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;    {</div>
1597 <div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;        <span class="keywordflow">return</span> s &lt;&lt; static_cast&lt;float&gt;(x);</div>
1598 <div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;    }</div>
1599 </div><!-- fragment -->
1600 </div>
1601 </div>
1602 <hr/>The documentation for this struct was generated from the following file:<ul>
1603 <li>tests/validation/<a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a></li>
1604 </ul>
1605 </div><!-- contents -->
1606 </div><!-- doc-content -->
1607 <!-- start footer part -->
1608 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
1609   <ul>
1610     <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test.xhtml">test</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml">fixed_point_arithmetic</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml">detail</a></li><li class="navelem"><a class="el" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml">functions</a></li>
1611     <li class="footer">Generated on Thu Sep 28 2017 14:37:59 for Compute Library by
1612     <a href="http://www.doxygen.org/index.html">
1613     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
1614   </ul>
1615 </div>
1616 </body>
1617 </html>