1 <!-- HTML header for doxygen 1.8.9.1-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
5 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
7 <meta name="generator" content="Doxygen 1.8.6"/>
8 <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
9 <title>Compute Library: 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);
20 <link href="search/search.css" rel="stylesheet" type="text/css"/>
21 <script type="text/javascript" src="search/search.js"></script>
22 <script type="text/javascript">
23 $(document).ready(function() { searchBox.OnSelectItem(0); });
25 <script type="text/x-mathjax-config">
27 extensions: ["tex2jax.js"],
28 jax: ["input/TeX","output/HTML-CSS"],
30 </script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
31 <link href="doxygen.css" rel="stylesheet" type="text/css" />
34 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
36 <table cellspacing="0" cellpadding="0">
38 <tr style="height: 56px;">
39 <td style="padding-left: 0.5em;">
40 <div id="projectname">Compute Library
41  <span id="projectnumber">17.09</span>
48 <!-- end header part -->
49 <!-- Generated by Doxygen 1.8.6 -->
50 <script type="text/javascript">
51 var searchBox = new SearchBox("searchBox", "search",false,'Search');
53 <div id="navrow1" class="tabs">
55 <li><a href="index.xhtml"><span>Main Page</span></a></li>
56 <li><a href="pages.xhtml"><span>Related Pages</span></a></li>
57 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
58 <li class="current"><a href="annotated.xhtml"><span>Data Structures</span></a></li>
59 <li><a href="files.xhtml"><span>Files</span></a></li>
61 <div id="MSearchBox" class="MSearchBoxInactive">
63 <img id="MSearchSelect" src="search/mag_sel.png"
64 onmouseover="return searchBox.OnSearchSelectShow()"
65 onmouseout="return searchBox.OnSearchSelectHide()"
67 <input type="text" id="MSearchField" value="Search" accesskey="S"
68 onfocus="searchBox.OnSearchFieldFocus(true)"
69 onblur="searchBox.OnSearchFieldFocus(false)"
70 onkeyup="searchBox.OnSearchFieldChange(event)"/>
71 </span><span class="right">
72 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
78 <div id="navrow2" class="tabs2">
80 <li><a href="annotated.xhtml"><span>Data Structures</span></a></li>
81 <li><a href="classes.xhtml"><span>Data Structure Index</span></a></li>
82 <li><a href="inherits.xhtml"><span>Class Hierarchy</span></a></li>
83 <li><a href="functions.xhtml"><span>Data Fields</span></a></li>
87 <div id="side-nav" class="ui-resizable side-nav-resizable">
89 <div id="nav-tree-contents">
90 <div id="nav-sync" class="sync"></div>
93 <div id="splitbar" style="-moz-user-select:none;"
94 class="ui-resizable-handle">
97 <script type="text/javascript">
98 $(document).ready(function(){initNavTree('structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml','');});
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"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Pages</a></div>
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">
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>
121 <div class="contents">
123 <p><code>#include <<a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml">FixedPoint.h</a>></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<typename T , typename U , typename traits > </td></tr>
128 <tr class="memitem:a69b97b34f32a6fc05665fc8605806326"><td class="memTemplItemLeft" align="right" valign="top">static std::basic_ostream< T, <br class="typebreak"/>
129 traits > & </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< T, traits > &s, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< U > &x)</td></tr>
130 <tr class="memdesc:a69b97b34f32a6fc05665fc8605806326"><td class="mdescLeft"> </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"> </td></tr>
132 <tr class="memitem:a9efa14731a55e3d96adb961214e91734"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
133 <tr class="memitem:a9efa14731a55e3d96adb961214e91734"><td class="memTemplItemLeft" align="right" valign="top">static bool </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>< T > x)</td></tr>
134 <tr class="memdesc:a9efa14731a55e3d96adb961214e91734"><td class="mdescLeft"> </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"> </td></tr>
136 <tr class="memitem:a304fe6cc15deaffb14929e42a4ff1c1b"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
137 <tr class="memitem:a304fe6cc15deaffb14929e42a4ff1c1b"><td class="memTemplItemLeft" align="right" valign="top">static bool </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>< T > x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > y)</td></tr>
138 <tr class="memdesc:a304fe6cc15deaffb14929e42a4ff1c1b"><td class="mdescLeft"> </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"> </td></tr>
140 <tr class="memitem:a866dbf3e096ad4a487820a8945be3dfe"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
141 <tr class="memitem:a866dbf3e096ad4a487820a8945be3dfe"><td class="memTemplItemLeft" align="right" valign="top">static bool </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>< T > x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > y)</td></tr>
142 <tr class="memdesc:a866dbf3e096ad4a487820a8945be3dfe"><td class="mdescLeft"> </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"> </td></tr>
144 <tr class="memitem:abd7f7757b9edb7cdd017d439bc5ba8b0"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
145 <tr class="memitem:abd7f7757b9edb7cdd017d439bc5ba8b0"><td class="memTemplItemLeft" align="right" valign="top">static bool </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>< T > x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > y)</td></tr>
146 <tr class="memdesc:abd7f7757b9edb7cdd017d439bc5ba8b0"><td class="mdescLeft"> </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"> </td></tr>
148 <tr class="memitem:a49abe87ad33d2900c2255e4b79322207"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
149 <tr class="memitem:a49abe87ad33d2900c2255e4b79322207"><td class="memTemplItemLeft" align="right" valign="top">static bool </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>< T > x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > y)</td></tr>
150 <tr class="memdesc:a49abe87ad33d2900c2255e4b79322207"><td class="mdescLeft"> </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"> </td></tr>
152 <tr class="memitem:ac4dcad0e940cf826063ba1f6ea659c07"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
153 <tr class="memitem:ac4dcad0e940cf826063ba1f6ea659c07"><td class="memTemplItemLeft" align="right" valign="top">static bool </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>< T > x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > y)</td></tr>
154 <tr class="memdesc:ac4dcad0e940cf826063ba1f6ea659c07"><td class="mdescLeft"> </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"> </td></tr>
156 <tr class="memitem:a47e151d622ee6e71a0e731585b4fa7d8"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
157 <tr class="memitem:a47e151d622ee6e71a0e731585b4fa7d8"><td class="memTemplItemLeft" align="right" valign="top">static bool </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>< T > x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > y)</td></tr>
158 <tr class="memdesc:a47e151d622ee6e71a0e731585b4fa7d8"><td class="mdescLeft"> </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"> </td></tr>
160 <tr class="memitem:a814cf7d89e7dad18b0625b4c914dc628"><td class="memTemplParams" colspan="2">template<typename T > </td></tr>
161 <tr class="memitem:a814cf7d89e7dad18b0625b4c914dc628"><td class="memTemplItemLeft" align="right" valign="top">static bool </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>< T > x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > y)</td></tr>
162 <tr class="memdesc:a814cf7d89e7dad18b0625b4c914dc628"><td class="mdescLeft"> </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"> </td></tr>
164 <tr class="memitem:a2d681ad37360fc4497f147af98951ba0"><td class="memTemplParams" colspan="2">template<typename T > </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>< T > </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>< T > 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"> </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"> </td></tr>
168 <tr class="memitem:aa78731a2479da19c6604b3baa3ffe33d"><td class="memTemplParams" colspan="2">template<OverflowPolicy OP = OverflowPolicy::SATURATE, typename T > </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>< T > </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>< T > x)</td></tr>
170 <tr class="memdesc:aa78731a2479da19c6604b3baa3ffe33d"><td class="mdescLeft"> </td><td class="mdescRight">Negate number. <a href="#aa78731a2479da19c6604b3baa3ffe33d">More...</a><br/></td></tr>
171 <tr class="separator:aa78731a2479da19c6604b3baa3ffe33d"><td class="memSeparator" colspan="2"> </td></tr>
172 <tr class="memitem:a40956c61706d70b8978c2b87ac455d2a"><td class="memTemplParams" colspan="2">template<OverflowPolicy OP = OverflowPolicy::SATURATE, typename T > </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>< T > </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>< T > x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > y)</td></tr>
174 <tr class="memdesc:a40956c61706d70b8978c2b87ac455d2a"><td class="mdescLeft"> </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"> </td></tr>
176 <tr class="memitem:a287e18f5dec27ac32bfd30039a57dddf"><td class="memTemplParams" colspan="2">template<OverflowPolicy OP = OverflowPolicy::SATURATE, typename T > </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>< T > </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>< T > x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > y)</td></tr>
178 <tr class="memdesc:a287e18f5dec27ac32bfd30039a57dddf"><td class="mdescLeft"> </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"> </td></tr>
180 <tr class="memitem:ad02ce21c48a8f9e419a2ec5f762f3221"><td class="memTemplParams" colspan="2">template<OverflowPolicy OP = OverflowPolicy::SATURATE, typename T > </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>< T > </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>< T > x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > y)</td></tr>
182 <tr class="memdesc:ad02ce21c48a8f9e419a2ec5f762f3221"><td class="mdescLeft"> </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"> </td></tr>
184 <tr class="memitem:a72d043524e13bf27c605c2dee2e20a2a"><td class="memTemplParams" colspan="2">template<OverflowPolicy OP = OverflowPolicy::SATURATE, typename T > </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>< T > </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>< T > x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > y)</td></tr>
186 <tr class="memdesc:a72d043524e13bf27c605c2dee2e20a2a"><td class="mdescLeft"> </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"> </td></tr>
188 <tr class="memitem:a0e0473f8d30d0a8067f9903430ddcd85"><td class="memTemplParams" colspan="2">template<OverflowPolicy OP = OverflowPolicy::SATURATE, typename T > </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>< T > </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>< T > x, size_t shift)</td></tr>
190 <tr class="memdesc:a0e0473f8d30d0a8067f9903430ddcd85"><td class="mdescLeft"> </td><td class="mdescRight">Shift left. <a href="#a0e0473f8d30d0a8067f9903430ddcd85">More...</a><br/></td></tr>
191 <tr class="separator:a0e0473f8d30d0a8067f9903430ddcd85"><td class="memSeparator" colspan="2"> </td></tr>
192 <tr class="memitem:ad1429c74912e4335cd55e6f860acf3b6"><td class="memTemplParams" colspan="2">template<typename T > </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>< T > </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>< T > x, size_t shift)</td></tr>
194 <tr class="memdesc:ad1429c74912e4335cd55e6f860acf3b6"><td class="mdescLeft"> </td><td class="mdescRight">Shift right. <a href="#ad1429c74912e4335cd55e6f860acf3b6">More...</a><br/></td></tr>
195 <tr class="separator:ad1429c74912e4335cd55e6f860acf3b6"><td class="memSeparator" colspan="2"> </td></tr>
196 <tr class="memitem:a3c04cac868606ed11c00761f0d5b3d2c"><td class="memTemplParams" colspan="2">template<typename T > </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>< T > </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>< T > x)</td></tr>
198 <tr class="memdesc:a3c04cac868606ed11c00761f0d5b3d2c"><td class="mdescLeft"> </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"> </td></tr>
200 <tr class="memitem:a33520868a877b6b9a1beccdc1aaa4ec6"><td class="memTemplParams" colspan="2">template<typename T > </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>< T > </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>< T > x)</td></tr>
202 <tr class="memdesc:a33520868a877b6b9a1beccdc1aaa4ec6"><td class="mdescLeft"> </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"> </td></tr>
204 <tr class="memitem:ac66bdd16622d4498cc0299db1efcef54"><td class="memTemplParams" colspan="2">template<typename T > </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>< T > </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>< T > x)</td></tr>
206 <tr class="memdesc:ac66bdd16622d4498cc0299db1efcef54"><td class="mdescLeft"> </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"> </td></tr>
208 <tr class="memitem:a6a7c1ca385d21fe457259a8fd9debfbf"><td class="memTemplParams" colspan="2">template<typename T > </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>< T > </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>< T > x)</td></tr>
210 <tr class="memdesc:a6a7c1ca385d21fe457259a8fd9debfbf"><td class="mdescLeft"> </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"> </td></tr>
212 <tr class="memitem:a3260014222a62b212c096956c0605fd5"><td class="memTemplParams" colspan="2">template<typename T > </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>< T > </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>< T > x)</td></tr>
214 <tr class="memdesc:a3260014222a62b212c096956c0605fd5"><td class="mdescLeft"> </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"> </td></tr>
216 <tr class="memitem:a74f7a6f0b0c31beaf3a0bc13e991b1c3"><td class="memTemplParams" colspan="2">template<typename T > </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>< T > </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>< T > x, <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > a)</td></tr>
218 <tr class="memdesc:a74f7a6f0b0c31beaf3a0bc13e991b1c3"><td class="mdescLeft"> </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"> </td></tr>
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">
230 <td class="mlabels-left">
231 <table class="memname">
233 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> abs </td>
235 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
236 <td class="paramname"><em>x</em></td><td>)</td>
241 <td class="mlabels-right">
242 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
245 </div><div class="memdoc">
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>
254 <dl class="section return"><dt>Returns</dt><dd>Absolute value of operand </dd></dl>
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>
258 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point< T >::precision()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::raw()</a>.</p>
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>  {</div>
262 <div class="line"><a name="l00657"></a><span class="lineno"> 657</span>  <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote<T>::type</a>;</div>
263 <div class="line"><a name="l00658"></a><span class="lineno"> 658</span>  T val = (x.raw() < 0) ? <a class="code" href="namespacearm__compute_1_1test.xhtml#a4965b2f6821e0cf0afee738158bd8377">constant_expr<T>::saturate_cast</a>(-static_cast<promoted_T>(x.raw())) : x.raw();</div>
264 <div class="line"><a name="l00659"></a><span class="lineno"> 659</span>  <span class="keywordflow">return</span> fixed_point<T>(val, x.precision(), <span class="keyword">true</span>);</div>
265 <div class="line"><a name="l00660"></a><span class="lineno"> 660</span>  }</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 -->
271 <a class="anchor" id="a40956c61706d70b8978c2b87ac455d2a"></a>
272 <div class="memitem">
273 <div class="memproto">
274 <table class="mlabels">
276 <td class="mlabels-left">
277 <table class="memname">
279 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> add </td>
281 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
282 <td class="paramname"><em>x</em>, </td>
285 <td class="paramkey"></td>
287 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
288 <td class="paramname"><em>y</em> </td>
297 <td class="mlabels-right">
298 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
301 </div><div class="memdoc">
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>
311 <dl class="section return"><dt>Returns</dt><dd>Result fixed point with precision equal to minimum precision of both operands </dd></dl>
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>
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< T >::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::raw()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point< T >::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< T >::saturate_cast()</a>, and <a class="el" href="hwc_8hpp_source.xhtml#l00204">mali_userspace::type</a>.</p>
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>  {</div>
319 <div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
320 <div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  x.rescale(p);</div>
321 <div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  y.rescale(p);</div>
322 <div class="line"><a name="l00532"></a><span class="lineno"> 532</span>  <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
323 <div class="line"><a name="l00533"></a><span class="lineno"> 533</span>  {</div>
324 <div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  <span class="keyword">using</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a> = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote<T>::type</a>;</div>
325 <div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a> val = <span class="keyword">static_cast<</span><a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a><span class="keyword">></span>(x.raw()) + static_cast<type>(y.raw());</div>
326 <div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr<T>::saturate_cast</a>(val);</div>
327 <div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  <span class="keywordflow">return</span> fixed_point<T>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(val), p, <span class="keyword">true</span>);</div>
328 <div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  }</div>
329 <div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  <span class="keywordflow">else</span></div>
330 <div class="line"><a name="l00540"></a><span class="lineno"> 540</span>  {</div>
331 <div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  <span class="keywordflow">return</span> fixed_point<T>(x.raw() + y.raw(), p, <span class="keyword">true</span>);</div>
332 <div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  }</div>
333 <div class="line"><a name="l00543"></a><span class="lineno"> 543</span>  }</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< T > min(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">FixedPoint.h:884</a></div></div>
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 -->
341 <a class="anchor" id="a2d681ad37360fc4497f147af98951ba0"></a>
342 <div class="memitem">
343 <div class="memproto">
344 <table class="mlabels">
346 <td class="mlabels-left">
347 <table class="memname">
349 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> clamp </td>
351 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
352 <td class="paramname"><em>x</em>, </td>
355 <td class="paramkey"></td>
357 <td class="paramtype">T </td>
358 <td class="paramname"><em>min</em>, </td>
361 <td class="paramkey"></td>
363 <td class="paramtype">T </td>
364 <td class="paramname"><em>max</em> </td>
373 <td class="mlabels-right">
374 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
377 </div><div class="memdoc">
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>
388 <dl class="section return"><dt>Returns</dt><dd>Clamped result </dd></dl>
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>
392 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00349">constant_expr< T >::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< T >::precision()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::raw()</a>.</p>
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>  {</div>
396 <div class="line"><a name="l00500"></a><span class="lineno"> 500</span>  <span class="keywordflow">return</span> fixed_point<T>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a996cf0a2779076326d094ef9d75ddd1f">constant_expr<T>::clamp</a>(x.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>  }</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< T > min(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">FixedPoint.h:884</a></div></div>
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< T > max(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">FixedPoint.h:889</a></div></div>
401 </div><!-- fragment -->
404 <a class="anchor" id="a72d043524e13bf27c605c2dee2e20a2a"></a>
405 <div class="memitem">
406 <div class="memproto">
407 <table class="mlabels">
409 <td class="mlabels-left">
410 <table class="memname">
412 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> div </td>
414 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
415 <td class="paramname"><em>x</em>, </td>
418 <td class="paramkey"></td>
420 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
421 <td class="paramname"><em>y</em> </td>
430 <td class="mlabels-right">
431 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
434 </div><div class="memdoc">
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>
444 <dl class="section return"><dt>Returns</dt><dd>Result fixed point with precision equal to minimum precision of both operands </dd></dl>
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>
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< T >::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::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< T >::saturate_cast()</a>.</p>
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>  {</div>
452 <div class="line"><a name="l00600"></a><span class="lineno"> 600</span>  <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote<T>::type</a>;</div>
453 <div class="line"><a name="l00601"></a><span class="lineno"> 601</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
454 <div class="line"><a name="l00602"></a><span class="lineno"> 602</span>  promoted_T denom = <span class="keyword">static_cast<</span>promoted_T<span class="keyword">></span>(y.raw());</div>
455 <div class="line"><a name="l00603"></a><span class="lineno"> 603</span>  <span class="keywordflow">if</span>(denom != 0)</div>
456 <div class="line"><a name="l00604"></a><span class="lineno"> 604</span>  {</div>
457 <div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  promoted_T val = (<span class="keyword">static_cast<</span>promoted_T<span class="keyword">></span>(x.raw()) << <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>  <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>  {</div>
460 <div class="line"><a name="l00608"></a><span class="lineno"> 608</span>  val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr<T>::saturate_cast</a>(val);</div>
461 <div class="line"><a name="l00609"></a><span class="lineno"> 609</span>  }</div>
462 <div class="line"><a name="l00610"></a><span class="lineno"> 610</span>  <span class="keywordflow">return</span> fixed_point<T>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(val), p, <span class="keyword">true</span>);</div>
463 <div class="line"><a name="l00611"></a><span class="lineno"> 611</span>  }</div>
464 <div class="line"><a name="l00612"></a><span class="lineno"> 612</span>  <span class="keywordflow">else</span></div>
465 <div class="line"><a name="l00613"></a><span class="lineno"> 613</span>  {</div>
466 <div class="line"><a name="l00614"></a><span class="lineno"> 614</span>  T val = (x.raw() < 0) ? <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::numeric_limits<T>::min</a>() : <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits<T>::max</a>();</div>
467 <div class="line"><a name="l00615"></a><span class="lineno"> 615</span>  <span class="keywordflow">return</span> fixed_point<T>(val, p, <span class="keyword">true</span>);</div>
468 <div class="line"><a name="l00616"></a><span class="lineno"> 616</span>  }</div>
469 <div class="line"><a name="l00617"></a><span class="lineno"> 617</span>  }</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< T > min(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">FixedPoint.h:884</a></div></div>
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< T > max(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">FixedPoint.h:889</a></div></div>
475 </div><!-- fragment -->
478 <a class="anchor" id="ac66bdd16622d4498cc0299db1efcef54"></a>
479 <div class="memitem">
480 <div class="memproto">
481 <table class="mlabels">
483 <td class="mlabels-left">
484 <table class="memname">
486 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> exp </td>
488 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
489 <td class="paramname"><em>x</em></td><td>)</td>
494 <td class="mlabels-right">
495 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
498 </div><div class="memdoc">
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)) << (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>
508 <dl class="section return"><dt>Returns</dt><dd>Exponential value of operand </dd></dl>
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>
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< T >::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< T >::to_int()</a>.</p>
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>  {</div>
516 <div class="line"><a name="l00717"></a><span class="lineno"> 717</span>  uint8_t p = x.precision();</div>
517 <div class="line"><a name="l00718"></a><span class="lineno"> 718</span>  <span class="comment">// Constants</span></div>
518 <div class="line"><a name="l00719"></a><span class="lineno"> 719</span>  <span class="keyword">auto</span> const_one = fixed_point<T>(1, p);</div>
519 <div class="line"><a name="l00720"></a><span class="lineno"> 720</span>  <span class="keyword">auto</span> ln2 = fixed_point<T>(0.6931471, p);</div>
520 <div class="line"><a name="l00721"></a><span class="lineno"> 721</span>  <span class="keyword">auto</span> inv_ln2 = fixed_point<T>(1.442695, p);</div>
521 <div class="line"><a name="l00722"></a><span class="lineno"> 722</span>  <span class="keyword">auto</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29">A</a> = fixed_point<T>(0.9978546, p);</div>
522 <div class="line"><a name="l00723"></a><span class="lineno"> 723</span>  <span class="keyword">auto</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">B</a> = fixed_point<T>(0.4994721, p);</div>
523 <div class="line"><a name="l00724"></a><span class="lineno"> 724</span>  <span class="keyword">auto</span> C = fixed_point<T>(0.1763723, p);</div>
524 <div class="line"><a name="l00725"></a><span class="lineno"> 725</span>  <span class="keyword">auto</span> D = fixed_point<T>(0.0435108, p);</div>
525 <div class="line"><a name="l00726"></a><span class="lineno"> 726</span> </div>
526 <div class="line"><a name="l00727"></a><span class="lineno"> 727</span>  T scaled_int_part = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a918ab57096fdfe5e2cbf70de5145b9fa">detail::constant_expr<T>::to_int</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(x, inv_ln2).raw(), p);</div>
527 <div class="line"><a name="l00728"></a><span class="lineno"> 728</span> </div>
528 <div class="line"><a name="l00729"></a><span class="lineno"> 729</span>  <span class="comment">// Polynomial expansion</span></div>
529 <div class="line"><a name="l00730"></a><span class="lineno"> 730</span>  <span class="keyword">auto</span> frac_part = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a287e18f5dec27ac32bfd30039a57dddf">sub</a>(x, <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(ln2, fixed_point<T>(scaled_int_part, p)));</div>
530 <div class="line"><a name="l00731"></a><span class="lineno"> 731</span>  <span class="keyword">auto</span> taylor = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(frac_part, D), C);</div>
531 <div class="line"><a name="l00732"></a><span class="lineno"> 732</span>  taylor = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(frac_part, taylor), B);</div>
532 <div class="line"><a name="l00733"></a><span class="lineno"> 733</span>  taylor = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(frac_part, taylor), A);</div>
533 <div class="line"><a name="l00734"></a><span class="lineno"> 734</span>  taylor = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(frac_part, taylor);</div>
534 <div class="line"><a name="l00735"></a><span class="lineno"> 735</span>  taylor = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(taylor, const_one);</div>
535 <div class="line"><a name="l00736"></a><span class="lineno"> 736</span> </div>
536 <div class="line"><a name="l00737"></a><span class="lineno"> 737</span>  <span class="comment">// Saturate value</span></div>
537 <div class="line"><a name="l00738"></a><span class="lineno"> 738</span>  <span class="keywordflow">if</span>(static_cast<T>(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa43c67a536c661ec28398d06bc8ba5af">clz</a>(taylor.raw())) <= scaled_int_part)</div>
538 <div class="line"><a name="l00739"></a><span class="lineno"> 739</span>  {</div>
539 <div class="line"><a name="l00740"></a><span class="lineno"> 740</span>  <span class="keywordflow">return</span> fixed_point<T>(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits<T>::max</a>(), p, <span class="keyword">true</span>);</div>
540 <div class="line"><a name="l00741"></a><span class="lineno"> 741</span>  }</div>
541 <div class="line"><a name="l00742"></a><span class="lineno"> 742</span> </div>
542 <div class="line"><a name="l00743"></a><span class="lineno"> 743</span>  <span class="keywordflow">return</span> (scaled_int_part < 0) ? <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">shift_right</a>(taylor, -scaled_int_part) : <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a0e0473f8d30d0a8067f9903430ddcd85">shift_left</a>(taylor, scaled_int_part);</div>
543 <div class="line"><a name="l00744"></a><span class="lineno"> 744</span>  }</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< T > add(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Perform addition among two fixed point numbers. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00527">FixedPoint.h:527</a></div></div>
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< T > shift_left(fixed_point< T > x, size_t shift)</div><div class="ttdoc">Shift left. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00626">FixedPoint.h:626</a></div></div>
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< T > sub(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Perform subtraction among two fixed point numbers. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00552">FixedPoint.h:552</a></div></div>
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< T > shift_right(fixed_point< T > x, size_t shift)</div><div class="ttdoc">Shift right. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00644">FixedPoint.h:644</a></div></div>
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< T > mul(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Perform multiplication among two fixed point numbers. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00577">FixedPoint.h:577</a></div></div>
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< T > max(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">FixedPoint.h:889</a></div></div>
554 </div><!-- fragment -->
557 <a class="anchor" id="a6a7c1ca385d21fe457259a8fd9debfbf"></a>
558 <div class="memitem">
559 <div class="memproto">
560 <table class="mlabels">
562 <td class="mlabels-left">
563 <table class="memname">
565 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> inv_sqrt </td>
567 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
568 <td class="paramname"><em>x</em></td><td>)</td>
573 <td class="mlabels-right">
574 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
577 </div><div class="memdoc">
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>
586 <dl class="section return"><dt>Returns</dt><dd>Inverse square root value of operand </dd></dl>
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>
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< T >::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::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>
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>  {</div>
594 <div class="line"><a name="l00754"></a><span class="lineno"> 754</span>  <span class="keyword">const</span> uint8_t p = x.precision();</div>
595 <div class="line"><a name="l00755"></a><span class="lineno"> 755</span>  int8_t shift = std::numeric_limits<T>::digits - (p + <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aa43c67a536c661ec28398d06bc8ba5af">detail::clz</a>(x.raw()));</div>
596 <div class="line"><a name="l00756"></a><span class="lineno"> 756</span> </div>
597 <div class="line"><a name="l00757"></a><span class="lineno"> 757</span>  shift += std::numeric_limits<T>::is_signed ? 1 : 0;</div>
598 <div class="line"><a name="l00758"></a><span class="lineno"> 758</span> </div>
599 <div class="line"><a name="l00759"></a><span class="lineno"> 759</span>  <span class="comment">// Use volatile to restrict compiler optimizations on shift as compiler reports maybe-uninitialized error on Android</span></div>
600 <div class="line"><a name="l00760"></a><span class="lineno"> 760</span>  <span class="keyword">volatile</span> int8_t *shift_ptr = &shift;</div>
601 <div class="line"><a name="l00761"></a><span class="lineno"> 761</span> </div>
602 <div class="line"><a name="l00762"></a><span class="lineno"> 762</span>  <span class="keyword">auto</span> const_three = fixed_point<T>(3, p);</div>
603 <div class="line"><a name="l00763"></a><span class="lineno"> 763</span>  <span class="keyword">auto</span> a = (*shift_ptr < 0) ? <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a0e0473f8d30d0a8067f9903430ddcd85">shift_left</a>(x, -(shift)) : <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">shift_right</a>(x, shift);</div>
604 <div class="line"><a name="l00764"></a><span class="lineno"> 764</span>  fixed_point<T> x2 = a;</div>
605 <div class="line"><a name="l00765"></a><span class="lineno"> 765</span> </div>
606 <div class="line"><a name="l00766"></a><span class="lineno"> 766</span>  <span class="comment">// We need three iterations to find the result for QS8 and five for QS16</span></div>
607 <div class="line"><a name="l00767"></a><span class="lineno"> 767</span>  constexpr <span class="keywordtype">int</span> num_iterations = <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::is_same<T, int8_t>::value</a> ? 3 : 5;</div>
608 <div class="line"><a name="l00768"></a><span class="lineno"> 768</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i < num_iterations; ++i)</div>
609 <div class="line"><a name="l00769"></a><span class="lineno"> 769</span>  {</div>
610 <div class="line"><a name="l00770"></a><span class="lineno"> 770</span>  fixed_point<T> 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>  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>  }</div>
613 <div class="line"><a name="l00773"></a><span class="lineno"> 773</span> </div>
614 <div class="line"><a name="l00774"></a><span class="lineno"> 774</span>  <span class="keywordflow">return</span> (shift < 0) ? <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a0e0473f8d30d0a8067f9903430ddcd85">shift_left</a>(x2, (-shift) >> 1) : <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">shift_right</a>(x2, shift >> 1);</div>
615 <div class="line"><a name="l00775"></a><span class="lineno"> 775</span>  }</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< T > shift_left(fixed_point< T > x, size_t shift)</div><div class="ttdoc">Shift left. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00626">FixedPoint.h:626</a></div></div>
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< T > sub(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Perform subtraction among two fixed point numbers. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00552">FixedPoint.h:552</a></div></div>
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< T > shift_right(fixed_point< T > x, size_t shift)</div><div class="ttdoc">Shift right. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00644">FixedPoint.h:644</a></div></div>
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< T > mul(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Perform multiplication among two fixed point numbers. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00577">FixedPoint.h:577</a></div></div>
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 -->
625 <a class="anchor" id="a304fe6cc15deaffb14929e42a4ff1c1b"></a>
626 <div class="memitem">
627 <div class="memproto">
628 <table class="mlabels">
630 <td class="mlabels-left">
631 <table class="memname">
633 <td class="memname">static bool isequal </td>
635 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
636 <td class="paramname"><em>x</em>, </td>
639 <td class="paramkey"></td>
641 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
642 <td class="paramname"><em>y</em> </td>
651 <td class="mlabels-right">
652 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
655 </div><div class="memdoc">
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>
665 <dl class="section return"><dt>Returns</dt><dd>True if fixed points are equal else false </dd></dl>
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>
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< T >::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::raw()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point< T >::rescale()</a>.</p>
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>  {</div>
673 <div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
674 <div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  x.rescale(p);</div>
675 <div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  y.rescale(p);</div>
676 <div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  <span class="keywordflow">return</span> (x.raw() == y.raw());</div>
677 <div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  }</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< T > min(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">FixedPoint.h:884</a></div></div>
679 </div><!-- fragment -->
682 <a class="anchor" id="abd7f7757b9edb7cdd017d439bc5ba8b0"></a>
683 <div class="memitem">
684 <div class="memproto">
685 <table class="mlabels">
687 <td class="mlabels-left">
688 <table class="memname">
690 <td class="memname">static bool isgreater </td>
692 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
693 <td class="paramname"><em>x</em>, </td>
696 <td class="paramkey"></td>
698 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
699 <td class="paramname"><em>y</em> </td>
708 <td class="mlabels-right">
709 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
712 </div><div class="memdoc">
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>
722 <dl class="section return"><dt>Returns</dt><dd>True if fixed point is greater than other </dd></dl>
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>
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< T >::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::raw()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point< T >::rescale()</a>.</p>
727 <div class="fragment"><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  {</div>
728 <div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
729 <div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  x.rescale(p);</div>
730 <div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  y.rescale(p);</div>
731 <div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  <span class="keywordflow">return</span> (x.raw() > y.raw());</div>
732 <div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  }</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< T > min(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">FixedPoint.h:884</a></div></div>
734 </div><!-- fragment -->
737 <a class="anchor" id="a49abe87ad33d2900c2255e4b79322207"></a>
738 <div class="memitem">
739 <div class="memproto">
740 <table class="mlabels">
742 <td class="mlabels-left">
743 <table class="memname">
745 <td class="memname">static bool isgreaterequal </td>
747 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
748 <td class="paramname"><em>x</em>, </td>
751 <td class="paramkey"></td>
753 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
754 <td class="paramname"><em>y</em> </td>
763 <td class="mlabels-right">
764 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
767 </div><div class="memdoc">
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>
777 <dl class="section return"><dt>Returns</dt><dd>True if fixed point is greater or equal than other </dd></dl>
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>
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< T >::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::raw()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point< T >::rescale()</a>.</p>
782 <div class="fragment"><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  {</div>
783 <div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
784 <div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  x.rescale(p);</div>
785 <div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  y.rescale(p);</div>
786 <div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  <span class="keywordflow">return</span> (x.raw() >= y.raw());</div>
787 <div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  }</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< T > min(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">FixedPoint.h:884</a></div></div>
789 </div><!-- fragment -->
792 <a class="anchor" id="ac4dcad0e940cf826063ba1f6ea659c07"></a>
793 <div class="memitem">
794 <div class="memproto">
795 <table class="mlabels">
797 <td class="mlabels-left">
798 <table class="memname">
800 <td class="memname">static bool isless </td>
802 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
803 <td class="paramname"><em>x</em>, </td>
806 <td class="paramkey"></td>
808 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
809 <td class="paramname"><em>y</em> </td>
818 <td class="mlabels-right">
819 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
822 </div><div class="memdoc">
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>
832 <dl class="section return"><dt>Returns</dt><dd>True if fixed point is less than other </dd></dl>
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>
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< T >::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::raw()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point< T >::rescale()</a>.</p>
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<()</a>.</p>
839 <div class="fragment"><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  {</div>
840 <div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
841 <div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  x.rescale(p);</div>
842 <div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  y.rescale(p);</div>
843 <div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  <span class="keywordflow">return</span> (x.raw() < y.raw());</div>
844 <div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  }</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< T > min(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">FixedPoint.h:884</a></div></div>
846 </div><!-- fragment -->
849 <a class="anchor" id="a47e151d622ee6e71a0e731585b4fa7d8"></a>
850 <div class="memitem">
851 <div class="memproto">
852 <table class="mlabels">
854 <td class="mlabels-left">
855 <table class="memname">
857 <td class="memname">static bool islessequal </td>
859 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
860 <td class="paramname"><em>x</em>, </td>
863 <td class="paramkey"></td>
865 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
866 <td class="paramname"><em>y</em> </td>
875 <td class="mlabels-right">
876 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
879 </div><div class="memdoc">
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>
889 <dl class="section return"><dt>Returns</dt><dd>True if fixed point is less or equal than other </dd></dl>
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>
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< T >::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::raw()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point< T >::rescale()</a>.</p>
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>  {</div>
897 <div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
898 <div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  x.rescale(p);</div>
899 <div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  y.rescale(p);</div>
900 <div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  <span class="keywordflow">return</span> (x.raw() <= y.raw());</div>
901 <div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  }</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< T > min(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">FixedPoint.h:884</a></div></div>
903 </div><!-- fragment -->
906 <a class="anchor" id="a814cf7d89e7dad18b0625b4c914dc628"></a>
907 <div class="memitem">
908 <div class="memproto">
909 <table class="mlabels">
911 <td class="mlabels-left">
912 <table class="memname">
914 <td class="memname">static bool islessgreater </td>
916 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
917 <td class="paramname"><em>x</em>, </td>
920 <td class="paramkey"></td>
922 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
923 <td class="paramname"><em>y</em> </td>
932 <td class="mlabels-right">
933 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
936 </div><div class="memdoc">
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>
946 <dl class="section return"><dt>Returns</dt><dd>True if fixed point is less or greater than other </dd></dl>
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>
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>  {</div>
952 <div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a866dbf3e096ad4a487820a8945be3dfe">isnotequal</a>(x, y);</div>
953 <div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  }</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< T > x, fixed_point< T > y)</div><div class="ttdoc">Checks if two fixed point number are not equal. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00413">FixedPoint.h:413</a></div></div>
955 </div><!-- fragment -->
958 <a class="anchor" id="a866dbf3e096ad4a487820a8945be3dfe"></a>
959 <div class="memitem">
960 <div class="memproto">
961 <table class="mlabels">
963 <td class="mlabels-left">
964 <table class="memname">
966 <td class="memname">static bool isnotequal </td>
968 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
969 <td class="paramname"><em>x</em>, </td>
972 <td class="paramkey"></td>
974 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
975 <td class="paramname"><em>y</em> </td>
984 <td class="mlabels-right">
985 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
988 </div><div class="memdoc">
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>
998 <dl class="section return"><dt>Returns</dt><dd>True if fixed points are not equal else false </dd></dl>
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>
1002 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00398">functions::isequal()</a>.</p>
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>  {</div>
1006 <div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <span class="keywordflow">return</span> !<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a304fe6cc15deaffb14929e42a4ff1c1b">isequal</a>(x, y);</div>
1007 <div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  }</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< T > x, fixed_point< T > y)</div><div class="ttdoc">Checks if two fixed point numbers are equal. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00398">FixedPoint.h:398</a></div></div>
1009 </div><!-- fragment -->
1012 <a class="anchor" id="a33520868a877b6b9a1beccdc1aaa4ec6"></a>
1013 <div class="memitem">
1014 <div class="memproto">
1015 <table class="mlabels">
1017 <td class="mlabels-left">
1018 <table class="memname">
1020 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> log </td>
1022 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
1023 <td class="paramname"><em>x</em></td><td>)</td>
1028 <td class="mlabels-right">
1029 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
1032 </div><div class="memdoc">
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>
1041 <dl class="section return"><dt>Returns</dt><dd>Logarithm value of operand </dd></dl>
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>
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< T >::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::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>
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>  {</div>
1049 <div class="line"><a name="l00670"></a><span class="lineno"> 670</span>  uint8_t p = x.precision();</div>
1050 <div class="line"><a name="l00671"></a><span class="lineno"> 671</span>  <span class="keyword">auto</span> const_one = fixed_point<T>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(1), p);</div>
1051 <div class="line"><a name="l00672"></a><span class="lineno"> 672</span> </div>
1052 <div class="line"><a name="l00673"></a><span class="lineno"> 673</span>  <span class="comment">// Logarithm of 1 is zero and logarithm of negative values is not defined in R, so return 0.</span></div>
1053 <div class="line"><a name="l00674"></a><span class="lineno"> 674</span>  <span class="comment">// Also, log(x) == -log(1/x) for 0 < x < 1.</span></div>
1054 <div class="line"><a name="l00675"></a><span class="lineno"> 675</span>  <span class="keywordflow">if</span>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a304fe6cc15deaffb14929e42a4ff1c1b">isequal</a>(x, const_one) || <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a47e151d622ee6e71a0e731585b4fa7d8">islessequal</a>(x, fixed_point<T>(static_cast<T>(0), p)))</div>
1055 <div class="line"><a name="l00676"></a><span class="lineno"> 676</span>  {</div>
1056 <div class="line"><a name="l00677"></a><span class="lineno"> 677</span>  <span class="keywordflow">return</span> fixed_point<T>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(0), p, <span class="keyword">true</span>);</div>
1057 <div class="line"><a name="l00678"></a><span class="lineno"> 678</span>  }</div>
1058 <div class="line"><a name="l00679"></a><span class="lineno"> 679</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac4dcad0e940cf826063ba1f6ea659c07">isless</a>(x, const_one))</div>
1059 <div class="line"><a name="l00680"></a><span class="lineno"> 680</span>  {</div>
1060 <div class="line"><a name="l00681"></a><span class="lineno"> 681</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a33520868a877b6b9a1beccdc1aaa4ec6">log</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a72d043524e13bf27c605c2dee2e20a2a">div</a>(const_one, x)), fixed_point<T>(-1, p));</div>
1061 <div class="line"><a name="l00682"></a><span class="lineno"> 682</span>  }</div>
1062 <div class="line"><a name="l00683"></a><span class="lineno"> 683</span> </div>
1063 <div class="line"><a name="l00684"></a><span class="lineno"> 684</span>  <span class="comment">// Remove even powers of 2</span></div>
1064 <div class="line"><a name="l00685"></a><span class="lineno"> 685</span>  T shift_val = 31 - __builtin_clz(x.raw() >> p);</div>
1065 <div class="line"><a name="l00686"></a><span class="lineno"> 686</span>  x = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad1429c74912e4335cd55e6f860acf3b6">shift_right</a>(x, shift_val);</div>
1066 <div class="line"><a name="l00687"></a><span class="lineno"> 687</span>  x = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a287e18f5dec27ac32bfd30039a57dddf">sub</a>(x, const_one);</div>
1067 <div class="line"><a name="l00688"></a><span class="lineno"> 688</span> </div>
1068 <div class="line"><a name="l00689"></a><span class="lineno"> 689</span>  <span class="comment">// Constants</span></div>
1069 <div class="line"><a name="l00690"></a><span class="lineno"> 690</span>  <span class="keyword">auto</span> ln2 = fixed_point<T>(0.6931471, p);</div>
1070 <div class="line"><a name="l00691"></a><span class="lineno"> 691</span>  <span class="keyword">auto</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29">A</a> = fixed_point<T>(1.4384189, p);</div>
1071 <div class="line"><a name="l00692"></a><span class="lineno"> 692</span>  <span class="keyword">auto</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">B</a> = fixed_point<T>(-0.67719, p);</div>
1072 <div class="line"><a name="l00693"></a><span class="lineno"> 693</span>  <span class="keyword">auto</span> C = fixed_point<T>(0.3218538, p);</div>
1073 <div class="line"><a name="l00694"></a><span class="lineno"> 694</span>  <span class="keyword">auto</span> D = fixed_point<T>(-0.0832229, p);</div>
1074 <div class="line"><a name="l00695"></a><span class="lineno"> 695</span> </div>
1075 <div class="line"><a name="l00696"></a><span class="lineno"> 696</span>  <span class="comment">// Polynomial expansion</span></div>
1076 <div class="line"><a name="l00697"></a><span class="lineno"> 697</span>  <span class="keyword">auto</span> <a class="code" href="reduction__operation_8cl.xhtml#ab0df00f5333da51860deb93deb44a782">sum</a> = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(x, D), C);</div>
1077 <div class="line"><a name="l00698"></a><span class="lineno"> 698</span>  sum = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(x, sum), B);</div>
1078 <div class="line"><a name="l00699"></a><span class="lineno"> 699</span>  sum = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(x, sum), A);</div>
1079 <div class="line"><a name="l00700"></a><span class="lineno"> 700</span>  sum = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(x, sum);</div>
1080 <div class="line"><a name="l00701"></a><span class="lineno"> 701</span> </div>
1081 <div class="line"><a name="l00702"></a><span class="lineno"> 702</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ad02ce21c48a8f9e419a2ec5f762f3221">mul</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a40956c61706d70b8978c2b87ac455d2a">add</a>(sum, fixed_point<T>(static_cast<T>(shift_val), p)), ln2);</div>
1082 <div class="line"><a name="l00703"></a><span class="lineno"> 703</span>  }</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< T > add(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Perform addition among two fixed point numbers. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00527">FixedPoint.h:527</a></div></div>
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< T > x, fixed_point< T > y)</div><div class="ttdoc">Checks if two fixed point numbers are equal. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00398">FixedPoint.h:398</a></div></div>
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< T > sub(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Perform subtraction among two fixed point numbers. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00552">FixedPoint.h:552</a></div></div>
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< T > div(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Perform division among two fixed point numbers. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00598">FixedPoint.h:598</a></div></div>
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< T > shift_right(fixed_point< T > x, size_t shift)</div><div class="ttdoc">Shift right. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00644">FixedPoint.h:644</a></div></div>
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< T > mul(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdoc">Perform multiplication among two fixed point numbers. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00577">FixedPoint.h:577</a></div></div>
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< T > x, fixed_point< T > y)</div><div class="ttdoc">Checks if one fixed point is less than the other. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00455">FixedPoint.h:455</a></div></div>
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< T > x, fixed_point< T > y)</div><div class="ttdoc">Checks if one fixed point is less or equal than the other. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00470">FixedPoint.h:470</a></div></div>
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< T > log(fixed_point< T > x)</div><div class="ttdoc">Calculate the logarithm of a fixed point number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">FixedPoint.h:668</a></div></div>
1095 </div><!-- fragment -->
1098 <a class="anchor" id="ad02ce21c48a8f9e419a2ec5f762f3221"></a>
1099 <div class="memitem">
1100 <div class="memproto">
1101 <table class="mlabels">
1103 <td class="mlabels-left">
1104 <table class="memname">
1106 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> mul </td>
1108 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
1109 <td class="paramname"><em>x</em>, </td>
1112 <td class="paramkey"></td>
1114 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
1115 <td class="paramname"><em>y</em> </td>
1124 <td class="mlabels-right">
1125 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
1128 </div><div class="memdoc">
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>
1138 <dl class="section return"><dt>Returns</dt><dd>Result fixed point with precision equal to minimum precision of both operands </dd></dl>
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>
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< T >::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::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< T >::saturate_cast()</a>.</p>
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>  {</div>
1146 <div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote<T>::type</a>;</div>
1147 <div class="line"><a name="l00580"></a><span class="lineno"> 580</span>  uint8_t p_min = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
1148 <div class="line"><a name="l00581"></a><span class="lineno"> 581</span>  uint8_t p_max = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::max</a>(x.precision(), y.precision());</div>
1149 <div class="line"><a name="l00582"></a><span class="lineno"> 582</span>  promoted_T round_factor = (1 << (p_max - 1));</div>
1150 <div class="line"><a name="l00583"></a><span class="lineno"> 583</span>  promoted_T val = ((<span class="keyword">static_cast<</span>promoted_T<span class="keyword">></span>(x.raw()) * static_cast<promoted_T>(y.raw())) + round_factor) >> p_max;</div>
1151 <div class="line"><a name="l00584"></a><span class="lineno"> 584</span>  <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
1152 <div class="line"><a name="l00585"></a><span class="lineno"> 585</span>  {</div>
1153 <div class="line"><a name="l00586"></a><span class="lineno"> 586</span>  val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr<T>::saturate_cast</a>(val);</div>
1154 <div class="line"><a name="l00587"></a><span class="lineno"> 587</span>  }</div>
1155 <div class="line"><a name="l00588"></a><span class="lineno"> 588</span>  <span class="keywordflow">return</span> fixed_point<T>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(val), p_min, <span class="keyword">true</span>);</div>
1156 <div class="line"><a name="l00589"></a><span class="lineno"> 589</span>  }</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< T > min(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">FixedPoint.h:884</a></div></div>
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< T > max(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">FixedPoint.h:889</a></div></div>
1162 </div><!-- fragment -->
1165 <a class="anchor" id="aa78731a2479da19c6604b3baa3ffe33d"></a>
1166 <div class="memitem">
1167 <div class="memproto">
1168 <table class="mlabels">
1170 <td class="mlabels-left">
1171 <table class="memname">
1173 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> negate </td>
1175 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
1176 <td class="paramname"><em>x</em></td><td>)</td>
1181 <td class="mlabels-right">
1182 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
1185 </div><div class="memdoc">
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>
1194 <dl class="section return"><dt>Returns</dt><dd>Negated fixed point result </dd></dl>
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>
1198 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point< T >::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::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< T >::saturate_cast()</a>.</p>
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>  {</div>
1202 <div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote<T>::type</a>;</div>
1203 <div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  promoted_T val = -x.raw();</div>
1204 <div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
1205 <div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  {</div>
1206 <div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr<T>::saturate_cast</a>(val);</div>
1207 <div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  }</div>
1208 <div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  <span class="keywordflow">return</span> fixed_point<T>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(val), x.precision(), <span class="keyword">true</span>);</div>
1209 <div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  }</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 -->
1216 <a class="anchor" id="a74f7a6f0b0c31beaf3a0bc13e991b1c3"></a>
1217 <div class="memitem">
1218 <div class="memproto">
1219 <table class="mlabels">
1221 <td class="mlabels-left">
1222 <table class="memname">
1224 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> pow </td>
1226 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
1227 <td class="paramname"><em>x</em>, </td>
1230 <td class="paramkey"></td>
1232 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
1233 <td class="paramname"><em>a</em> </td>
1242 <td class="mlabels-right">
1243 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
1246 </div><div class="memdoc">
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>
1257 <dl class="section return"><dt>Returns</dt><dd>a-th power of the operand </dd></dl>
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>
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>
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>  {</div>
1265 <div class="line"><a name="l00809"></a><span class="lineno"> 809</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac66bdd16622d4498cc0299db1efcef54">exp</a>(<a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a33520868a877b6b9a1beccdc1aaa4ec6">log</a>(x) * a);</div>
1266 <div class="line"><a name="l00810"></a><span class="lineno"> 810</span>  }</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< T > exp(fixed_point< T > x)</div><div class="ttdoc">Calculate the exponential of a fixed point number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00715">FixedPoint.h:715</a></div></div>
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< T > log(fixed_point< T > x)</div><div class="ttdoc">Calculate the logarithm of a fixed point number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00668">FixedPoint.h:668</a></div></div>
1269 </div><!-- fragment -->
1272 <a class="anchor" id="a0e0473f8d30d0a8067f9903430ddcd85"></a>
1273 <div class="memitem">
1274 <div class="memproto">
1275 <table class="mlabels">
1277 <td class="mlabels-left">
1278 <table class="memname">
1280 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> shift_left </td>
1282 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
1283 <td class="paramname"><em>x</em>, </td>
1286 <td class="paramkey"></td>
1288 <td class="paramtype">size_t </td>
1289 <td class="paramname"><em>shift</em> </td>
1298 <td class="mlabels-right">
1299 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
1302 </div><div class="memdoc">
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>
1312 <dl class="section return"><dt>Returns</dt><dd>Shifted value </dd></dl>
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>
1316 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point< T >::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::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< T >::saturate_cast()</a>.</p>
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<<()</a>.</p>
1319 <div class="fragment"><div class="line"><a name="l00627"></a><span class="lineno"> 627</span>  {</div>
1320 <div class="line"><a name="l00628"></a><span class="lineno"> 628</span>  <span class="keyword">using</span> promoted_T = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote<T>::type</a>;</div>
1321 <div class="line"><a name="l00629"></a><span class="lineno"> 629</span>  promoted_T val = <span class="keyword">static_cast<</span>promoted_T<span class="keyword">></span>(x.raw()) << shift;</div>
1322 <div class="line"><a name="l00630"></a><span class="lineno"> 630</span>  <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
1323 <div class="line"><a name="l00631"></a><span class="lineno"> 631</span>  {</div>
1324 <div class="line"><a name="l00632"></a><span class="lineno"> 632</span>  val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr<T>::saturate_cast</a>(val);</div>
1325 <div class="line"><a name="l00633"></a><span class="lineno"> 633</span>  }</div>
1326 <div class="line"><a name="l00634"></a><span class="lineno"> 634</span>  <span class="keywordflow">return</span> fixed_point<T>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(val), x.precision(), <span class="keyword">true</span>);</div>
1327 <div class="line"><a name="l00635"></a><span class="lineno"> 635</span>  }</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 -->
1334 <a class="anchor" id="ad1429c74912e4335cd55e6f860acf3b6"></a>
1335 <div class="memitem">
1336 <div class="memproto">
1337 <table class="mlabels">
1339 <td class="mlabels-left">
1340 <table class="memname">
1342 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> shift_right </td>
1344 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
1345 <td class="paramname"><em>x</em>, </td>
1348 <td class="paramkey"></td>
1350 <td class="paramtype">size_t </td>
1351 <td class="paramname"><em>shift</em> </td>
1360 <td class="mlabels-right">
1361 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
1364 </div><div class="memdoc">
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>
1374 <dl class="section return"><dt>Returns</dt><dd>Shifted value </dd></dl>
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>
1378 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00233">fixed_point< T >::precision()</a>, and <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::raw()</a>.</p>
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>>()</a>.</p>
1381 <div class="fragment"><div class="line"><a name="l00645"></a><span class="lineno"> 645</span>  {</div>
1382 <div class="line"><a name="l00646"></a><span class="lineno"> 646</span>  <span class="keywordflow">return</span> fixed_point<T>(x.raw() >> shift, x.precision(), <span class="keyword">true</span>);</div>
1383 <div class="line"><a name="l00647"></a><span class="lineno"> 647</span>  }</div>
1384 </div><!-- fragment -->
1387 <a class="anchor" id="a9efa14731a55e3d96adb961214e91734"></a>
1388 <div class="memitem">
1389 <div class="memproto">
1390 <table class="mlabels">
1392 <td class="mlabels-left">
1393 <table class="memname">
1395 <td class="memname">static bool signbit </td>
1397 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
1398 <td class="paramname"><em>x</em></td><td>)</td>
1403 <td class="mlabels-right">
1404 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
1407 </div><div class="memdoc">
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>
1416 <dl class="section return"><dt>Returns</dt><dd>True if negative else false. </dd></dl>
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>
1420 <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::raw()</a>.</p>
1421 <div class="fragment"><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  {</div>
1422 <div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  <span class="keywordflow">return</span> ((x.raw() >> std::numeric_limits<T>::digits) != 0);</div>
1423 <div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  }</div>
1424 </div><!-- fragment -->
1427 <a class="anchor" id="a287e18f5dec27ac32bfd30039a57dddf"></a>
1428 <div class="memitem">
1429 <div class="memproto">
1430 <table class="mlabels">
1432 <td class="mlabels-left">
1433 <table class="memname">
1435 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> sub </td>
1437 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
1438 <td class="paramname"><em>x</em>, </td>
1441 <td class="paramkey"></td>
1443 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
1444 <td class="paramname"><em>y</em> </td>
1453 <td class="mlabels-right">
1454 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
1457 </div><div class="memdoc">
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>
1467 <dl class="section return"><dt>Returns</dt><dd>Result fixed point with precision equal to minimum precision of both operands </dd></dl>
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>
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< T >::precision()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00225">fixed_point< T >::raw()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00241">fixed_point< T >::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< T >::saturate_cast()</a>, and <a class="el" href="hwc_8hpp_source.xhtml#l00204">mali_userspace::type</a>.</p>
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>  {</div>
1475 <div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  uint8_t p = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">std::min</a>(x.precision(), y.precision());</div>
1476 <div class="line"><a name="l00555"></a><span class="lineno"> 555</span>  x.rescale(p);</div>
1477 <div class="line"><a name="l00556"></a><span class="lineno"> 556</span>  y.rescale(p);</div>
1478 <div class="line"><a name="l00557"></a><span class="lineno"> 557</span>  <span class="keywordflow">if</span>(OP == <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic.xhtml#a0ada8f647402027261407be09bdf25ffa4729d95f983955f0d93a30179deb2b86">OverflowPolicy::SATURATE</a>)</div>
1479 <div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  {</div>
1480 <div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  <span class="keyword">using</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a> = <span class="keyword">typename</span> <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">traits::promote<T>::type</a>;</div>
1481 <div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  <a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a> val = <span class="keyword">static_cast<</span><a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">type</a><span class="keyword">></span>(x.raw()) - static_cast<type>(y.raw());</div>
1482 <div class="line"><a name="l00561"></a><span class="lineno"> 561</span>  val = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1constant__expr.xhtml#a59cfd98dfc03fbc5540092aa196d7187">constant_expr<T>::saturate_cast</a>(val);</div>
1483 <div class="line"><a name="l00562"></a><span class="lineno"> 562</span>  <span class="keywordflow">return</span> fixed_point<T>(<span class="keyword">static_cast<</span>T<span class="keyword">></span>(val), p, <span class="keyword">true</span>);</div>
1484 <div class="line"><a name="l00563"></a><span class="lineno"> 563</span>  }</div>
1485 <div class="line"><a name="l00564"></a><span class="lineno"> 564</span>  <span class="keywordflow">else</span></div>
1486 <div class="line"><a name="l00565"></a><span class="lineno"> 565</span>  {</div>
1487 <div class="line"><a name="l00566"></a><span class="lineno"> 566</span>  <span class="keywordflow">return</span> fixed_point<T>(x.raw() - y.raw(), p, <span class="keyword">true</span>);</div>
1488 <div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  }</div>
1489 <div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  }</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< T > min(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">FixedPoint.h:884</a></div></div>
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 -->
1497 <a class="anchor" id="a3260014222a62b212c096956c0605fd5"></a>
1498 <div class="memitem">
1499 <div class="memproto">
1500 <table class="mlabels">
1502 <td class="mlabels-left">
1503 <table class="memname">
1505 <td class="memname">static <a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a><T> tanh </td>
1507 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< T > </td>
1508 <td class="paramname"><em>x</em></td><td>)</td>
1513 <td class="mlabels-right">
1514 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
1517 </div><div class="memdoc">
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>
1526 <dl class="section return"><dt>Returns</dt><dd>Hyperbolic tangent of the operand </dd></dl>
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>
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< T >::precision()</a>.</p>
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>  {</div>
1534 <div class="line"><a name="l00785"></a><span class="lineno"> 785</span>  uint8_t p = x.precision();</div>
1535 <div class="line"><a name="l00786"></a><span class="lineno"> 786</span>  <span class="comment">// Constants</span></div>
1536 <div class="line"><a name="l00787"></a><span class="lineno"> 787</span>  <span class="keyword">auto</span> const_one = fixed_point<T>(1, p);</div>
1537 <div class="line"><a name="l00788"></a><span class="lineno"> 788</span>  <span class="keyword">auto</span> const_two = fixed_point<T>(2, p);</div>
1538 <div class="line"><a name="l00789"></a><span class="lineno"> 789</span> </div>
1539 <div class="line"><a name="l00790"></a><span class="lineno"> 790</span>  <span class="keyword">auto</span> exp2x = <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#ac66bdd16622d4498cc0299db1efcef54">exp</a>(const_two * x);</div>
1540 <div class="line"><a name="l00791"></a><span class="lineno"> 791</span>  <span class="keyword">auto</span> num = exp2x - const_one;</div>
1541 <div class="line"><a name="l00792"></a><span class="lineno"> 792</span>  <span class="keyword">auto</span> den = exp2x + const_one;</div>
1542 <div class="line"><a name="l00793"></a><span class="lineno"> 793</span>  <span class="keyword">auto</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3260014222a62b212c096956c0605fd5">tanh</a> = num / den;</div>
1543 <div class="line"><a name="l00794"></a><span class="lineno"> 794</span> </div>
1544 <div class="line"><a name="l00795"></a><span class="lineno"> 795</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_1_1functions.xhtml#a3260014222a62b212c096956c0605fd5">tanh</a>;</div>
1545 <div class="line"><a name="l00796"></a><span class="lineno"> 796</span>  }</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< T > tanh(fixed_point< T > x)</div><div class="ttdoc">Calculate the hyperbolic tangent of a fixed point number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00783">FixedPoint.h:783</a></div></div>
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< T > exp(fixed_point< T > x)</div><div class="ttdoc">Calculate the exponential of a fixed point number. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00715">FixedPoint.h:715</a></div></div>
1548 </div><!-- fragment -->
1551 <a class="anchor" id="a69b97b34f32a6fc05665fc8605806326"></a>
1552 <div class="memitem">
1553 <div class="memproto">
1554 <table class="mlabels">
1556 <td class="mlabels-left">
1557 <table class="memname">
1559 <td class="memname">static std::basic_ostream<T, traits>& write </td>
1561 <td class="paramtype">std::basic_ostream< T, traits > & </td>
1562 <td class="paramname"><em>s</em>, </td>
1565 <td class="paramkey"></td>
1567 <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1fixed__point__arithmetic_1_1fixed__point.xhtml">fixed_point</a>< U > & </td>
1568 <td class="paramname"><em>x</em> </td>
1577 <td class="mlabels-right">
1578 <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
1581 </div><div class="memdoc">
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>
1591 <dl class="section return"><dt>Returns</dt><dd>Reference output to updated stream </dd></dl>
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>
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<<()</a>.</p>
1596 <div class="fragment"><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  {</div>
1597 <div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="keywordflow">return</span> s << static_cast<float>(x);</div>
1598 <div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  }</div>
1599 </div><!-- fragment -->
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>
1605 </div><!-- contents -->
1606 </div><!-- doc-content -->
1607 <!-- start footer part -->
1608 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
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>