Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 1 | <!-- HTML header for doxygen 1.8.9.1--> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 6 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 7 | <meta name="generator" content="Doxygen 1.8.6"/> |
| 8 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines --> |
| 9 | <title>Compute Library: src/core/CL/cl_kernels/fixed_point.h Source File</title> |
| 10 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 11 | <script type="text/javascript" src="jquery.js"></script> |
| 12 | <script type="text/javascript" src="dynsections.js"></script> |
| 13 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 14 | <script type="text/javascript" src="resize.js"></script> |
| 15 | <script type="text/javascript" src="navtree.js"></script> |
| 16 | <script type="text/javascript"> |
| 17 | $(document).ready(initResizable); |
| 18 | $(window).load(resizeHeight); |
| 19 | </script> |
| 20 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 21 | <script type="text/javascript" src="search/search.js"></script> |
| 22 | <script type="text/javascript"> |
| 23 | $(document).ready(function() { searchBox.OnSelectItem(0); }); |
| 24 | </script> |
| 25 | <script type="text/x-mathjax-config"> |
| 26 | MathJax.Hub.Config({ |
| 27 | extensions: ["tex2jax.js"], |
| 28 | jax: ["input/TeX","output/HTML-CSS"], |
| 29 | }); |
| 30 | </script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
| 31 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 32 | </head> |
| 33 | <body> |
| 34 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 35 | <div id="titlearea"> |
| 36 | <table cellspacing="0" cellpadding="0"> |
| 37 | <tbody> |
| 38 | <tr style="height: 56px;"> |
| 39 | <td style="padding-left: 0.5em;"> |
| 40 | <div id="projectname">Compute Library |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame] | 41 |  <span id="projectnumber">17.10</span> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 42 | </div> |
| 43 | </td> |
| 44 | </tr> |
| 45 | </tbody> |
| 46 | </table> |
| 47 | </div> |
| 48 | <!-- end header part --> |
| 49 | <!-- Generated by Doxygen 1.8.6 --> |
| 50 | <script type="text/javascript"> |
| 51 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 52 | </script> |
| 53 | <div id="navrow1" class="tabs"> |
| 54 | <ul class="tablist"> |
| 55 | <li><a href="index.xhtml"><span>Main Page</span></a></li> |
| 56 | <li><a href="pages.xhtml"><span>Related Pages</span></a></li> |
| 57 | <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li> |
| 58 | <li><a href="annotated.xhtml"><span>Data Structures</span></a></li> |
| 59 | <li class="current"><a href="files.xhtml"><span>Files</span></a></li> |
| 60 | <li> |
| 61 | <div id="MSearchBox" class="MSearchBoxInactive"> |
| 62 | <span class="left"> |
| 63 | <img id="MSearchSelect" src="search/mag_sel.png" |
| 64 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 65 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 66 | alt=""/> |
| 67 | <input type="text" id="MSearchField" value="Search" accesskey="S" |
| 68 | onfocus="searchBox.OnSearchFieldFocus(true)" |
| 69 | onblur="searchBox.OnSearchFieldFocus(false)" |
| 70 | onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| 71 | </span><span class="right"> |
| 72 | <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| 73 | </span> |
| 74 | </div> |
| 75 | </li> |
| 76 | </ul> |
| 77 | </div> |
| 78 | <div id="navrow2" class="tabs2"> |
| 79 | <ul class="tablist"> |
| 80 | <li><a href="files.xhtml"><span>File List</span></a></li> |
| 81 | <li><a href="globals.xhtml"><span>Globals</span></a></li> |
| 82 | </ul> |
| 83 | </div> |
| 84 | </div><!-- top --> |
| 85 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 86 | <div id="nav-tree"> |
| 87 | <div id="nav-tree-contents"> |
| 88 | <div id="nav-sync" class="sync"></div> |
| 89 | </div> |
| 90 | </div> |
| 91 | <div id="splitbar" style="-moz-user-select:none;" |
| 92 | class="ui-resizable-handle"> |
| 93 | </div> |
| 94 | </div> |
| 95 | <script type="text/javascript"> |
| 96 | $(document).ready(function(){initNavTree('fixed__point_8h_source.xhtml','');}); |
| 97 | </script> |
| 98 | <div id="doc-content"> |
| 99 | <!-- window showing the filter options --> |
| 100 | <div id="MSearchSelectWindow" |
| 101 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 102 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 103 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 104 | <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Pages</a></div> |
| 105 | |
| 106 | <!-- iframe showing the search results (closed by default) --> |
| 107 | <div id="MSearchResultsWindow"> |
| 108 | <iframe src="javascript:void(0)" frameborder="0" |
| 109 | name="MSearchResults" id="MSearchResults"> |
| 110 | </iframe> |
| 111 | </div> |
| 112 | |
| 113 | <div class="header"> |
| 114 | <div class="headertitle"> |
| 115 | <div class="title">fixed_point.h</div> </div> |
| 116 | </div><!--header--> |
| 117 | <div class="contents"> |
| 118 | <a href="fixed__point_8h.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div> |
| 119 | <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2017 ARM Limited.</span></div> |
| 120 | <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div> |
| 121 | <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * SPDX-License-Identifier: MIT</span></div> |
| 122 | <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div> |
| 123 | <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div> |
| 124 | <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * of this software and associated documentation files (the "Software"), to</span></div> |
| 125 | <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * deal in the Software without restriction, including without limitation the</span></div> |
| 126 | <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div> |
| 127 | <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div> |
| 128 | <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div> |
| 129 | <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> *</span></div> |
| 130 | <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div> |
| 131 | <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * copies or substantial portions of the Software.</span></div> |
| 132 | <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div> |
| 133 | <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div> |
| 134 | <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div> |
| 135 | <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div> |
| 136 | <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div> |
| 137 | <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div> |
| 138 | <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div> |
| 139 | <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * SOFTWARE.</span></div> |
| 140 | <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> */</span></div> |
| 141 | <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#ifndef ARM_COMPUTE_FIXED_POINT_H</span></div> |
| 142 | <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor"></span><span class="preprocessor">#define ARM_COMPUTE_FIXED_POINT_H</span></div> |
| 143 | <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor"></span></div> |
| 144 | <div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae1ac323de0ecd37f54553c25092d2ba4"> 27</a></span> <span class="preprocessor">#define TYPE_ALIAS(type, alias) \</span></div> |
| 145 | <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor"> typedef type alias; \</span></div> |
| 146 | <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor"> typedef type alias##x##1; \</span></div> |
| 147 | <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor"> typedef type##2 alias##x##2; \</span></div> |
| 148 | <div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor"> typedef type##3 alias##x##3; \</span></div> |
| 149 | <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor"> typedef type##4 alias##x##4; \</span></div> |
| 150 | <div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor"> typedef type##8 alias##x##8; \</span></div> |
| 151 | <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor"> typedef type##16 alias##x##16;</span></div> |
| 152 | <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor"></span></div> |
| 153 | <div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a8362e532b9c16e2367f9102963b6336a"> 36</a></span> <a class="code" href="fixed__point_8h.xhtml#ae1ac323de0ecd37f54553c25092d2ba4">TYPE_ALIAS</a>(<span class="keywordtype">char</span>, <a class="code" href="fixed__point_8h.xhtml#a96d48f67de90aaed492da7fb7a006b94">qs8</a>)</div> |
| 154 | <div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ad7f60c2ef8f8b80da7fd81570db06d4a"> 37</a></span> <a class="code" href="fixed__point_8h.xhtml#ae1ac323de0ecd37f54553c25092d2ba4">TYPE_ALIAS</a>(<span class="keywordtype">short</span>, <a class="code" href="fixed__point_8h.xhtml#a26a8ca855cd14b1867173d301baf6c4f">qs16</a>)</div> |
| 155 | <div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#af8a54f984958bddf4f24cd95867a82f5"> 38</a></span> <a class="code" href="fixed__point_8h.xhtml#ae1ac323de0ecd37f54553c25092d2ba4">TYPE_ALIAS</a>(<span class="keywordtype">int</span>, <a class="code" href="fixed__point_8h.xhtml#a8115de4a1860a9bf15e13f4ebfdb707f">qs32</a>)</div> |
| 156 | <div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div> |
| 157 | <div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a10ab0002d59a950b7e7100f431832174"> 40</a></span> <span class="preprocessor">#define qs8_MIN ((char)CHAR_MIN)</span></div> |
| 158 | <div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ac0a5138b20a5fc54e092b8335213b3db"> 41</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs8_MAX ((char)CHAR_MAX)</span></div> |
| 159 | <div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a8f3a79453a6d9f3cb4e4c1e15647c2f8"> 42</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs16_MIN ((short)SHRT_MIN)</span></div> |
| 160 | <div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a3668744b91058e80feae452f3fff6ecd"> 43</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs16_MAX ((short)SHRT_MAX)</span></div> |
| 161 | <div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a65c09b33d7e8ec44c112123516395303"> 44</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs32_MIN ((int)INT_MIN)</span></div> |
| 162 | <div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a665d827df7100fdcb1debb9ebfda2081"> 45</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs32_MAX ((int)INT_MAX)</span></div> |
| 163 | <div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="preprocessor"></span></div> |
| 164 | <div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a87c333c4d447a56aaa1794163bffb934"> 47</a></span> <span class="preprocessor">#define qu8_MIN ((uchar)0)</span></div> |
| 165 | <div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae3e8582121053f90052a5d6b493b893a"> 48</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qu8_MAX ((uchar)UCHAR_MAX)</span></div> |
| 166 | <div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#addb83fbb729412b4d63acf37d11a4dfe"> 49</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qu16_MIN ((ushort)0)</span></div> |
| 167 | <div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae26774fb9d07b6c3965b1af0fe51d14d"> 50</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qu16_MAX ((ushort)USHRT_MAX)</span></div> |
| 168 | <div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a4b5f7492fbe94585b4d6ba2b7481261a"> 51</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qu32_MIN ((uint)0)</span></div> |
| 169 | <div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a9b24ec1f75f64ba7317d874e79f20165"> 52</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qu32_MAX ((uint)UINT_MAX)</span></div> |
| 170 | <div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="preprocessor"></span></div> |
| 171 | <div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a79ca4f195e178410c0e034216e90f811"> 54</a></span> <span class="preprocessor">#define qs8_TYPE char</span></div> |
| 172 | <div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ad77b91071787b84a9cd514cf5c526fdb"> 55</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs8x1_TYPE char</span></div> |
| 173 | <div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a15ba5721b7d6b798965f1fe03609f657"> 56</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs8x2_TYPE char2</span></div> |
| 174 | <div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a7bd1921b9cbbf8b03867899a43db99d3"> 57</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs8x3_TYPE char3</span></div> |
| 175 | <div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a33854718153786d2995ff57a77966fa0"> 58</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs8x4_TYPE char4</span></div> |
| 176 | <div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a21f99c110a4e266a7c48ffc62f91bb6d"> 59</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs8x8_TYPE char8</span></div> |
| 177 | <div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae9cb49b1f87d857347bcf0add8217bff"> 60</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs8x16_TYPE char16</span></div> |
| 178 | <div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="preprocessor"></span></div> |
| 179 | <div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a995fa4e2cf5895940e629f49c87a9e66"> 62</a></span> <span class="preprocessor">#define qs16_TYPE short</span></div> |
| 180 | <div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae5f0a20c461cd5421516da8559e30bc9"> 63</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs16x1_TYPE short</span></div> |
| 181 | <div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#aa3594535118e4158134b8de127757e70"> 64</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs16x2_TYPE short2</span></div> |
| 182 | <div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a4d43a0b433fada2a4c21bdc6d66f8e1f"> 65</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs16x3_TYPE short3</span></div> |
| 183 | <div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#aba2fe52f3ee4677740c679607cdcb5f1"> 66</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs16x4_TYPE short4</span></div> |
| 184 | <div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ad11e2aa7cd3de96b0be10b9273de99bb"> 67</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs16x8_TYPE short8</span></div> |
| 185 | <div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a66d3b76441cc5c126ea3c2eacd66755c"> 68</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs16x16_TYPE short16</span></div> |
| 186 | <div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="preprocessor"></span></div> |
| 187 | <div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a4dc3c9f8c9fe5f18308eb6a0b31668b6"> 70</a></span> <span class="preprocessor">#define qs32_TYPE int</span></div> |
| 188 | <div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a0a7583559301a450cfd243030c03bcc3"> 71</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs32x1_TYPE int</span></div> |
| 189 | <div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae5e7b593b19e045c09d2f0097398dfa0"> 72</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs32x2_TYPE int2</span></div> |
| 190 | <div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a6c20f71e5c89970ee4f1659666e3cd8f"> 73</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs32x3_TYPE int3</span></div> |
| 191 | <div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#aa912b7f2743520fec942e0a4c7acf1f5"> 74</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs32x4_TYPE int4</span></div> |
| 192 | <div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a1e11b506599174c9fd83688cf116ab7e"> 75</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs32x8_TYPE int8</span></div> |
| 193 | <div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#adbd8b659ba077c1cceb5d560db65d4b9"> 76</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs32x16_TYPE int16</span></div> |
| 194 | <div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="preprocessor"></span></div> |
| 195 | <div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment">/* All internal constants are represented in the maximum supported fixed point format (QS16),</span></div> |
| 196 | <div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment"> * thus we define an additional shift parameter required to convert the constant</span></div> |
| 197 | <div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="comment"> * from the maximum supported format to the require one.</span></div> |
| 198 | <div class="line"><a name="l00081"></a><span class="lineno"> 81</span> <span class="comment"> */</span></div> |
| 199 | <div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a46e1f404fdd6e80eec6e0f50e5f0383c"> 82</a></span> <span class="preprocessor">#define qs8_SHIFT 8</span></div> |
| 200 | <div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a36ef9fc1f840658270248d8e53fd8140"> 83</a></span> <span class="preprocessor"></span><span class="preprocessor">#define qs16_SHIFT 0</span></div> |
| 201 | <div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="preprocessor"></span></div> |
| 202 | <div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="preprocessor">#undef VEC_DATA_TYPE_STR</span></div> |
| 203 | <div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="preprocessor"></span><span class="preprocessor">#undef VEC_DATA_TYPE</span></div> |
| 204 | <div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="preprocessor"></span><span class="preprocessor">#undef CONVERT_STR</span></div> |
| 205 | <div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="preprocessor"></span><span class="preprocessor">#undef CONVERT</span></div> |
| 206 | <div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="preprocessor"></span><span class="preprocessor">#undef CONVERT_SAT_STR</span></div> |
| 207 | <div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="preprocessor"></span><span class="preprocessor">#undef CONVERT_SAT</span></div> |
| 208 | <div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="preprocessor"></span></div> |
| 209 | <div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae802822defb0fa3a7f74f98e324696cb"> 92</a></span> <span class="preprocessor">#define VEC_DATA_TYPE_STR(type, size) type##x##size</span></div> |
| 210 | <div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f"> 93</a></span> <span class="preprocessor"></span><span class="preprocessor">#define VEC_DATA_TYPE(type, size) VEC_DATA_TYPE_STR(type, size)</span></div> |
| 211 | <div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="preprocessor"></span></div> |
| 212 | <div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a37089d60b5f5a76176fdb94835a98ff4"> 95</a></span> <span class="preprocessor">#define CONVERT_STR3(x, type, rtype) (convert_##rtype((x)))</span></div> |
| 213 | <div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a424c5edfa264fb94d0eb44d59d103e29"> 96</a></span> <span class="preprocessor"></span><span class="preprocessor">#define CONVERT_STR2(x, type, rtype) CONVERT_STR3(x, type, rtype)</span></div> |
| 214 | <div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a4090567b3adb034c7cc1af308cb45670"> 97</a></span> <span class="preprocessor"></span><span class="preprocessor">#define CONVERT_STR(x, type) CONVERT_STR2(x, type, type##_TYPE)</span></div> |
| 215 | <div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be"> 98</a></span> <span class="preprocessor"></span><span class="preprocessor">#define CONVERT(x, type) CONVERT_STR(x, type)</span></div> |
| 216 | <div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="preprocessor"></span></div> |
| 217 | <div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae5bd7ebff4bb9df1b26f2b71b31e928a"> 100</a></span> <span class="preprocessor">#define CONVERT_SAT_STR3(x, type, rtype) (convert_##rtype##_sat((x)))</span></div> |
| 218 | <div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a8aa11a06d0685e1cc6dfac964f9c3cee"> 101</a></span> <span class="preprocessor"></span><span class="preprocessor">#define CONVERT_SAT_STR2(x, type, rtype) CONVERT_SAT_STR3(x, type, rtype)</span></div> |
| 219 | <div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a4e0fc93c9a69863dcdf7672ab547026c"> 102</a></span> <span class="preprocessor"></span><span class="preprocessor">#define CONVERT_SAT_STR(x, type) CONVERT_SAT_STR2(x, type, type##_TYPE)</span></div> |
| 220 | <div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a23fb01b6f3453cc0e48a026fd44f6acd"> 103</a></span> <span class="preprocessor"></span><span class="preprocessor">#define CONVERT_SAT(x, type) CONVERT_SAT_STR(x, type)</span></div> |
| 221 | <div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="preprocessor"></span></div> |
| 222 | <div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a1acc7badafd7def20af187c5b5bfdec2"> 111</a></span> <span class="preprocessor">#define ABSQ_SAT_IMPL(type) \</span></div> |
| 223 | <div class="line"><a name="l00112"></a><span class="lineno"> 112</span> <span class="preprocessor"> inline type abs_##type##_sat(type VopA) \</span></div> |
| 224 | <div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="preprocessor"> { \</span></div> |
| 225 | <div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="preprocessor"> return CONVERT_SAT(abs(VopA), type); \</span></div> |
| 226 | <div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="preprocessor"> }</span></div> |
| 227 | <div class="line"><a name="l00116"></a><span class="lineno"> 116</span> <span class="preprocessor"></span></div> |
| 228 | <div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a4548a232dd77f023b53557a12a3a98b2"> 117</a></span> <a class="code" href="fixed__point_8h.xhtml#a1acc7badafd7def20af187c5b5bfdec2">ABSQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a5a2cc1a836612185f0378de9e7159e27">qs8x16</a>)</div> |
| 229 | <div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a08e6c4717be6784a6df7c43bfcc8655d"> 118</a></span> <a class="code" href="fixed__point_8h.xhtml#a1acc7badafd7def20af187c5b5bfdec2">ABSQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#ad7f60c2ef8f8b80da7fd81570db06d4a">qs16x8</a>)</div> |
| 230 | <div class="line"><a name="l00119"></a><span class="lineno"> 119</span> </div> |
| 231 | <div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a096a0b33d9bf00fd65287a1ceafa227c"> 120</a></span> <span class="preprocessor">#define ABS_SAT_OP_EXPAND_STR(a, type, size) abs_##type##x##size##_sat((a))</span></div> |
| 232 | <div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a66d987917da70dfc88bee76cda323e0a"> 121</a></span> <span class="preprocessor"></span><span class="preprocessor">#define ABS_SAT_OP_EXPAND(a, type, size) ABS_SAT_OP_EXPAND_STR(a, type, size)</span></div> |
| 233 | <div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="preprocessor"></span></div> |
| 234 | <div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a21e1c22d1a3f0110ceb0ef48c6dddb86"> 129</a></span> <span class="preprocessor">#define MAXQ_IMPL(type) \</span></div> |
| 235 | <div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="preprocessor"> inline type max_##type(type VopA, type VopB) \</span></div> |
| 236 | <div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="preprocessor"> { \</span></div> |
| 237 | <div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="preprocessor"> return max(VopA, VopB); \</span></div> |
| 238 | <div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="preprocessor"> }</span></div> |
| 239 | <div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="preprocessor"></span></div> |
| 240 | <div class="line"><a name="l00135"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a6cf8baa93541eee58c1575859344d858"> 135</a></span> <a class="code" href="fixed__point_8h.xhtml#a21e1c22d1a3f0110ceb0ef48c6dddb86">MAXQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a230d9b32261264756a0d3d4971964753">qs8x1</a>)</div> |
| 241 | <div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a9b9740928192b24b99e30233458b106f"> 136</a></span> <a class="code" href="fixed__point_8h.xhtml#a21e1c22d1a3f0110ceb0ef48c6dddb86">MAXQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a3ab174b05a269317ec18680b5c781a04">qs8x2</a>)</div> |
| 242 | <div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a0b8cb75deddaf8856fb53d1178a35d7f"> 137</a></span> <a class="code" href="fixed__point_8h.xhtml#a21e1c22d1a3f0110ceb0ef48c6dddb86">MAXQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a10dfbf9412b518cd160133b68e2da8fd">qs8x4</a>)</div> |
| 243 | <div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#af93c5c0b7d3a8183645521ca0fb10b0e"> 138</a></span> <a class="code" href="fixed__point_8h.xhtml#a21e1c22d1a3f0110ceb0ef48c6dddb86">MAXQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a8362e532b9c16e2367f9102963b6336a">qs8x8</a>)</div> |
| 244 | <div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a2635ed6914ae75900d7bf215356a44e4"> 139</a></span> <a class="code" href="fixed__point_8h.xhtml#a21e1c22d1a3f0110ceb0ef48c6dddb86">MAXQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a5a2cc1a836612185f0378de9e7159e27">qs8x16</a>)</div> |
| 245 | <div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a3d1133437c9316867a68fabaeeb1c349"> 140</a></span> <a class="code" href="fixed__point_8h.xhtml#a21e1c22d1a3f0110ceb0ef48c6dddb86">MAXQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#aab72e548e91d1bac44d0a8503dfa12e7">qs16x1</a>)</div> |
| 246 | <div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ab64c4eaecfd5b3adaefeea3e74b20efc"> 141</a></span> <a class="code" href="fixed__point_8h.xhtml#a21e1c22d1a3f0110ceb0ef48c6dddb86">MAXQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#ac120446f465238102c2ba0a23ae4aa47">qs16x2</a>)</div> |
| 247 | <div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#acf7b70bd039a92c0b8e6bae61a46c514"> 142</a></span> <a class="code" href="fixed__point_8h.xhtml#a21e1c22d1a3f0110ceb0ef48c6dddb86">MAXQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a5e34d3e41af677765369d33a3871d95f">qs16x4</a>)</div> |
| 248 | <div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a68d082072cbdb8b617e0246d277a2a8f"> 143</a></span> <a class="code" href="fixed__point_8h.xhtml#a21e1c22d1a3f0110ceb0ef48c6dddb86">MAXQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#ad7f60c2ef8f8b80da7fd81570db06d4a">qs16x8</a>)</div> |
| 249 | <div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#aaa6b333d702243ee48d98f8b6ab04fa8"> 144</a></span> <a class="code" href="fixed__point_8h.xhtml#a21e1c22d1a3f0110ceb0ef48c6dddb86">MAXQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a16a82528f3e1c6eb81fd9aac6ad45e62">qs16x16</a>)</div> |
| 250 | <div class="line"><a name="l00145"></a><span class="lineno"> 145</span> </div> |
| 251 | <div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a60a130cf40adc457ce483d5912e1459c"> 146</a></span> <span class="preprocessor">#define MAX_OP_EXPAND_STR(a, b, type, size) max_##type##x##size((a), (b))</span></div> |
| 252 | <div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#afeab3b374d78c30712736e16cbb5aa15"> 147</a></span> <span class="preprocessor"></span><span class="preprocessor">#define MAX_OP_EXPAND(a, b, type, size) MAX_OP_EXPAND_STR(a, b, type, size)</span></div> |
| 253 | <div class="line"><a name="l00148"></a><span class="lineno"> 148</span> <span class="preprocessor"></span></div> |
| 254 | <div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182"> 155</a></span> <span class="preprocessor">#define ADDQ_SAT_IMPL(type) \</span></div> |
| 255 | <div class="line"><a name="l00156"></a><span class="lineno"> 156</span> <span class="preprocessor"> inline type add_sat_##type(type VopA, type VopB) \</span></div> |
| 256 | <div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="preprocessor"> { \</span></div> |
| 257 | <div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="preprocessor"> return add_sat(VopA, VopB); \</span></div> |
| 258 | <div class="line"><a name="l00159"></a><span class="lineno"> 159</span> <span class="preprocessor"> }</span></div> |
| 259 | <div class="line"><a name="l00160"></a><span class="lineno"> 160</span> <span class="preprocessor"></span></div> |
| 260 | <div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a86a238190b4587b960b351efa6ced2e7"> 161</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a230d9b32261264756a0d3d4971964753">qs8x1</a>)</div> |
| 261 | <div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a98dd18822a91a19b474a8fd15d50061f"> 162</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a3ab174b05a269317ec18680b5c781a04">qs8x2</a>)</div> |
| 262 | <div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a68f46f9e97a25605433c60c1cb094a18"> 163</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a10dfbf9412b518cd160133b68e2da8fd">qs8x4</a>)</div> |
| 263 | <div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a1bdc124e4540215bcb74728079567b57"> 164</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a8362e532b9c16e2367f9102963b6336a">qs8x8</a>)</div> |
| 264 | <div class="line"><a name="l00165"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a6faff16a13c9424932e11379a70455d4"> 165</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a5a2cc1a836612185f0378de9e7159e27">qs8x16</a>)</div> |
| 265 | <div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a938b168b2ee376ec12181ddda282dada"> 166</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#aab72e548e91d1bac44d0a8503dfa12e7">qs16x1</a>)</div> |
| 266 | <div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#afe98542620c3f6ea5a29ac05b4c8900b"> 167</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#ac120446f465238102c2ba0a23ae4aa47">qs16x2</a>)</div> |
| 267 | <div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ad603ae6114bbce3fa9bd8e8debd6fdea"> 168</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a5e34d3e41af677765369d33a3871d95f">qs16x4</a>)</div> |
| 268 | <div class="line"><a name="l00169"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#afda8a27ba1a7360bac98af6e90968a48"> 169</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#ad7f60c2ef8f8b80da7fd81570db06d4a">qs16x8</a>)</div> |
| 269 | <div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#afd8142a5de5c45701d8846030ac01ac9"> 170</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a16a82528f3e1c6eb81fd9aac6ad45e62">qs16x16</a>)</div> |
| 270 | <div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a9d8aada55ce6f27ec5cb2a66d6bc9d22"> 171</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a513b425c3ee001dddfdde427947ccf00">qs32x1</a>)</div> |
| 271 | <div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a878f5ce2b7bd2321138ac5f950a49911"> 172</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#addf730860de5f7752f0c85a385088e96">qs32x2</a>)</div> |
| 272 | <div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a598bb32725cac3d3bc202230f61800cb"> 173</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a3df1d8363c18bb92b3451d41c6bfc891">qs32x4</a>)</div> |
| 273 | <div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ad8f393b0b41cb21689ddade3ff9ef1fa"> 174</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#af8a54f984958bddf4f24cd95867a82f5">qs32x8</a>)</div> |
| 274 | <div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a060f775d2cfcf5eebe4e95ea7be3a57b"> 175</a></span> <a class="code" href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a7e505a06809f9ab428dd0ba9be1ea35e">qs32x16</a>)</div> |
| 275 | <div class="line"><a name="l00176"></a><span class="lineno"> 176</span> </div> |
| 276 | <div class="line"><a name="l00177"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a8fe4e6aa79b6e2faec019e53e1f39113"> 177</a></span> <span class="preprocessor">#define ADD_SAT_OP_EXPAND_STR(a, b, type, size) add_sat_##type##x##size((a), (b))</span></div> |
| 277 | <div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a6b1acbaff6cb3bad4edda9a93dac1f9e"> 178</a></span> <span class="preprocessor"></span><span class="preprocessor">#define ADD_SAT_OP_EXPAND(a, b, type, size) ADD_SAT_OP_EXPAND_STR(a, b, type, size)</span></div> |
| 278 | <div class="line"><a name="l00179"></a><span class="lineno"> 179</span> <span class="preprocessor"></span></div> |
| 279 | <div class="line"><a name="l00186"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ab555884d2db3be32fc693f670d8a99c7"> 186</a></span> <span class="preprocessor">#define SUBQ_SAT_IMPL(type) \</span></div> |
| 280 | <div class="line"><a name="l00187"></a><span class="lineno"> 187</span> <span class="preprocessor"> inline type sub_sat_##type(type VopA, type VopB) \</span></div> |
| 281 | <div class="line"><a name="l00188"></a><span class="lineno"> 188</span> <span class="preprocessor"> { \</span></div> |
| 282 | <div class="line"><a name="l00189"></a><span class="lineno"> 189</span> <span class="preprocessor"> return sub_sat(VopA, VopB); \</span></div> |
| 283 | <div class="line"><a name="l00190"></a><span class="lineno"> 190</span> <span class="preprocessor"> }</span></div> |
| 284 | <div class="line"><a name="l00191"></a><span class="lineno"> 191</span> <span class="preprocessor"></span></div> |
| 285 | <div class="line"><a name="l00192"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a17474ee664876c4e265341f07f6b3562"> 192</a></span> <a class="code" href="fixed__point_8h.xhtml#ab555884d2db3be32fc693f670d8a99c7">SUBQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a230d9b32261264756a0d3d4971964753">qs8x1</a>)</div> |
| 286 | <div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae078571f80bab0d4473b5786220ca557"> 193</a></span> <a class="code" href="fixed__point_8h.xhtml#ab555884d2db3be32fc693f670d8a99c7">SUBQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a3ab174b05a269317ec18680b5c781a04">qs8x2</a>)</div> |
| 287 | <div class="line"><a name="l00194"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a1acb5de3f800cd2d0068e25d833d8cdc"> 194</a></span> <a class="code" href="fixed__point_8h.xhtml#ab555884d2db3be32fc693f670d8a99c7">SUBQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a10dfbf9412b518cd160133b68e2da8fd">qs8x4</a>)</div> |
| 288 | <div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a7635f49daeea0c64e1b153056d7b8b6c"> 195</a></span> <a class="code" href="fixed__point_8h.xhtml#ab555884d2db3be32fc693f670d8a99c7">SUBQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a8362e532b9c16e2367f9102963b6336a">qs8x8</a>)</div> |
| 289 | <div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#add35b8b1a8470b2777098251bd3b2230"> 196</a></span> <a class="code" href="fixed__point_8h.xhtml#ab555884d2db3be32fc693f670d8a99c7">SUBQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a5a2cc1a836612185f0378de9e7159e27">qs8x16</a>)</div> |
| 290 | <div class="line"><a name="l00197"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a4d22f610d17883dae5370c3e7d154c76"> 197</a></span> <a class="code" href="fixed__point_8h.xhtml#ab555884d2db3be32fc693f670d8a99c7">SUBQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#aab72e548e91d1bac44d0a8503dfa12e7">qs16x1</a>)</div> |
| 291 | <div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#af0d4e5500f90ef66bdf87b01bbb8e942"> 198</a></span> <a class="code" href="fixed__point_8h.xhtml#ab555884d2db3be32fc693f670d8a99c7">SUBQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#ac120446f465238102c2ba0a23ae4aa47">qs16x2</a>)</div> |
| 292 | <div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ac860bf2f067fb42de2c8db799423104f"> 199</a></span> <a class="code" href="fixed__point_8h.xhtml#ab555884d2db3be32fc693f670d8a99c7">SUBQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a5e34d3e41af677765369d33a3871d95f">qs16x4</a>)</div> |
| 293 | <div class="line"><a name="l00200"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ac409af663422e74467d0fe174592b406"> 200</a></span> <a class="code" href="fixed__point_8h.xhtml#ab555884d2db3be32fc693f670d8a99c7">SUBQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#ad7f60c2ef8f8b80da7fd81570db06d4a">qs16x8</a>)</div> |
| 294 | <div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a9b91ed896c5093a7b73b15eb2539d804"> 201</a></span> <a class="code" href="fixed__point_8h.xhtml#ab555884d2db3be32fc693f670d8a99c7">SUBQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a16a82528f3e1c6eb81fd9aac6ad45e62">qs16x16</a>)</div> |
| 295 | <div class="line"><a name="l00202"></a><span class="lineno"> 202</span> </div> |
| 296 | <div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a7076a8fac3c484611ce522dc7103fff4"> 203</a></span> <span class="preprocessor">#define SUB_SAT_OP_EXPAND_STR(a, b, type, size) sub_sat_##type##x##size((a), (b))</span></div> |
| 297 | <div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ac081784e1547f3f2e9065e3ed54f2fba"> 204</a></span> <span class="preprocessor"></span><span class="preprocessor">#define SUB_SAT_OP_EXPAND(a, b, type, size) SUB_SAT_OP_EXPAND_STR(a, b, type, size)</span></div> |
| 298 | <div class="line"><a name="l00205"></a><span class="lineno"> 205</span> <span class="preprocessor"></span></div> |
| 299 | <div class="line"><a name="l00206"></a><span class="lineno"> 206</span> <span class="comment">/* Multiply of two fixed point numbers</span></div> |
| 300 | <div class="line"><a name="l00207"></a><span class="lineno"> 207</span> <span class="comment"> *</span></div> |
| 301 | <div class="line"><a name="l00208"></a><span class="lineno"> 208</span> <span class="comment"> * @param[in] type the actual data type.</span></div> |
| 302 | <div class="line"><a name="l00209"></a><span class="lineno"> 209</span> <span class="comment"> * @param[in] itype the intermediate data type.</span></div> |
| 303 | <div class="line"><a name="l00210"></a><span class="lineno"> 210</span> <span class="comment"> *</span></div> |
| 304 | <div class="line"><a name="l00211"></a><span class="lineno"> 211</span> <span class="comment"> * @return The result of the fixed point multiplication.</span></div> |
| 305 | <div class="line"><a name="l00212"></a><span class="lineno"> 212</span> <span class="comment"> */</span></div> |
| 306 | <div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a8900371ff8da316eea9c61c993043ca5"> 213</a></span> <span class="preprocessor">#define MULQ_IMPL(type, itype) \</span></div> |
| 307 | <div class="line"><a name="l00214"></a><span class="lineno"> 214</span> <span class="preprocessor"> inline type mul_##type(type VopA, type VopB, int fixed_point_position) \</span></div> |
| 308 | <div class="line"><a name="l00215"></a><span class="lineno"> 215</span> <span class="preprocessor"> { \</span></div> |
| 309 | <div class="line"><a name="l00216"></a><span class="lineno"> 216</span> <span class="preprocessor"> itype round_val = (itype)(1 << (fixed_point_position - 1)); \</span></div> |
| 310 | <div class="line"><a name="l00217"></a><span class="lineno"> 217</span> <span class="preprocessor"> itype res = CONVERT((VopA), itype) * CONVERT((VopB), itype) + round_val; \</span></div> |
| 311 | <div class="line"><a name="l00218"></a><span class="lineno"> 218</span> <span class="preprocessor"> return CONVERT((res >> (itype)fixed_point_position), type); \</span></div> |
| 312 | <div class="line"><a name="l00219"></a><span class="lineno"> 219</span> <span class="preprocessor"> }</span></div> |
| 313 | <div class="line"><a name="l00220"></a><span class="lineno"> 220</span> <span class="preprocessor"></span></div> |
| 314 | <div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a9a50c35ce1383cd23d3ab166a7929013"> 221</a></span> <a class="code" href="fixed__point_8h.xhtml#a8900371ff8da316eea9c61c993043ca5">MULQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a8362e532b9c16e2367f9102963b6336a">qs8x8</a>, <a class="code" href="fixed__point_8h.xhtml#ad7f60c2ef8f8b80da7fd81570db06d4a">qs16x8</a>)</div> |
| 315 | <div class="line"><a name="l00222"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#af09044372ea5862497f62c8bd76ba035"> 222</a></span> <a class="code" href="fixed__point_8h.xhtml#a8900371ff8da316eea9c61c993043ca5">MULQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#ad7f60c2ef8f8b80da7fd81570db06d4a">qs16x8</a>, <a class="code" href="fixed__point_8h.xhtml#af8a54f984958bddf4f24cd95867a82f5">qs32x8</a>)</div> |
| 316 | <div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a563cc8014b17755a99e1ecac00a2c7f7"> 223</a></span> <a class="code" href="fixed__point_8h.xhtml#a8900371ff8da316eea9c61c993043ca5">MULQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a5a2cc1a836612185f0378de9e7159e27">qs8x16</a>, <a class="code" href="fixed__point_8h.xhtml#a16a82528f3e1c6eb81fd9aac6ad45e62">qs16x16</a>)</div> |
| 317 | <div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a532c6df4b17f88f0e126a97c6e9670ee"> 224</a></span> <a class="code" href="fixed__point_8h.xhtml#a8900371ff8da316eea9c61c993043ca5">MULQ_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a16a82528f3e1c6eb81fd9aac6ad45e62">qs16x16</a>, <a class="code" href="fixed__point_8h.xhtml#a7e505a06809f9ab428dd0ba9be1ea35e">qs32x16</a>)</div> |
| 318 | <div class="line"><a name="l00225"></a><span class="lineno"> 225</span> </div> |
| 319 | <div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#afadf927c77d81f7dcd9af28b65c9c79d"> 226</a></span> <span class="preprocessor">#define MUL_OP_EXPAND_STR(a, b, type, size, position) mul_##type##x##size((a), (b), (position))</span></div> |
| 320 | <div class="line"><a name="l00227"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a1b9871e1733f3827061df926120f9f46"> 227</a></span> <span class="preprocessor"></span><span class="preprocessor">#define MUL_OP_EXPAND(a, b, type, size, position) MUL_OP_EXPAND_STR(a, b, type, size, position)</span></div> |
| 321 | <div class="line"><a name="l00228"></a><span class="lineno"> 228</span> <span class="preprocessor"></span></div> |
| 322 | <div class="line"><a name="l00229"></a><span class="lineno"> 229</span> <span class="comment">/* Saturate multiply of two fixed point numbers</span></div> |
| 323 | <div class="line"><a name="l00230"></a><span class="lineno"> 230</span> <span class="comment"> *</span></div> |
| 324 | <div class="line"><a name="l00231"></a><span class="lineno"> 231</span> <span class="comment"> * @param[in] type the actual data type.</span></div> |
| 325 | <div class="line"><a name="l00232"></a><span class="lineno"> 232</span> <span class="comment"> * @param[in] itype the intermediate data type.</span></div> |
| 326 | <div class="line"><a name="l00233"></a><span class="lineno"> 233</span> <span class="comment"> *</span></div> |
| 327 | <div class="line"><a name="l00234"></a><span class="lineno"> 234</span> <span class="comment"> * @return The result of the fixed point multiplication. The result is saturated in case of overflow</span></div> |
| 328 | <div class="line"><a name="l00235"></a><span class="lineno"> 235</span> <span class="comment"> */</span></div> |
| 329 | <div class="line"><a name="l00236"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f"> 236</a></span> <span class="preprocessor">#define MULQ_SAT_IMPL(type, itype) \</span></div> |
| 330 | <div class="line"><a name="l00237"></a><span class="lineno"> 237</span> <span class="preprocessor"> inline type mul_sat_##type(type VopA, type VopB, int fixed_point_position) \</span></div> |
| 331 | <div class="line"><a name="l00238"></a><span class="lineno"> 238</span> <span class="preprocessor"> { \</span></div> |
| 332 | <div class="line"><a name="l00239"></a><span class="lineno"> 239</span> <span class="preprocessor"> itype round_val = (itype)(1 << (fixed_point_position - 1)); \</span></div> |
| 333 | <div class="line"><a name="l00240"></a><span class="lineno"> 240</span> <span class="preprocessor"> itype res = mad_sat(CONVERT((VopA), itype), CONVERT((VopB), itype), round_val); \</span></div> |
| 334 | <div class="line"><a name="l00241"></a><span class="lineno"> 241</span> <span class="preprocessor"> return CONVERT_SAT((res >> (itype)fixed_point_position), type); \</span></div> |
| 335 | <div class="line"><a name="l00242"></a><span class="lineno"> 242</span> <span class="preprocessor"> }</span></div> |
| 336 | <div class="line"><a name="l00243"></a><span class="lineno"> 243</span> <span class="preprocessor"></span></div> |
| 337 | <div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a3508d76a5262f5f3dbf278d7efcf5db9"> 244</a></span> <a class="code" href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f">MULQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a230d9b32261264756a0d3d4971964753">qs8x1</a>, <a class="code" href="fixed__point_8h.xhtml#aab72e548e91d1bac44d0a8503dfa12e7">qs16x1</a>)</div> |
| 338 | <div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ad1bf1fe4122e578d1d6f7eb9c922da2e"> 245</a></span> <a class="code" href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f">MULQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a3ab174b05a269317ec18680b5c781a04">qs8x2</a>, <a class="code" href="fixed__point_8h.xhtml#ac120446f465238102c2ba0a23ae4aa47">qs16x2</a>)</div> |
| 339 | <div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a0a2d7bee6c290d0db95ccbe34e7942ad"> 246</a></span> <a class="code" href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f">MULQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a3b12b782d796ddcf0cd8f8b265be033e">qs8x3</a>, <a class="code" href="fixed__point_8h.xhtml#a39d116772b1400e82b2ab12de00909b0">qs16x3</a>)</div> |
| 340 | <div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ab24ca3f7f3f023d8503a1752515e15d4"> 247</a></span> <a class="code" href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f">MULQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a10dfbf9412b518cd160133b68e2da8fd">qs8x4</a>, <a class="code" href="fixed__point_8h.xhtml#a5e34d3e41af677765369d33a3871d95f">qs16x4</a>)</div> |
| 341 | <div class="line"><a name="l00248"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#adc933417ba0492a4da555044652a7641"> 248</a></span> <a class="code" href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f">MULQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a8362e532b9c16e2367f9102963b6336a">qs8x8</a>, qs16x8)</div> |
| 342 | <div class="line"><a name="l00249"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a286a2ecb07602fd7268d31c6e88e62a6"> 249</a></span> <a class="code" href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f">MULQ_SAT_IMPL</a>(qs8x16, qs16x16)</div> |
| 343 | <div class="line"><a name="l00250"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a4b96bef18b8c9ed279273359d259ed65"> 250</a></span> <a class="code" href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f">MULQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#aab72e548e91d1bac44d0a8503dfa12e7">qs16x1</a>, <a class="code" href="fixed__point_8h.xhtml#a513b425c3ee001dddfdde427947ccf00">qs32x1</a>)</div> |
| 344 | <div class="line"><a name="l00251"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a9ef4b9bede0acae7940ecf1e7e58a492"> 251</a></span> <a class="code" href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f">MULQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#ac120446f465238102c2ba0a23ae4aa47">qs16x2</a>, <a class="code" href="fixed__point_8h.xhtml#addf730860de5f7752f0c85a385088e96">qs32x2</a>)</div> |
| 345 | <div class="line"><a name="l00252"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#aef217f3d96eaf598c4225453833c0222"> 252</a></span> <a class="code" href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f">MULQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a39d116772b1400e82b2ab12de00909b0">qs16x3</a>, <a class="code" href="fixed__point_8h.xhtml#abf77757e07132c678f7146c860e80fe1">qs32x3</a>)</div> |
| 346 | <div class="line"><a name="l00253"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a2162dab7e4d7d503d1262b9ffc257a21"> 253</a></span> <a class="code" href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f">MULQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a5e34d3e41af677765369d33a3871d95f">qs16x4</a>, <a class="code" href="fixed__point_8h.xhtml#a3df1d8363c18bb92b3451d41c6bfc891">qs32x4</a>)</div> |
| 347 | <div class="line"><a name="l00254"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a93fefd4972b6b9440c8371509b46d19e"> 254</a></span> <a class="code" href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f">MULQ_SAT_IMPL</a>(qs16x8, <a class="code" href="fixed__point_8h.xhtml#af8a54f984958bddf4f24cd95867a82f5">qs32x8</a>)</div> |
| 348 | <div class="line"><a name="l00255"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#aba68d5b1e592d5b12beb6f9e05e72ed2"> 255</a></span> <a class="code" href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f">MULQ_SAT_IMPL</a>(qs16x16, <a class="code" href="fixed__point_8h.xhtml#a7e505a06809f9ab428dd0ba9be1ea35e">qs32x16</a>)</div> |
| 349 | <div class="line"><a name="l00256"></a><span class="lineno"> 256</span> </div> |
| 350 | <div class="line"><a name="l00257"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a4e160e8fcff1c5ec8fba57505cb0ad91"> 257</a></span> <span class="preprocessor">#define MUL_SAT_OP_EXPAND_STR(a, b, type, size, position) mul_sat_##type##x##size((a), (b), (position))</span></div> |
| 351 | <div class="line"><a name="l00258"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a6b559f5128a43015ffc6c855cf84c243"> 258</a></span> <span class="preprocessor"></span><span class="preprocessor">#define MUL_SAT_OP_EXPAND(a, b, type, size, position) MUL_SAT_OP_EXPAND_STR(a, b, type, size, position)</span></div> |
| 352 | <div class="line"><a name="l00259"></a><span class="lineno"> 259</span> <span class="preprocessor"></span></div> |
| 353 | <div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a31a4619a484c58adcd6e7a9a8354cf23"> 267</a></span> <span class="preprocessor">#define MLAQ_SAT_IMPL(type, itype) \</span></div> |
| 354 | <div class="line"><a name="l00268"></a><span class="lineno"> 268</span> <span class="preprocessor"> type mla_sat_##type(type VopA, type VopB, type VopC, int fixed_point_position) \</span></div> |
| 355 | <div class="line"><a name="l00269"></a><span class="lineno"> 269</span> <span class="preprocessor"> { \</span></div> |
| 356 | <div class="line"><a name="l00270"></a><span class="lineno"> 270</span> <span class="preprocessor"> itype res = mad_sat(CONVERT(VopB, itype), CONVERT(VopC, itype), (itype)(1 << (fixed_point_position - 1))); \</span></div> |
| 357 | <div class="line"><a name="l00271"></a><span class="lineno"> 271</span> <span class="preprocessor"> return add_sat(VopA, CONVERT_SAT(res >> (itype)fixed_point_position, type)); \</span></div> |
| 358 | <div class="line"><a name="l00272"></a><span class="lineno"> 272</span> <span class="preprocessor"> }</span></div> |
| 359 | <div class="line"><a name="l00273"></a><span class="lineno"> 273</span> <span class="preprocessor"></span></div> |
| 360 | <div class="line"><a name="l00274"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a85dee8b5dd48bfc059c5d6397557b562"> 274</a></span> <a class="code" href="fixed__point_8h.xhtml#a31a4619a484c58adcd6e7a9a8354cf23">MLAQ_SAT_IMPL</a>(qs8x8, qs16x8)</div> |
| 361 | <div class="line"><a name="l00275"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ad59f32bf4f61044a698ff4da02080e5a"> 275</a></span> <a class="code" href="fixed__point_8h.xhtml#a31a4619a484c58adcd6e7a9a8354cf23">MLAQ_SAT_IMPL</a>(qs8x16, qs16x16)</div> |
| 362 | <div class="line"><a name="l00276"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a7a3c295a894e0529251bd4529b36a574"> 276</a></span> <a class="code" href="fixed__point_8h.xhtml#a31a4619a484c58adcd6e7a9a8354cf23">MLAQ_SAT_IMPL</a>(qs16x8, <a class="code" href="fixed__point_8h.xhtml#af8a54f984958bddf4f24cd95867a82f5">qs32x8</a>)</div> |
| 363 | <div class="line"><a name="l00277"></a><span class="lineno"> 277</span> </div> |
| 364 | <div class="line"><a name="l00278"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a8cde8777703946ea2e06b20d6831d489"> 278</a></span> <span class="preprocessor">#define MLA_SAT_OP_EXPAND_STR(a, b, c, type, size, position) mla_sat_##type##x##size((a), (b), (c), (position))</span></div> |
| 365 | <div class="line"><a name="l00279"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a8a25ee378391e23386ca195249610562"> 279</a></span> <span class="preprocessor"></span><span class="preprocessor">#define MLA_SAT_OP_EXPAND(a, b, c, type, size, position) MLA_SAT_OP_EXPAND_STR(a, b, c, type, size, position)</span></div> |
| 366 | <div class="line"><a name="l00280"></a><span class="lineno"> 280</span> <span class="preprocessor"></span></div> |
| 367 | <div class="line"><a name="l00288"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a2258d987499bd7c92db2c90977fd2409"> 288</a></span> <span class="preprocessor">#define MLALQ_SAT_IMPL(type, itype) \</span></div> |
| 368 | <div class="line"><a name="l00289"></a><span class="lineno"> 289</span> <span class="preprocessor"> itype mlal_sat_##type(itype VopA, type VopB, type VopC, int fixed_point_position) \</span></div> |
| 369 | <div class="line"><a name="l00290"></a><span class="lineno"> 290</span> <span class="preprocessor"> { \</span></div> |
| 370 | <div class="line"><a name="l00291"></a><span class="lineno"> 291</span> <span class="preprocessor"> itype res = mad_sat(CONVERT(VopB, itype), CONVERT(VopC, itype), (itype)(1 << (fixed_point_position - 1))); \</span></div> |
| 371 | <div class="line"><a name="l00292"></a><span class="lineno"> 292</span> <span class="preprocessor"> return add_sat(VopA, res >> (itype)fixed_point_position); \</span></div> |
| 372 | <div class="line"><a name="l00293"></a><span class="lineno"> 293</span> <span class="preprocessor"> }</span></div> |
| 373 | <div class="line"><a name="l00294"></a><span class="lineno"> 294</span> <span class="preprocessor"></span></div> |
| 374 | <div class="line"><a name="l00295"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a09f5d764b62b47a1894a4cb71a0a62f6"> 295</a></span> <a class="code" href="fixed__point_8h.xhtml#a2258d987499bd7c92db2c90977fd2409">MLALQ_SAT_IMPL</a>(qs8x8, qs16x8)</div> |
| 375 | <div class="line"><a name="l00296"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a50b6bfd3a44a0ac605e88135e230d1e5"> 296</a></span> <a class="code" href="fixed__point_8h.xhtml#a2258d987499bd7c92db2c90977fd2409">MLALQ_SAT_IMPL</a>(qs16x8, <a class="code" href="fixed__point_8h.xhtml#af8a54f984958bddf4f24cd95867a82f5">qs32x8</a>)</div> |
| 376 | <div class="line"><a name="l00297"></a><span class="lineno"> 297</span> </div> |
| 377 | <div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a80b890755bdc8392bcc853d24b34682d"> 298</a></span> <span class="preprocessor">#define MLAL_SAT_OP_EXPAND_STR(a, b, c, type, size, position) mlal_sat_##type##x##size((a), (b), (c), (position))</span></div> |
| 378 | <div class="line"><a name="l00299"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ac52a40b99b01208c76483ee00b96ba9e"> 299</a></span> <span class="preprocessor"></span><span class="preprocessor">#define MLAL_SAT_OP_EXPAND(a, b, c, type, size, position) MLAL_SAT_OP_EXPAND_STR(a, b, c, type, size, position)</span></div> |
| 379 | <div class="line"><a name="l00300"></a><span class="lineno"> 300</span> <span class="preprocessor"></span></div> |
| 380 | <div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#aac0b47414a86d32e5c891ab6a75b313b"> 309</a></span> <span class="preprocessor">#define DIVQ_SAT_IMPL(stype, type, itype) \</span></div> |
| 381 | <div class="line"><a name="l00310"></a><span class="lineno"> 310</span> <span class="preprocessor"> inline type div_sat_##type(type VopA, type VopB, int fixed_point_position) \</span></div> |
| 382 | <div class="line"><a name="l00311"></a><span class="lineno"> 311</span> <span class="preprocessor"> { \</span></div> |
| 383 | <div class="line"><a name="l00312"></a><span class="lineno"> 312</span> <span class="preprocessor"> itype conv_a = CONVERT((VopA), itype); \</span></div> |
| 384 | <div class="line"><a name="l00313"></a><span class="lineno"> 313</span> <span class="preprocessor"> itype denominator = CONVERT((VopB), itype); \</span></div> |
| 385 | <div class="line"><a name="l00314"></a><span class="lineno"> 314</span> <span class="preprocessor"> itype numerator = conv_a << (itype)(fixed_point_position); \</span></div> |
| 386 | <div class="line"><a name="l00315"></a><span class="lineno"> 315</span> <span class="preprocessor"> itype res = select((itype)(numerator / denominator), select((itype)stype##_MAX, (itype)stype##_MIN, (itype)(conv_a < (itype)0)), (itype)(denominator == (itype)0)); \</span></div> |
| 387 | <div class="line"><a name="l00316"></a><span class="lineno"> 316</span> <span class="preprocessor"> return CONVERT_SAT((res), type); \</span></div> |
| 388 | <div class="line"><a name="l00317"></a><span class="lineno"> 317</span> <span class="preprocessor"> }</span></div> |
| 389 | <div class="line"><a name="l00318"></a><span class="lineno"> 318</span> <span class="preprocessor"></span></div> |
| 390 | <div class="line"><a name="l00319"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a524ddfb8ca9b49eb0870b73ee3bd720c"> 319</a></span> <a class="code" href="fixed__point_8h.xhtml#aac0b47414a86d32e5c891ab6a75b313b">DIVQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a96d48f67de90aaed492da7fb7a006b94">qs8</a>, qs8x16, qs16x16)</div> |
| 391 | <div class="line"><a name="l00320"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae915e52782d10b155502837e6caa9721"> 320</a></span> <a class="code" href="fixed__point_8h.xhtml#aac0b47414a86d32e5c891ab6a75b313b">DIVQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a26a8ca855cd14b1867173d301baf6c4f">qs16</a>, qs16x8, <a class="code" href="fixed__point_8h.xhtml#af8a54f984958bddf4f24cd95867a82f5">qs32x8</a>)</div> |
| 392 | <div class="line"><a name="l00321"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#af57ae5abe45efdd8ec58130e3d4726cb"> 321</a></span> <a class="code" href="fixed__point_8h.xhtml#aac0b47414a86d32e5c891ab6a75b313b">DIVQ_SAT_IMPL</a>(qs16, qs16x16, <a class="code" href="fixed__point_8h.xhtml#a7e505a06809f9ab428dd0ba9be1ea35e">qs32x16</a>)</div> |
| 393 | <div class="line"><a name="l00322"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a77995d58e1505e2182a75ee199d8b01e"> 322</a></span> <a class="code" href="fixed__point_8h.xhtml#aac0b47414a86d32e5c891ab6a75b313b">DIVQ_SAT_IMPL</a>(<a class="code" href="fixed__point_8h.xhtml#a96d48f67de90aaed492da7fb7a006b94">qs8</a>, qs8, qs16)</div> |
| 394 | <div class="line"><a name="l00323"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a8d2c17065a15f7b298145b13c28ef349"> 323</a></span> <a class="code" href="fixed__point_8h.xhtml#aac0b47414a86d32e5c891ab6a75b313b">DIVQ_SAT_IMPL</a>(qs16, qs16, <a class="code" href="fixed__point_8h.xhtml#a8115de4a1860a9bf15e13f4ebfdb707f">qs32</a>)</div> |
| 395 | <div class="line"><a name="l00324"></a><span class="lineno"> 324</span> </div> |
| 396 | <div class="line"><a name="l00325"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ac2995f9506cbc5c918ecf47f447bcfce"> 325</a></span> <span class="preprocessor">#define DIV_SAT_OP_EXPAND_STR(a, b, type, position) div_sat_##type((a), (b), (position))</span></div> |
| 397 | <div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#aa13fe0d2ecef3e5b22315baf39715e46"> 326</a></span> <span class="preprocessor"></span><span class="preprocessor">#define DIV_SAT_OP_EXPAND(a, b, type, position) DIV_SAT_OP_EXPAND_STR(a, b, type, position)</span></div> |
| 398 | <div class="line"><a name="l00327"></a><span class="lineno"> 327</span> <span class="preprocessor"></span></div> |
| 399 | <div class="line"><a name="l00328"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a6ad4d9db82a42c5266cba5e0f317998c"> 328</a></span> <span class="preprocessor">#define DIV_SAT_OP_VEC_EXPAND_STR(a, b, type, size, position) div_sat_##type##x##size((a), (b), (position))</span></div> |
| 400 | <div class="line"><a name="l00329"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a774126960511e4d827f0d2d3d68abe97"> 329</a></span> <span class="preprocessor"></span><span class="preprocessor">#define DIV_SAT_OP_VEC_EXPAND(a, b, type, size, position) DIV_SAT_OP_VEC_EXPAND_STR(a, b, type, size, position)</span></div> |
| 401 | <div class="line"><a name="l00330"></a><span class="lineno"> 330</span> <span class="preprocessor"></span></div> |
| 402 | <div class="line"><a name="l00341"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae64808afdc06c77889f1bb0565905949"> 341</a></span> <span class="preprocessor">#define EXPQ_IMPL(stype, type, size) \</span></div> |
| 403 | <div class="line"><a name="l00342"></a><span class="lineno"> 342</span> <span class="preprocessor"> inline type exp_sat_##type(type VopA, int fixed_point_position) \</span></div> |
| 404 | <div class="line"><a name="l00343"></a><span class="lineno"> 343</span> <span class="preprocessor"> { \</span></div> |
| 405 | <div class="line"><a name="l00344"></a><span class="lineno"> 344</span> <span class="preprocessor"> type const_one = (type)(1 << (fixed_point_position)); \</span></div> |
| 406 | <div class="line"><a name="l00345"></a><span class="lineno"> 345</span> <span class="preprocessor"> type ln2 = (type)((((0x58B9 >> (14 - fixed_point_position))) + 1) >> 1); \</span></div> |
| 407 | <div class="line"><a name="l00346"></a><span class="lineno"> 346</span> <span class="preprocessor"> type inv_ln2 = (type)((((0x38AA >> (14 - fixed_point_position)) + 1) >> 1)) | const_one; \</span></div> |
| 408 | <div class="line"><a name="l00347"></a><span class="lineno"> 347</span> <span class="preprocessor"> type A = (type)(((0x7FBA >> (14 - fixed_point_position)) + 1) >> 1); \</span></div> |
| 409 | <div class="line"><a name="l00348"></a><span class="lineno"> 348</span> <span class="preprocessor"> type B = (type)(((0x3FE9 >> (14 - fixed_point_position)) + 1) >> 1); \</span></div> |
| 410 | <div class="line"><a name="l00349"></a><span class="lineno"> 349</span> <span class="preprocessor"> type C = (type)(((0x1693 >> (14 - fixed_point_position)) + 1) >> 1); \</span></div> |
| 411 | <div class="line"><a name="l00350"></a><span class="lineno"> 350</span> <span class="preprocessor"> type D = (type)(((0x0592 >> (14 - fixed_point_position)) + 1) >> 1); \</span></div> |
| 412 | <div class="line"><a name="l00351"></a><span class="lineno"> 351</span> <span class="preprocessor"> type m = MUL_SAT_OP_EXPAND(VopA, inv_ln2, stype, size, fixed_point_position); \</span></div> |
| 413 | <div class="line"><a name="l00352"></a><span class="lineno"> 352</span> <span class="preprocessor"> type dec_m = m >> (type)fixed_point_position; \</span></div> |
| 414 | <div class="line"><a name="l00353"></a><span class="lineno"> 353</span> <span class="preprocessor"> type alpha = MUL_SAT_OP_EXPAND(dec_m << (type)fixed_point_position, ln2, stype, size, fixed_point_position); \</span></div> |
| 415 | <div class="line"><a name="l00354"></a><span class="lineno"> 354</span> <span class="preprocessor"> alpha = CONVERT(abs_diff(VopA, alpha), type); \</span></div> |
| 416 | <div class="line"><a name="l00355"></a><span class="lineno"> 355</span> <span class="preprocessor"> type sum = add_sat(MUL_SAT_OP_EXPAND(alpha, D, stype, size, fixed_point_position), C); \</span></div> |
| 417 | <div class="line"><a name="l00356"></a><span class="lineno"> 356</span> <span class="preprocessor"> sum = add_sat(MUL_SAT_OP_EXPAND(alpha, sum, stype, size, fixed_point_position), B); \</span></div> |
| 418 | <div class="line"><a name="l00357"></a><span class="lineno"> 357</span> <span class="preprocessor"> sum = add_sat(MUL_SAT_OP_EXPAND(alpha, sum, stype, size, fixed_point_position), A); \</span></div> |
| 419 | <div class="line"><a name="l00358"></a><span class="lineno"> 358</span> <span class="preprocessor"> sum = add_sat(MUL_SAT_OP_EXPAND(alpha, sum, stype, size, fixed_point_position), const_one); \</span></div> |
| 420 | <div class="line"><a name="l00359"></a><span class="lineno"> 359</span> <span class="preprocessor"> return select((type)stype##_MAX, select(sum << dec_m, sum >> -dec_m, dec_m < (type)0), clz(sum) > dec_m); </span><span class="comment">/* Saturate result if needed */</span><span class="preprocessor"> \</span></div> |
| 421 | <div class="line"><a name="l00360"></a><span class="lineno"> 360</span> <span class="preprocessor"> }</span></div> |
| 422 | <div class="line"><a name="l00361"></a><span class="lineno"> 361</span> <span class="preprocessor"></span></div> |
| 423 | <div class="line"><a name="l00362"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a566d1090e790e168a58a3dd6dcea2476"> 362</a></span> <a class="code" href="fixed__point_8h.xhtml#ae64808afdc06c77889f1bb0565905949">EXPQ_IMPL</a>(qs8, qs8x16, 16)</div> |
| 424 | <div class="line"><a name="l00363"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#acbc9ca80c6c37594584af82b36078cb8"> 363</a></span> <a class="code" href="fixed__point_8h.xhtml#ae64808afdc06c77889f1bb0565905949">EXPQ_IMPL</a>(qs16, qs16x8, 8)</div> |
| 425 | <div class="line"><a name="l00364"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a718889c3f240b9e020d6f507f2c16a31"> 364</a></span> <a class="code" href="fixed__point_8h.xhtml#ae64808afdc06c77889f1bb0565905949">EXPQ_IMPL</a>(qs16, qs16x16, 16)</div> |
| 426 | <div class="line"><a name="l00365"></a><span class="lineno"> 365</span> </div> |
| 427 | <div class="line"><a name="l00366"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a368a98fe336caf8c24840c67735cd04e"> 366</a></span> <span class="preprocessor">#define EXP_OP_EXPAND_STR(a, type, size, position) exp_sat_##type##x##size((a), (position))</span></div> |
| 428 | <div class="line"><a name="l00367"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a80482c3ae2b0e68658f84f081a6fbdde"> 367</a></span> <span class="preprocessor"></span><span class="preprocessor">#define EXP_OP_EXPAND(a, type, size, position) EXP_OP_EXPAND_STR(a, type, size, position)</span></div> |
| 429 | <div class="line"><a name="l00368"></a><span class="lineno"> 368</span> <span class="preprocessor"></span></div> |
| 430 | <div class="line"><a name="l00379"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a902ecdf01fd8a0760e4ef66ce5814a20"> 379</a></span> <span class="preprocessor">#define LOGQ_IMPL(stype, type, size) \</span></div> |
| 431 | <div class="line"><a name="l00380"></a><span class="lineno"> 380</span> <span class="preprocessor"> inline type log_sat_##type(type VopA, int fixed_point_position) \</span></div> |
| 432 | <div class="line"><a name="l00381"></a><span class="lineno"> 381</span> <span class="preprocessor"> { \</span></div> |
| 433 | <div class="line"><a name="l00382"></a><span class="lineno"> 382</span> <span class="preprocessor"> type const_one = (type)(1 << (fixed_point_position)); \</span></div> |
| 434 | <div class="line"><a name="l00383"></a><span class="lineno"> 383</span> <span class="preprocessor"> type ln2 = (type)(0x58B9 >> (15 - fixed_point_position)); </span><span class="comment">/* 1.4384189 */</span><span class="preprocessor"> \</span></div> |
| 435 | <div class="line"><a name="l00384"></a><span class="lineno"> 384</span> <span class="preprocessor"> type A = (type)(0x5C0F >> (14 - fixed_point_position)); </span><span class="comment">/* 1.4384189 */</span><span class="preprocessor"> \</span></div> |
| 436 | <div class="line"><a name="l00385"></a><span class="lineno"> 385</span> <span class="preprocessor"> type B = -(type)(0x56AE >> (15 - fixed_point_position)); </span><span class="comment">/* -0.6771900 */</span><span class="preprocessor"> \</span></div> |
| 437 | <div class="line"><a name="l00386"></a><span class="lineno"> 386</span> <span class="preprocessor"> type C = (type)(0x2933 >> (15 - fixed_point_position)); </span><span class="comment">/* 0.3218538 */</span><span class="preprocessor"> \</span></div> |
| 438 | <div class="line"><a name="l00387"></a><span class="lineno"> 387</span> <span class="preprocessor"> type D = -(type)(0x0AA7 >> (15 - fixed_point_position)); </span><span class="comment">/* -0.0832229 */</span><span class="preprocessor"> \</span></div> |
| 439 | <div class="line"><a name="l00388"></a><span class="lineno"> 388</span> <span class="preprocessor"> type inter_a = select(VopA, DIV_SAT_OP_VEC_EXPAND(const_one, VopA, stype, size, fixed_point_position), VopA < const_one); \</span></div> |
| 440 | <div class="line"><a name="l00389"></a><span class="lineno"> 389</span> <span class="preprocessor"> type shift_val = (type)(15 - stype##_SHIFT) - clz(inter_a >> (type)fixed_point_position); \</span></div> |
| 441 | <div class="line"><a name="l00390"></a><span class="lineno"> 390</span> <span class="preprocessor"> inter_a = inter_a >> shift_val; \</span></div> |
| 442 | <div class="line"><a name="l00391"></a><span class="lineno"> 391</span> <span class="preprocessor"> inter_a = sub_sat(inter_a, const_one); \</span></div> |
| 443 | <div class="line"><a name="l00392"></a><span class="lineno"> 392</span> <span class="preprocessor"> type sum = add_sat(MUL_SAT_OP_EXPAND(inter_a, D, stype, size, fixed_point_position), C); \</span></div> |
| 444 | <div class="line"><a name="l00393"></a><span class="lineno"> 393</span> <span class="preprocessor"> sum = add_sat(MUL_SAT_OP_EXPAND(inter_a, sum, stype, size, fixed_point_position), B); \</span></div> |
| 445 | <div class="line"><a name="l00394"></a><span class="lineno"> 394</span> <span class="preprocessor"> sum = add_sat(MUL_SAT_OP_EXPAND(inter_a, sum, stype, size, fixed_point_position), A); \</span></div> |
| 446 | <div class="line"><a name="l00395"></a><span class="lineno"> 395</span> <span class="preprocessor"> sum = MUL_SAT_OP_EXPAND(inter_a, sum, stype, size, fixed_point_position); \</span></div> |
| 447 | <div class="line"><a name="l00396"></a><span class="lineno"> 396</span> <span class="preprocessor"> sum = MUL_SAT_OP_EXPAND(add_sat(sum, shift_val << (type)fixed_point_position), ln2, stype, size, fixed_point_position); \</span></div> |
| 448 | <div class="line"><a name="l00397"></a><span class="lineno"> 397</span> <span class="preprocessor"> return select(select(sum, -sum, VopA < const_one), (type)0, VopA < (type)0); </span><span class="comment">/* Saturate result if needed */</span><span class="preprocessor"> \</span></div> |
| 449 | <div class="line"><a name="l00398"></a><span class="lineno"> 398</span> <span class="preprocessor"> }</span></div> |
| 450 | <div class="line"><a name="l00399"></a><span class="lineno"> 399</span> <span class="preprocessor"></span></div> |
| 451 | <div class="line"><a name="l00400"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ad6bb50561fbfbbf13f5e1e9a29b5c42d"> 400</a></span> <a class="code" href="fixed__point_8h.xhtml#a902ecdf01fd8a0760e4ef66ce5814a20">LOGQ_IMPL</a>(qs8, qs8x16, 16)</div> |
| 452 | <div class="line"><a name="l00401"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a1d6d8a5bb98c983274473090f9320d53"> 401</a></span> <a class="code" href="fixed__point_8h.xhtml#a902ecdf01fd8a0760e4ef66ce5814a20">LOGQ_IMPL</a>(qs16, qs16x8, 8)</div> |
| 453 | <div class="line"><a name="l00402"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a1e9b9fe0c93606b92d8b4a3f1e28a460"> 402</a></span> <a class="code" href="fixed__point_8h.xhtml#a902ecdf01fd8a0760e4ef66ce5814a20">LOGQ_IMPL</a>(qs16, qs16x16, 16)</div> |
| 454 | <div class="line"><a name="l00403"></a><span class="lineno"> 403</span> </div> |
| 455 | <div class="line"><a name="l00404"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a3ec6148739690f17d7f3811c360802ee"> 404</a></span> <span class="preprocessor">#define LOG_OP_EXPAND_STR(a, type, size, position) log_sat_##type##x##size((a), (position))</span></div> |
| 456 | <div class="line"><a name="l00405"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a3f3a83902f2dd8bd456d9f8ebc57c3db"> 405</a></span> <span class="preprocessor"></span><span class="preprocessor">#define LOG_OP_EXPAND(a, type, size, position) LOG_OP_EXPAND_STR(a, type, size, position)</span></div> |
| 457 | <div class="line"><a name="l00406"></a><span class="lineno"> 406</span> <span class="preprocessor"></span></div> |
| 458 | <div class="line"><a name="l00417"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a39fff507525792a262467c3e145bb181"> 417</a></span> <span class="preprocessor">#define INVSQRTQ_IMPL(stype, type, size) \</span></div> |
| 459 | <div class="line"><a name="l00418"></a><span class="lineno"> 418</span> <span class="preprocessor"> inline type invsqrt_sat_##type(type VopA, int fixed_point_position) \</span></div> |
| 460 | <div class="line"><a name="l00419"></a><span class="lineno"> 419</span> <span class="preprocessor"> { \</span></div> |
| 461 | <div class="line"><a name="l00420"></a><span class="lineno"> 420</span> <span class="preprocessor"> type const_three = (type)(3 << (fixed_point_position)); \</span></div> |
| 462 | <div class="line"><a name="l00421"></a><span class="lineno"> 421</span> <span class="preprocessor"> type shift_value = (type)(16 - stype##_SHIFT) - (clz(VopA) + (type)fixed_point_position); \</span></div> |
| 463 | <div class="line"><a name="l00422"></a><span class="lineno"> 422</span> <span class="preprocessor"> type temp = select((type)(VopA >> shift_value), select((type)stype##_MAX, (type)(VopA << (-shift_value)), (type)(clz(VopA) > (-shift_value))), (type)(shift_value < (type)0)); \</span></div> |
| 464 | <div class="line"><a name="l00423"></a><span class="lineno"> 423</span> <span class="preprocessor"> type x = temp; \</span></div> |
| 465 | <div class="line"><a name="l00424"></a><span class="lineno"> 424</span> <span class="preprocessor"> x = MUL_SAT_OP_EXPAND(x, sub_sat(const_three, MUL_SAT_OP_EXPAND(MUL_SAT_OP_EXPAND(x, x, stype, size, fixed_point_position), temp, stype, size, fixed_point_position)), stype, size, fixed_point_position) >> 1; \</span></div> |
| 466 | <div class="line"><a name="l00425"></a><span class="lineno"> 425</span> <span class="preprocessor"> x = MUL_SAT_OP_EXPAND(x, sub_sat(const_three, MUL_SAT_OP_EXPAND(MUL_SAT_OP_EXPAND(x, x, stype, size, fixed_point_position), temp, stype, size, fixed_point_position)), stype, size, fixed_point_position) >> 1; \</span></div> |
| 467 | <div class="line"><a name="l00426"></a><span class="lineno"> 426</span> <span class="preprocessor"> x = MUL_SAT_OP_EXPAND(x, sub_sat(const_three, MUL_SAT_OP_EXPAND(MUL_SAT_OP_EXPAND(x, x, stype, size, fixed_point_position), temp, stype, size, fixed_point_position)), stype, size, fixed_point_position) >> 1; \</span></div> |
| 468 | <div class="line"><a name="l00427"></a><span class="lineno"> 427</span> <span class="preprocessor"> if(sizeof((stype)(1)) > 1) </span><span class="comment">/* Perform more iterations if datatype is QS16 */</span><span class="preprocessor"> \</span></div> |
| 469 | <div class="line"><a name="l00428"></a><span class="lineno"> 428</span> <span class="preprocessor"> { \</span></div> |
| 470 | <div class="line"><a name="l00429"></a><span class="lineno"> 429</span> <span class="preprocessor"> x = MUL_SAT_OP_EXPAND(x, sub_sat(const_three, MUL_SAT_OP_EXPAND(MUL_SAT_OP_EXPAND(x, x, stype, size, fixed_point_position), temp, stype, size, fixed_point_position)), stype, size, fixed_point_position) >> 1; \</span></div> |
| 471 | <div class="line"><a name="l00430"></a><span class="lineno"> 430</span> <span class="preprocessor"> x = MUL_SAT_OP_EXPAND(x, sub_sat(const_three, MUL_SAT_OP_EXPAND(MUL_SAT_OP_EXPAND(x, x, stype, size, fixed_point_position), temp, stype, size, fixed_point_position)), stype, size, fixed_point_position) >> 1; \</span></div> |
| 472 | <div class="line"><a name="l00431"></a><span class="lineno"> 431</span> <span class="preprocessor"> } \</span></div> |
| 473 | <div class="line"><a name="l00432"></a><span class="lineno"> 432</span> <span class="preprocessor"> type shift_value2 = select(shift_value >> 1, (-shift_value) >> 1, shift_value < (type)0); \</span></div> |
| 474 | <div class="line"><a name="l00433"></a><span class="lineno"> 433</span> <span class="preprocessor"> return select((type)(x >> shift_value2), select((type)stype##_MAX, (type)(x << shift_value2), (type)(clz(x) > shift_value2)), (type)(shift_value < (type)0)); </span><span class="comment">/* Saturate result if needed */</span><span class="preprocessor"> \</span></div> |
| 475 | <div class="line"><a name="l00434"></a><span class="lineno"> 434</span> <span class="preprocessor"> }</span></div> |
| 476 | <div class="line"><a name="l00435"></a><span class="lineno"> 435</span> <span class="preprocessor"></span></div> |
| 477 | <div class="line"><a name="l00436"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a33bc7b5204f1f2f497c5f3b94666317e"> 436</a></span> <a class="code" href="fixed__point_8h.xhtml#a39fff507525792a262467c3e145bb181">INVSQRTQ_IMPL</a>(qs8, <a class="code" href="fixed__point_8h.xhtml#a230d9b32261264756a0d3d4971964753">qs8x1</a>, 1)</div> |
| 478 | <div class="line"><a name="l00437"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#acb097557fa3cdc2e3deedf10aa9351a8"> 437</a></span> <a class="code" href="fixed__point_8h.xhtml#a39fff507525792a262467c3e145bb181">INVSQRTQ_IMPL</a>(qs16, qs16x1, 1)</div> |
| 479 | <div class="line"><a name="l00438"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#afd5c6ea7dd791f308a747e14d9b43be8"> 438</a></span> <a class="code" href="fixed__point_8h.xhtml#a39fff507525792a262467c3e145bb181">INVSQRTQ_IMPL</a>(qs8, qs8x16, 16)</div> |
| 480 | <div class="line"><a name="l00439"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#aa9b962c25694ea1a195f987763817b55"> 439</a></span> <a class="code" href="fixed__point_8h.xhtml#a39fff507525792a262467c3e145bb181">INVSQRTQ_IMPL</a>(qs16, qs16x8, 8)</div> |
| 481 | <div class="line"><a name="l00440"></a><span class="lineno"> 440</span> </div> |
| 482 | <div class="line"><a name="l00441"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ac001b306b7ead2e6dcc84a93260600b1"> 441</a></span> <span class="preprocessor">#define INVSQRT_OP_EXPAND_STR(a, type, size, position) invsqrt_sat_##type##x##size((a), (position))</span></div> |
| 483 | <div class="line"><a name="l00442"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a26cc71c52d0d09b4b422c474b52b9b01"> 442</a></span> <span class="preprocessor"></span><span class="preprocessor">#define INVSQRT_OP_EXPAND(a, type, size, position) INVSQRT_OP_EXPAND_STR(a, type, size, position)</span></div> |
| 484 | <div class="line"><a name="l00443"></a><span class="lineno"> 443</span> <span class="preprocessor"></span></div> |
| 485 | <div class="line"><a name="l00454"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a341448197978a201091ddc00ea22f9e9"> 454</a></span> <span class="preprocessor">#define TANHQ_IMPL(stype, type, size) \</span></div> |
| 486 | <div class="line"><a name="l00455"></a><span class="lineno"> 455</span> <span class="preprocessor"> inline type tanh_sat_##type(type VopA, int fixed_point_position) \</span></div> |
| 487 | <div class="line"><a name="l00456"></a><span class="lineno"> 456</span> <span class="preprocessor"> { \</span></div> |
| 488 | <div class="line"><a name="l00457"></a><span class="lineno"> 457</span> <span class="preprocessor"> type const_one = (type)(1 << (fixed_point_position)); \</span></div> |
| 489 | <div class="line"><a name="l00458"></a><span class="lineno"> 458</span> <span class="preprocessor"> type const_two = (type)(2 << (fixed_point_position)); \</span></div> |
| 490 | <div class="line"><a name="l00459"></a><span class="lineno"> 459</span> <span class="preprocessor"> type exp2x = EXP_OP_EXPAND(MUL_SAT_OP_EXPAND(const_two, VopA, stype, size, fixed_point_position), stype, size, fixed_point_position); \</span></div> |
| 491 | <div class="line"><a name="l00460"></a><span class="lineno"> 460</span> <span class="preprocessor"> type num = SUB_SAT_OP_EXPAND(exp2x, const_one, stype, size); \</span></div> |
| 492 | <div class="line"><a name="l00461"></a><span class="lineno"> 461</span> <span class="preprocessor"> type den = ADD_SAT_OP_EXPAND(exp2x, const_one, stype, size); \</span></div> |
| 493 | <div class="line"><a name="l00462"></a><span class="lineno"> 462</span> <span class="preprocessor"> return DIV_SAT_OP_VEC_EXPAND(num, den, stype, size, fixed_point_position); \</span></div> |
| 494 | <div class="line"><a name="l00463"></a><span class="lineno"> 463</span> <span class="preprocessor"> }</span></div> |
| 495 | <div class="line"><a name="l00464"></a><span class="lineno"> 464</span> <span class="preprocessor"></span></div> |
| 496 | <div class="line"><a name="l00465"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a81b68f5d2332aa3a28bc25979dbddd6d"> 465</a></span> <a class="code" href="fixed__point_8h.xhtml#a341448197978a201091ddc00ea22f9e9">TANHQ_IMPL</a>(qs8, qs8x16, 16)</div> |
| 497 | <div class="line"><a name="l00466"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a136aa7ac86076272e764a5746eac5dad"> 466</a></span> <a class="code" href="fixed__point_8h.xhtml#a341448197978a201091ddc00ea22f9e9">TANHQ_IMPL</a>(qs16, qs16x8, 8)</div> |
| 498 | <div class="line"><a name="l00467"></a><span class="lineno"> 467</span> </div> |
| 499 | <div class="line"><a name="l00468"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a452864cb983782cff458f61397fb00eb"> 468</a></span> <span class="preprocessor">#define TANH_OP_EXPAND_STR(a, type, size, position) tanh_sat_##type##x##size((a), (position))</span></div> |
| 500 | <div class="line"><a name="l00469"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a7033bfe12670e700df8aa3a89f1c592b"> 469</a></span> <span class="preprocessor"></span><span class="preprocessor">#define TANH_OP_EXPAND(a, type, size, position) TANH_OP_EXPAND_STR(a, type, size, position)</span></div> |
| 501 | <div class="line"><a name="l00470"></a><span class="lineno"> 470</span> <span class="preprocessor"></span></div> |
| 502 | <div class="line"><a name="l00471"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ab2ab4046b57f5ca70105fc90c25a7d2d"> 471</a></span> <span class="preprocessor">#define floatx16 float16</span></div> |
| 503 | <div class="line"><a name="l00472"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a7547ee26d654afa7fd5206692a6e6625"> 472</a></span> <span class="preprocessor"></span><span class="preprocessor">#define float16_TYPE float16</span></div> |
| 504 | <div class="line"><a name="l00473"></a><span class="lineno"> 473</span> <span class="preprocessor"></span></div> |
| 505 | <div class="line"><a name="l00474"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#acad65c9300736f277c3b8419326f1413"> 474</a></span> <span class="preprocessor">#define CONVERTQ_DOWN_IMPL(in_type, out_type) \</span></div> |
| 506 | <div class="line"><a name="l00475"></a><span class="lineno"> 475</span> <span class="preprocessor"> inline out_type convert_##out_type##_##in_type(in_type a, int fixed_point_position) \</span></div> |
| 507 | <div class="line"><a name="l00476"></a><span class="lineno"> 476</span> <span class="preprocessor"> { \</span></div> |
| 508 | <div class="line"><a name="l00477"></a><span class="lineno"> 477</span> <span class="preprocessor"> return CONVERT(a * (1 << fixed_point_position) + select((in_type)-0.5, (in_type)0.5, isgreater(a, (in_type)0)), out_type); \</span></div> |
| 509 | <div class="line"><a name="l00478"></a><span class="lineno"> 478</span> <span class="preprocessor"> }</span></div> |
| 510 | <div class="line"><a name="l00479"></a><span class="lineno"> 479</span> <span class="preprocessor"></span></div> |
| 511 | <div class="line"><a name="l00480"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a1ebfbb37946a7197a2a500b1d14631be"> 480</a></span> <a class="code" href="fixed__point_8h.xhtml#acad65c9300736f277c3b8419326f1413">CONVERTQ_DOWN_IMPL</a>(float16, qs8x16)</div> |
| 512 | <div class="line"><a name="l00481"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae4b030aea69e8c3f34a373c1af8d1674"> 481</a></span> <a class="code" href="fixed__point_8h.xhtml#acad65c9300736f277c3b8419326f1413">CONVERTQ_DOWN_IMPL</a>(float16, qs16x16)</div> |
| 513 | <div class="line"><a name="l00482"></a><span class="lineno"> 482</span> </div> |
| 514 | <div class="line"><a name="l00483"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a107bff3ea73b2344cf3bc9795177f5b9"> 483</a></span> <span class="preprocessor">#define CONVERTQ_DOWN_SAT_IMPL(in_type, out_type) \</span></div> |
| 515 | <div class="line"><a name="l00484"></a><span class="lineno"> 484</span> <span class="preprocessor"> inline out_type convert_##out_type##_##in_type##_sat(in_type a, int fixed_point_position) \</span></div> |
| 516 | <div class="line"><a name="l00485"></a><span class="lineno"> 485</span> <span class="preprocessor"> { \</span></div> |
| 517 | <div class="line"><a name="l00486"></a><span class="lineno"> 486</span> <span class="preprocessor"> return CONVERT_SAT(a * (1 << fixed_point_position) + select((in_type)-0.5, (in_type)0.5, isgreater(a, (in_type)0)), out_type); \</span></div> |
| 518 | <div class="line"><a name="l00487"></a><span class="lineno"> 487</span> <span class="preprocessor"> }</span></div> |
| 519 | <div class="line"><a name="l00488"></a><span class="lineno"> 488</span> <span class="preprocessor"></span></div> |
| 520 | <div class="line"><a name="l00489"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae5d1cdcf8439f9aeb8a4337ee6497559"> 489</a></span> <a class="code" href="fixed__point_8h.xhtml#a107bff3ea73b2344cf3bc9795177f5b9">CONVERTQ_DOWN_SAT_IMPL</a>(float16, qs8x16)</div> |
| 521 | <div class="line"><a name="l00490"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ae391ff83d53deb586074fdad54f59d9b"> 490</a></span> <a class="code" href="fixed__point_8h.xhtml#a107bff3ea73b2344cf3bc9795177f5b9">CONVERTQ_DOWN_SAT_IMPL</a>(float16, qs16x16)</div> |
| 522 | <div class="line"><a name="l00491"></a><span class="lineno"> 491</span> </div> |
| 523 | <div class="line"><a name="l00492"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a91019976b3e97e493e0b00ff9e92a5d3"> 492</a></span> <span class="preprocessor">#define CONVERTQ_UP_IMPL(in_type, out_type) \</span></div> |
| 524 | <div class="line"><a name="l00493"></a><span class="lineno"> 493</span> <span class="preprocessor"> inline out_type convert_##out_type##_##in_type(in_type a, int fixed_point_position) \</span></div> |
| 525 | <div class="line"><a name="l00494"></a><span class="lineno"> 494</span> <span class="preprocessor"> { \</span></div> |
| 526 | <div class="line"><a name="l00495"></a><span class="lineno"> 495</span> <span class="preprocessor"> return CONVERT(a, out_type) / (1 << fixed_point_position); \</span></div> |
| 527 | <div class="line"><a name="l00496"></a><span class="lineno"> 496</span> <span class="preprocessor"> }</span></div> |
| 528 | <div class="line"><a name="l00497"></a><span class="lineno"> 497</span> <span class="preprocessor"></span></div> |
| 529 | <div class="line"><a name="l00498"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a29e1c935f8ce7d7b3b7125a2bac6fb59"> 498</a></span> <a class="code" href="fixed__point_8h.xhtml#a91019976b3e97e493e0b00ff9e92a5d3">CONVERTQ_UP_IMPL</a>(qs8x16, float16)</div> |
| 530 | <div class="line"><a name="l00499"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a4dc52ccd303ac120e2940b30b525301d"> 499</a></span> <a class="code" href="fixed__point_8h.xhtml#a91019976b3e97e493e0b00ff9e92a5d3">CONVERTQ_UP_IMPL</a>(qs16x16, float16)</div> |
| 531 | <div class="line"><a name="l00500"></a><span class="lineno"> 500</span> </div> |
| 532 | <div class="line"><a name="l00501"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a740b5b51d0e06dae628961d373d6c359"> 501</a></span> <span class="preprocessor">#define SQCVT_SAT_IMPL(type) \</span></div> |
| 533 | <div class="line"><a name="l00502"></a><span class="lineno"> 502</span> <span class="preprocessor"> inline type sqcvt_##type##_sat(float a, int fixed_point_position) \</span></div> |
| 534 | <div class="line"><a name="l00503"></a><span class="lineno"> 503</span> <span class="preprocessor"> { \</span></div> |
| 535 | <div class="line"><a name="l00504"></a><span class="lineno"> 504</span> <span class="preprocessor"> return CONVERT_SAT((a * (1 << fixed_point_position) + ((a < 0) ? -0.5f : 0.5f)), type); \</span></div> |
| 536 | <div class="line"><a name="l00505"></a><span class="lineno"> 505</span> <span class="preprocessor"> }</span></div> |
| 537 | <div class="line"><a name="l00506"></a><span class="lineno"> 506</span> <span class="preprocessor"></span></div> |
| 538 | <div class="line"><a name="l00507"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a27b4e171bdfd66f52824f5812c9fa522"> 507</a></span> <a class="code" href="fixed__point_8h.xhtml#a740b5b51d0e06dae628961d373d6c359">SQCVT_SAT_IMPL</a>(qs8)</div> |
| 539 | <div class="line"><a name="l00508"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#ac1d0a82fd450972cab8a7c85217e4441"> 508</a></span> <a class="code" href="fixed__point_8h.xhtml#a740b5b51d0e06dae628961d373d6c359">SQCVT_SAT_IMPL</a>(qs16)</div> |
| 540 | <div class="line"><a name="l00509"></a><span class="lineno"> 509</span> </div> |
| 541 | <div class="line"><a name="l00510"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#aa9f86d33cbbf40f33fe1074913ae30d1"> 510</a></span> <span class="preprocessor">#define SQCVT_SAT_OP_EXPAND_STR(a, type, position) sqcvt_##type##_sat((a), (position))</span></div> |
| 542 | <div class="line"><a name="l00511"></a><span class="lineno"><a class="line" href="fixed__point_8h.xhtml#a40c89e1f1f54dd72fc533c9aafdee12e"> 511</a></span> <span class="preprocessor"></span><span class="preprocessor">#define SQCVT_SAT_OP_EXPAND(a, type, position) SQCVT_SAT_OP_EXPAND_STR((a), type, position)</span></div> |
| 543 | <div class="line"><a name="l00512"></a><span class="lineno"> 512</span> <span class="preprocessor"></span></div> |
| 544 | <div class="line"><a name="l00513"></a><span class="lineno"> 513</span> <span class="preprocessor">#endif // ARM_COMPUTE_FIXED_POINT_H</span></div> |
| 545 | <div class="ttc" id="fixed__point_8h_xhtml_a2258d987499bd7c92db2c90977fd2409"><div class="ttname"><a href="fixed__point_8h.xhtml#a2258d987499bd7c92db2c90977fd2409">MLALQ_SAT_IMPL</a></div><div class="ttdeci">#define MLALQ_SAT_IMPL(type, itype)</div><div class="ttdoc">Saturate multiply-accumulate long. </div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00288">fixed_point.h:288</a></div></div> |
| 546 | <div class="ttc" id="fixed__point_8h_xhtml_a8900371ff8da316eea9c61c993043ca5"><div class="ttname"><a href="fixed__point_8h.xhtml#a8900371ff8da316eea9c61c993043ca5">MULQ_IMPL</a></div><div class="ttdeci">#define MULQ_IMPL(type, itype)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00213">fixed_point.h:213</a></div></div> |
| 547 | <div class="ttc" id="fixed__point_8h_xhtml_a5e34d3e41af677765369d33a3871d95f"><div class="ttname"><a href="fixed__point_8h.xhtml#a5e34d3e41af677765369d33a3871d95f">qs16x4</a></div><div class="ttdeci">short4 qs16x4</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00037">fixed_point.h:37</a></div></div> |
| 548 | <div class="ttc" id="fixed__point_8h_xhtml_acad65c9300736f277c3b8419326f1413"><div class="ttname"><a href="fixed__point_8h.xhtml#acad65c9300736f277c3b8419326f1413">CONVERTQ_DOWN_IMPL</a></div><div class="ttdeci">#define CONVERTQ_DOWN_IMPL(in_type, out_type)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00474">fixed_point.h:474</a></div></div> |
| 549 | <div class="ttc" id="fixed__point_8h_xhtml_ae64808afdc06c77889f1bb0565905949"><div class="ttname"><a href="fixed__point_8h.xhtml#ae64808afdc06c77889f1bb0565905949">EXPQ_IMPL</a></div><div class="ttdeci">#define EXPQ_IMPL(stype, type, size)</div><div class="ttdoc">Saturate exponential of a fixed point vector. </div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00341">fixed_point.h:341</a></div></div> |
| 550 | <div class="ttc" id="fixed__point_8h_xhtml_a3b12b782d796ddcf0cd8f8b265be033e"><div class="ttname"><a href="fixed__point_8h.xhtml#a3b12b782d796ddcf0cd8f8b265be033e">qs8x3</a></div><div class="ttdeci">char3 qs8x3</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00036">fixed_point.h:36</a></div></div> |
| 551 | <div class="ttc" id="fixed__point_8h_xhtml_a902ecdf01fd8a0760e4ef66ce5814a20"><div class="ttname"><a href="fixed__point_8h.xhtml#a902ecdf01fd8a0760e4ef66ce5814a20">LOGQ_IMPL</a></div><div class="ttdeci">#define LOGQ_IMPL(stype, type, size)</div><div class="ttdoc">Saturate logarithm of a fixed point vector. </div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00379">fixed_point.h:379</a></div></div> |
| 552 | <div class="ttc" id="fixed__point_8h_xhtml_a10dfbf9412b518cd160133b68e2da8fd"><div class="ttname"><a href="fixed__point_8h.xhtml#a10dfbf9412b518cd160133b68e2da8fd">qs8x4</a></div><div class="ttdeci">char4 qs8x4</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00036">fixed_point.h:36</a></div></div> |
| 553 | <div class="ttc" id="fixed__point_8h_xhtml_ad2ad548e04bfbba48bf75e29c9699182"><div class="ttname"><a href="fixed__point_8h.xhtml#ad2ad548e04bfbba48bf75e29c9699182">ADDQ_SAT_IMPL</a></div><div class="ttdeci">#define ADDQ_SAT_IMPL(type)</div><div class="ttdoc">Computes saturated addition of fixed point types. </div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00155">fixed_point.h:155</a></div></div> |
| 554 | <div class="ttc" id="fixed__point_8h_xhtml_aab72e548e91d1bac44d0a8503dfa12e7"><div class="ttname"><a href="fixed__point_8h.xhtml#aab72e548e91d1bac44d0a8503dfa12e7">qs16x1</a></div><div class="ttdeci">short qs16x1</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00037">fixed_point.h:37</a></div></div> |
| 555 | <div class="ttc" id="fixed__point_8h_xhtml_a513b425c3ee001dddfdde427947ccf00"><div class="ttname"><a href="fixed__point_8h.xhtml#a513b425c3ee001dddfdde427947ccf00">qs32x1</a></div><div class="ttdeci">int qs32x1</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00038">fixed_point.h:38</a></div></div> |
| 556 | <div class="ttc" id="fixed__point_8h_xhtml_a26a8ca855cd14b1867173d301baf6c4f"><div class="ttname"><a href="fixed__point_8h.xhtml#a26a8ca855cd14b1867173d301baf6c4f">qs16</a></div><div class="ttdeci">short qs16</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00037">fixed_point.h:37</a></div></div> |
| 557 | <div class="ttc" id="fixed__point_8h_xhtml_a31a4619a484c58adcd6e7a9a8354cf23"><div class="ttname"><a href="fixed__point_8h.xhtml#a31a4619a484c58adcd6e7a9a8354cf23">MLAQ_SAT_IMPL</a></div><div class="ttdeci">#define MLAQ_SAT_IMPL(type, itype)</div><div class="ttdoc">Saturate multiply-accumulate. </div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00267">fixed_point.h:267</a></div></div> |
| 558 | <div class="ttc" id="fixed__point_8h_xhtml_a3ab174b05a269317ec18680b5c781a04"><div class="ttname"><a href="fixed__point_8h.xhtml#a3ab174b05a269317ec18680b5c781a04">qs8x2</a></div><div class="ttdeci">char2 qs8x2</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00036">fixed_point.h:36</a></div></div> |
| 559 | <div class="ttc" id="fixed__point_8h_xhtml_a21e1c22d1a3f0110ceb0ef48c6dddb86"><div class="ttname"><a href="fixed__point_8h.xhtml#a21e1c22d1a3f0110ceb0ef48c6dddb86">MAXQ_IMPL</a></div><div class="ttdeci">#define MAXQ_IMPL(type)</div><div class="ttdoc">Computes max of fixed point types. </div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00129">fixed_point.h:129</a></div></div> |
| 560 | <div class="ttc" id="fixed__point_8h_xhtml_a96d48f67de90aaed492da7fb7a006b94"><div class="ttname"><a href="fixed__point_8h.xhtml#a96d48f67de90aaed492da7fb7a006b94">qs8</a></div><div class="ttdeci">char qs8</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00036">fixed_point.h:36</a></div></div> |
| 561 | <div class="ttc" id="fixed__point_8h_xhtml_a8115de4a1860a9bf15e13f4ebfdb707f"><div class="ttname"><a href="fixed__point_8h.xhtml#a8115de4a1860a9bf15e13f4ebfdb707f">qs32</a></div><div class="ttdeci">int qs32</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00038">fixed_point.h:38</a></div></div> |
| 562 | <div class="ttc" id="fixed__point_8h_xhtml_a16a82528f3e1c6eb81fd9aac6ad45e62"><div class="ttname"><a href="fixed__point_8h.xhtml#a16a82528f3e1c6eb81fd9aac6ad45e62">qs16x16</a></div><div class="ttdeci">short16 qs16x16</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00037">fixed_point.h:37</a></div></div> |
| 563 | <div class="ttc" id="fixed__point_8h_xhtml_aac0b47414a86d32e5c891ab6a75b313b"><div class="ttname"><a href="fixed__point_8h.xhtml#aac0b47414a86d32e5c891ab6a75b313b">DIVQ_SAT_IMPL</a></div><div class="ttdeci">#define DIVQ_SAT_IMPL(stype, type, itype)</div><div class="ttdoc">Saturate division of two fixed point vectors. </div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00309">fixed_point.h:309</a></div></div> |
| 564 | <div class="ttc" id="fixed__point_8h_xhtml_a7e505a06809f9ab428dd0ba9be1ea35e"><div class="ttname"><a href="fixed__point_8h.xhtml#a7e505a06809f9ab428dd0ba9be1ea35e">qs32x16</a></div><div class="ttdeci">int16 qs32x16</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00038">fixed_point.h:38</a></div></div> |
| 565 | <div class="ttc" id="fixed__point_8h_xhtml_a1acc7badafd7def20af187c5b5bfdec2"><div class="ttname"><a href="fixed__point_8h.xhtml#a1acc7badafd7def20af187c5b5bfdec2">ABSQ_SAT_IMPL</a></div><div class="ttdeci">#define ABSQ_SAT_IMPL(type)</div><div class="ttdoc">Computes saturating absolute value of fixed point vector. </div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00111">fixed_point.h:111</a></div></div> |
| 566 | <div class="ttc" id="fixed__point_8h_xhtml_a341448197978a201091ddc00ea22f9e9"><div class="ttname"><a href="fixed__point_8h.xhtml#a341448197978a201091ddc00ea22f9e9">TANHQ_IMPL</a></div><div class="ttdeci">#define TANHQ_IMPL(stype, type, size)</div><div class="ttdoc">Saturate hyperbolic tangent of a fixed point vector. </div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00454">fixed_point.h:454</a></div></div> |
| 567 | <div class="ttc" id="fixed__point_8h_xhtml_a39d116772b1400e82b2ab12de00909b0"><div class="ttname"><a href="fixed__point_8h.xhtml#a39d116772b1400e82b2ab12de00909b0">qs16x3</a></div><div class="ttdeci">short3 qs16x3</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00037">fixed_point.h:37</a></div></div> |
| 568 | <div class="ttc" id="fixed__point_8h_xhtml_ae1ac323de0ecd37f54553c25092d2ba4"><div class="ttname"><a href="fixed__point_8h.xhtml#ae1ac323de0ecd37f54553c25092d2ba4">TYPE_ALIAS</a></div><div class="ttdeci">#define TYPE_ALIAS(type, alias)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00027">fixed_point.h:27</a></div></div> |
| 569 | <div class="ttc" id="fixed__point_8h_xhtml_a329eb419d445e448ec885a2f69a1fb0f"><div class="ttname"><a href="fixed__point_8h.xhtml#a329eb419d445e448ec885a2f69a1fb0f">MULQ_SAT_IMPL</a></div><div class="ttdeci">#define MULQ_SAT_IMPL(type, itype)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00236">fixed_point.h:236</a></div></div> |
| 570 | <div class="ttc" id="fixed__point_8h_xhtml_a740b5b51d0e06dae628961d373d6c359"><div class="ttname"><a href="fixed__point_8h.xhtml#a740b5b51d0e06dae628961d373d6c359">SQCVT_SAT_IMPL</a></div><div class="ttdeci">#define SQCVT_SAT_IMPL(type)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00501">fixed_point.h:501</a></div></div> |
| 571 | <div class="ttc" id="fixed__point_8h_xhtml_ad7f60c2ef8f8b80da7fd81570db06d4a"><div class="ttname"><a href="fixed__point_8h.xhtml#ad7f60c2ef8f8b80da7fd81570db06d4a">qs16x8</a></div><div class="ttdeci">short8 qs16x8</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00037">fixed_point.h:37</a></div></div> |
| 572 | <div class="ttc" id="fixed__point_8h_xhtml_abf77757e07132c678f7146c860e80fe1"><div class="ttname"><a href="fixed__point_8h.xhtml#abf77757e07132c678f7146c860e80fe1">qs32x3</a></div><div class="ttdeci">int3 qs32x3</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00038">fixed_point.h:38</a></div></div> |
| 573 | <div class="ttc" id="fixed__point_8h_xhtml_ab555884d2db3be32fc693f670d8a99c7"><div class="ttname"><a href="fixed__point_8h.xhtml#ab555884d2db3be32fc693f670d8a99c7">SUBQ_SAT_IMPL</a></div><div class="ttdeci">#define SUBQ_SAT_IMPL(type)</div><div class="ttdoc">Computes saturated subtraction of fixed point types. </div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00186">fixed_point.h:186</a></div></div> |
| 574 | <div class="ttc" id="fixed__point_8h_xhtml_a91019976b3e97e493e0b00ff9e92a5d3"><div class="ttname"><a href="fixed__point_8h.xhtml#a91019976b3e97e493e0b00ff9e92a5d3">CONVERTQ_UP_IMPL</a></div><div class="ttdeci">#define CONVERTQ_UP_IMPL(in_type, out_type)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00492">fixed_point.h:492</a></div></div> |
| 575 | <div class="ttc" id="fixed__point_8h_xhtml_a107bff3ea73b2344cf3bc9795177f5b9"><div class="ttname"><a href="fixed__point_8h.xhtml#a107bff3ea73b2344cf3bc9795177f5b9">CONVERTQ_DOWN_SAT_IMPL</a></div><div class="ttdeci">#define CONVERTQ_DOWN_SAT_IMPL(in_type, out_type)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00483">fixed_point.h:483</a></div></div> |
| 576 | <div class="ttc" id="fixed__point_8h_xhtml_ac120446f465238102c2ba0a23ae4aa47"><div class="ttname"><a href="fixed__point_8h.xhtml#ac120446f465238102c2ba0a23ae4aa47">qs16x2</a></div><div class="ttdeci">short2 qs16x2</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00037">fixed_point.h:37</a></div></div> |
| 577 | <div class="ttc" id="fixed__point_8h_xhtml_addf730860de5f7752f0c85a385088e96"><div class="ttname"><a href="fixed__point_8h.xhtml#addf730860de5f7752f0c85a385088e96">qs32x2</a></div><div class="ttdeci">int2 qs32x2</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00038">fixed_point.h:38</a></div></div> |
| 578 | <div class="ttc" id="fixed__point_8h_xhtml_af8a54f984958bddf4f24cd95867a82f5"><div class="ttname"><a href="fixed__point_8h.xhtml#af8a54f984958bddf4f24cd95867a82f5">qs32x8</a></div><div class="ttdeci">int8 qs32x8</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00038">fixed_point.h:38</a></div></div> |
| 579 | <div class="ttc" id="fixed__point_8h_xhtml_a39fff507525792a262467c3e145bb181"><div class="ttname"><a href="fixed__point_8h.xhtml#a39fff507525792a262467c3e145bb181">INVSQRTQ_IMPL</a></div><div class="ttdeci">#define INVSQRTQ_IMPL(stype, type, size)</div><div class="ttdoc">Saturate inverse square root of a fixed point vector. </div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00417">fixed_point.h:417</a></div></div> |
| 580 | <div class="ttc" id="fixed__point_8h_xhtml_a8362e532b9c16e2367f9102963b6336a"><div class="ttname"><a href="fixed__point_8h.xhtml#a8362e532b9c16e2367f9102963b6336a">qs8x8</a></div><div class="ttdeci">char8 qs8x8</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00036">fixed_point.h:36</a></div></div> |
| 581 | <div class="ttc" id="fixed__point_8h_xhtml_a5a2cc1a836612185f0378de9e7159e27"><div class="ttname"><a href="fixed__point_8h.xhtml#a5a2cc1a836612185f0378de9e7159e27">qs8x16</a></div><div class="ttdeci">char16 qs8x16</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00036">fixed_point.h:36</a></div></div> |
| 582 | <div class="ttc" id="fixed__point_8h_xhtml_a230d9b32261264756a0d3d4971964753"><div class="ttname"><a href="fixed__point_8h.xhtml#a230d9b32261264756a0d3d4971964753">qs8x1</a></div><div class="ttdeci">char qs8x1</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00036">fixed_point.h:36</a></div></div> |
| 583 | <div class="ttc" id="fixed__point_8h_xhtml_a3df1d8363c18bb92b3451d41c6bfc891"><div class="ttname"><a href="fixed__point_8h.xhtml#a3df1d8363c18bb92b3451d41c6bfc891">qs32x4</a></div><div class="ttdeci">int4 qs32x4</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00038">fixed_point.h:38</a></div></div> |
| 584 | </div><!-- fragment --></div><!-- contents --> |
| 585 | </div><!-- doc-content --> |
| 586 | <!-- start footer part --> |
| 587 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 588 | <ul> |
| 589 | <li class="navelem"><a class="el" href="dir_55b5a5006e943fb664ff8cff3cfe7768.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_f6c3ae42d7e27145d0a3c3e38ca1c000.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_1b7ae9123c88e650426d50d95c19d414.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_b7c3d80b0dadb2139bc73b7161751c12.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="fixed__point_8h.xhtml">fixed_point.h</a></li> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame] | 590 | <li class="footer">Generated on Thu Oct 12 2017 14:26:33 for Compute Library by |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 591 | <a href="http://www.doxygen.org/index.html"> |
| 592 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li> |
| 593 | </ul> |
| 594 | </div> |
| 595 | </body> |
| 596 | </html> |