blob: 2224ab0fe2fe119c5a2a31bd5fbe9d41302364d9 [file] [log] [blame]
Jenkins514be652019-02-28 12:25:18 +00001<!-- HTML header for doxygen 1.8.15-->
2<!-- Remember to use version doxygen 1.8.15 +-->
Jenkinsb9abeae2018-11-22 11:58:08 +00003<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml">
5<head>
6<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
7<meta http-equiv="X-UA-Compatible" content="IE=9"/>
Jenkins514be652019-02-28 12:25:18 +00008<meta name="generator" content="Doxygen 1.8.15"/>
Jenkinsb9abeae2018-11-22 11:58:08 +00009<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
10<title>Compute Library: src/core/CL/cl_kernels/warp_helpers_quantized.h File Reference</title>
11<link href="tabs.css" rel="stylesheet" type="text/css"/>
12<script type="text/javascript" src="jquery.js"></script>
13<script type="text/javascript" src="dynsections.js"></script>
14<link href="navtree.css" rel="stylesheet" type="text/css"/>
15<script type="text/javascript" src="resize.js"></script>
16<script type="text/javascript" src="navtreedata.js"></script>
17<script type="text/javascript" src="navtree.js"></script>
18<script type="text/javascript">
Jenkins514be652019-02-28 12:25:18 +000019/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
Jenkinsb9abeae2018-11-22 11:58:08 +000020 $(document).ready(initResizable);
Jenkins514be652019-02-28 12:25:18 +000021/* @license-end */</script>
Jenkinsb9abeae2018-11-22 11:58:08 +000022<link href="search/search.css" rel="stylesheet" type="text/css"/>
23<script type="text/javascript" src="search/searchdata.js"></script>
24<script type="text/javascript" src="search/search.js"></script>
25<script type="text/x-mathjax-config">
26 MathJax.Hub.Config({
27 extensions: ["tex2jax.js"],
28 jax: ["input/TeX","output/HTML-CSS"],
29});
Jenkins514be652019-02-28 12:25:18 +000030</script><script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Jenkinsb9abeae2018-11-22 11:58:08 +000031<link href="doxygen.css" rel="stylesheet" type="text/css" />
Jenkins514be652019-02-28 12:25:18 +000032<link href="stylesheet.css" rel="stylesheet" type="text/css"/>
Jenkinsb9abeae2018-11-22 11:58:08 +000033</head>
34<body>
35<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
36<div id="titlearea">
37<table cellspacing="0" cellpadding="0">
38 <tbody>
39 <tr style="height: 56px;">
Jenkins514be652019-02-28 12:25:18 +000040 <img alt="Compute Library" src="https://raw.githubusercontent.com/ARM-software/ComputeLibrary/gh-pages/ACL_logo.png" style="max-width: 100%;margin-top: 15px;margin-left: 10px"/>
Jenkinsb9abeae2018-11-22 11:58:08 +000041 <td style="padding-left: 0.5em;">
Jenkins514be652019-02-28 12:25:18 +000042 <div id="projectname">
Jenkins7f09cf72020-01-22 18:08:16 +000043 &#160;<span id="projectnumber">19.11.1</span>
Jenkinsb9abeae2018-11-22 11:58:08 +000044 </div>
45 </td>
46 </tr>
47 </tbody>
48</table>
49</div>
50<!-- end header part -->
Jenkins514be652019-02-28 12:25:18 +000051<!-- Generated by Doxygen 1.8.15 -->
Jenkinsb9abeae2018-11-22 11:58:08 +000052<script type="text/javascript">
Jenkins514be652019-02-28 12:25:18 +000053/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
Jenkinsb9abeae2018-11-22 11:58:08 +000054var searchBox = new SearchBox("searchBox", "search",false,'Search');
Jenkins514be652019-02-28 12:25:18 +000055/* @license-end */
Jenkinsb9abeae2018-11-22 11:58:08 +000056</script>
57<script type="text/javascript" src="menudata.js"></script>
58<script type="text/javascript" src="menu.js"></script>
59<script type="text/javascript">
Jenkins514be652019-02-28 12:25:18 +000060/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
Jenkinsb9abeae2018-11-22 11:58:08 +000061$(function() {
62 initMenu('',true,false,'search.php','Search');
63 $(document).ready(function() { init_search(); });
64});
Jenkins514be652019-02-28 12:25:18 +000065/* @license-end */</script>
Jenkinsb9abeae2018-11-22 11:58:08 +000066<div id="main-nav"></div>
67</div><!-- top -->
68<div id="side-nav" class="ui-resizable side-nav-resizable">
69 <div id="nav-tree">
70 <div id="nav-tree-contents">
71 <div id="nav-sync" class="sync"></div>
72 </div>
73 </div>
74 <div id="splitbar" style="-moz-user-select:none;"
75 class="ui-resizable-handle">
76 </div>
77</div>
78<script type="text/javascript">
Jenkins514be652019-02-28 12:25:18 +000079/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
Jenkinsb9abeae2018-11-22 11:58:08 +000080$(document).ready(function(){initNavTree('warp__helpers__quantized_8h.xhtml','');});
Jenkins514be652019-02-28 12:25:18 +000081/* @license-end */
Jenkinsb9abeae2018-11-22 11:58:08 +000082</script>
83<div id="doc-content">
84<!-- window showing the filter options -->
85<div id="MSearchSelectWindow"
86 onmouseover="return searchBox.OnSearchSelectShow()"
87 onmouseout="return searchBox.OnSearchSelectHide()"
88 onkeydown="return searchBox.OnSearchSelectKey(event)">
89</div>
90
91<!-- iframe showing the search results (closed by default) -->
92<div id="MSearchResultsWindow">
93<iframe src="javascript:void(0)" frameborder="0"
94 name="MSearchResults" id="MSearchResults">
95</iframe>
96</div>
97
98<div class="header">
99 <div class="summary">
100<a href="#func-members">Functions</a> </div>
101 <div class="headertitle">
102<div class="title">warp_helpers_quantized.h File Reference</div> </div>
103</div><!--header-->
104<div class="contents">
105<div class="textblock"><code>#include &quot;<a class="el" href="helpers__asymm_8h_source.xhtml">helpers_asymm.h</a>&quot;</code><br />
106</div>
107<p><a href="warp__helpers__quantized_8h_source.xhtml">Go to the source code of this file.</a></p>
108<table class="memberdecls">
109<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
110Functions</h2></td></tr>
111<tr class="memitem:aafa351a2c35f5f121921cee080c223d6"><td class="memItemLeft" align="right" valign="top">const float8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="warp__helpers__quantized_8h.xhtml#aafa351a2c35f5f121921cee080c223d6">clamp_to_border_with_size_quantized</a> (float8 coords, const float width, const float height, const float border_size)</td></tr>
112<tr class="memdesc:aafa351a2c35f5f121921cee080c223d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clamps the given coordinates to the borders according to the border size. <a href="#aafa351a2c35f5f121921cee080c223d6">More...</a><br /></td></tr>
113<tr class="separator:aafa351a2c35f5f121921cee080c223d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
114<tr class="memitem:a33c81135c18bd3881c3f5f36c25fe499"><td class="memItemLeft" align="right" valign="top">const float8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="warp__helpers__quantized_8h.xhtml#a33c81135c18bd3881c3f5f36c25fe499">clamp_to_border_quantized</a> (float8 coords, const float width, const float height)</td></tr>
115<tr class="memdesc:a33c81135c18bd3881c3f5f36c25fe499"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clamps the given coordinates to the borders. <a href="#a33c81135c18bd3881c3f5f36c25fe499">More...</a><br /></td></tr>
116<tr class="separator:a33c81135c18bd3881c3f5f36c25fe499"><td class="memSeparator" colspan="2">&#160;</td></tr>
117<tr class="memitem:ac05d99f194a7cf429a7ecbadd1ffb018"><td class="memItemLeft" align="right" valign="top">const float8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="warp__helpers__quantized_8h.xhtml#ac05d99f194a7cf429a7ecbadd1ffb018">get_neighbour_coords_quantized</a> (const float2 coord)</td></tr>
118<tr class="memdesc:ac05d99f194a7cf429a7ecbadd1ffb018"><td class="mdescLeft">&#160;</td><td class="mdescRight">Given a texel coordinates this function will return the following array of coordinates: [ P, right neighbour, below neighbour, below right neighbour ]. <a href="#ac05d99f194a7cf429a7ecbadd1ffb018">More...</a><br /></td></tr>
119<tr class="separator:ac05d99f194a7cf429a7ecbadd1ffb018"><td class="memSeparator" colspan="2">&#160;</td></tr>
120<tr class="memitem:aa13de3eff8afd51e8bf4c1904a9b7415"><td class="memItemLeft" align="right" valign="top">const float2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="warp__helpers__quantized_8h.xhtml#aa13de3eff8afd51e8bf4c1904a9b7415">get_current_coords_quantized</a> ()</td></tr>
121<tr class="memdesc:aa13de3eff8afd51e8bf4c1904a9b7415"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the current thread coordinates. <a href="#aa13de3eff8afd51e8bf4c1904a9b7415">More...</a><br /></td></tr>
122<tr class="separator:aa13de3eff8afd51e8bf4c1904a9b7415"><td class="memSeparator" colspan="2">&#160;</td></tr>
123<tr class="memitem:ae8a3d61874f95580e8110f4f206c3b8b"><td class="memItemLeft" align="right" valign="top">const DATA_TYPE4&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="warp__helpers__quantized_8h.xhtml#ae8a3d61874f95580e8110f4f206c3b8b">bilinear_interpolate_with_border_quantized</a> (const <a class="el" href="struct_image.xhtml">Image</a> *in, const float8 coords, const float width, const float height, const float border_size, const float scale, const int offset_qasymm)</td></tr>
124<tr class="memdesc:ae8a3d61874f95580e8110f4f206c3b8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the values. <a href="#ae8a3d61874f95580e8110f4f206c3b8b">More...</a><br /></td></tr>
125<tr class="separator:ae8a3d61874f95580e8110f4f206c3b8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
126<tr class="memitem:ac2c57ad5c97b24360457a028a8e7e58c"><td class="memItemLeft" align="right" valign="top">const DATA_TYPE4&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="warp__helpers__quantized_8h.xhtml#ac2c57ad5c97b24360457a028a8e7e58c">bilinear_interpolate_quantized</a> (const <a class="el" href="struct_image.xhtml">Image</a> *in, const float8 coords, const float width, const float height, const float scale, const int offset_qasymm)</td></tr>
127<tr class="memdesc:ac2c57ad5c97b24360457a028a8e7e58c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the values. <a href="#ac2c57ad5c97b24360457a028a8e7e58c">More...</a><br /></td></tr>
128<tr class="separator:ac2c57ad5c97b24360457a028a8e7e58c"><td class="memSeparator" colspan="2">&#160;</td></tr>
129</table>
130<h2 class="groupheader">Function Documentation</h2>
131<a id="ac2c57ad5c97b24360457a028a8e7e58c"></a>
132<h2 class="memtitle"><span class="permalink"><a href="#ac2c57ad5c97b24360457a028a8e7e58c">&#9670;&nbsp;</a></span>bilinear_interpolate_quantized()</h2>
133
134<div class="memitem">
135<div class="memproto">
136<table class="mlabels">
137 <tr>
138 <td class="mlabels-left">
139 <table class="memname">
140 <tr>
141 <td class="memname">const DATA_TYPE4 bilinear_interpolate_quantized </td>
142 <td>(</td>
143 <td class="paramtype">const <a class="el" href="struct_image.xhtml">Image</a> *&#160;</td>
144 <td class="paramname"><em>in</em>, </td>
145 </tr>
146 <tr>
147 <td class="paramkey"></td>
148 <td></td>
149 <td class="paramtype">const float8&#160;</td>
150 <td class="paramname"><em>coords</em>, </td>
151 </tr>
152 <tr>
153 <td class="paramkey"></td>
154 <td></td>
155 <td class="paramtype">const float&#160;</td>
156 <td class="paramname"><em>width</em>, </td>
157 </tr>
158 <tr>
159 <td class="paramkey"></td>
160 <td></td>
161 <td class="paramtype">const float&#160;</td>
162 <td class="paramname"><em>height</em>, </td>
163 </tr>
164 <tr>
165 <td class="paramkey"></td>
166 <td></td>
167 <td class="paramtype">const float&#160;</td>
168 <td class="paramname"><em>scale</em>, </td>
169 </tr>
170 <tr>
171 <td class="paramkey"></td>
172 <td></td>
173 <td class="paramtype">const int&#160;</td>
174 <td class="paramname"><em>offset_qasymm</em>&#160;</td>
175 </tr>
176 <tr>
177 <td></td>
178 <td>)</td>
179 <td></td><td></td>
180 </tr>
181 </table>
182 </td>
183 <td class="mlabels-right">
184<span class="mlabels"><span class="mlabel">inline</span></span> </td>
185 </tr>
186</table>
187</div><div class="memdoc">
188
189<p>Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the values. </p>
190<dl class="params"><dt>Parameters</dt><dd>
191 <table class="params">
192 <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Pointer to the source image. </td></tr>
Jenkins514be652019-02-28 12:25:18 +0000193 <tr><td class="paramdir">[in]</td><td class="paramname">coords</td><td><a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information.">Vector</a> of four 2D coordinates. Even pos is x and odd y. </td></tr>
Jenkinsb9abeae2018-11-22 11:58:08 +0000194 <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the image </td></tr>
195 <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the image </td></tr>
196 <tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>Scale value </td></tr>
197 <tr><td class="paramdir">[in]</td><td class="paramname">offset_qasymm</td><td>Offset value </td></tr>
198 </table>
199 </dd>
200</dl>
201
202<p class="definition">Definition at line <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00135">135</a> of file <a class="el" href="warp__helpers__quantized_8h_source.xhtml">warp_helpers_quantized.h</a>.</p>
Jenkinsb9abeae2018-11-22 11:58:08 +0000203<div class="fragment"><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;{</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keywordflow">return</span> <a class="code" href="warp__helpers__quantized_8h.xhtml#ae8a3d61874f95580e8110f4f206c3b8b">bilinear_interpolate_with_border_quantized</a>(in, coords, width, height, 1, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acec6d8ad52a28972fa74e071c1a63b6a">scale</a>, offset_qasymm);</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;}</div><div class="ttc" id="warp__helpers__quantized_8h_xhtml_ae8a3d61874f95580e8110f4f206c3b8b"><div class="ttname"><a href="warp__helpers__quantized_8h.xhtml#ae8a3d61874f95580e8110f4f206c3b8b">bilinear_interpolate_with_border_quantized</a></div><div class="ttdeci">const DATA_TYPE4 bilinear_interpolate_with_border_quantized(const Image *in, const float8 coords, const float width, const float height, const float border_size, const float scale, const int offset_qasymm)</div><div class="ttdoc">Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the ...</div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers__quantized_8h_source.xhtml#l00084">warp_helpers_quantized.h:84</a></div></div>
Jenkins975dfe12019-09-02 11:47:54 +0100204<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acec6d8ad52a28972fa74e071c1a63b6a"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acec6d8ad52a28972fa74e071c1a63b6a">arm_compute::test::validation::scale</a></div><div class="ttdeci">scale</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_pixel_wise_multiplication_8cpp_source.xhtml#l00317">PixelWiseMultiplication.cpp:317</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000205</div><!-- fragment -->
Jenkins975dfe12019-09-02 11:47:54 +0100206<p class="reference">References <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00084">bilinear_interpolate_with_border_quantized()</a>, and <a class="el" href="_n_e_o_n_2_pixel_wise_multiplication_8cpp_source.xhtml#l00317">arm_compute::test::validation::scale</a>.</p>
Jenkins514be652019-02-28 12:25:18 +0000207
Jenkinsb9abeae2018-11-22 11:58:08 +0000208</div>
209</div>
210<a id="ae8a3d61874f95580e8110f4f206c3b8b"></a>
211<h2 class="memtitle"><span class="permalink"><a href="#ae8a3d61874f95580e8110f4f206c3b8b">&#9670;&nbsp;</a></span>bilinear_interpolate_with_border_quantized()</h2>
212
213<div class="memitem">
214<div class="memproto">
215<table class="mlabels">
216 <tr>
217 <td class="mlabels-left">
218 <table class="memname">
219 <tr>
220 <td class="memname">const DATA_TYPE4 bilinear_interpolate_with_border_quantized </td>
221 <td>(</td>
222 <td class="paramtype">const <a class="el" href="struct_image.xhtml">Image</a> *&#160;</td>
223 <td class="paramname"><em>in</em>, </td>
224 </tr>
225 <tr>
226 <td class="paramkey"></td>
227 <td></td>
228 <td class="paramtype">const float8&#160;</td>
229 <td class="paramname"><em>coords</em>, </td>
230 </tr>
231 <tr>
232 <td class="paramkey"></td>
233 <td></td>
234 <td class="paramtype">const float&#160;</td>
235 <td class="paramname"><em>width</em>, </td>
236 </tr>
237 <tr>
238 <td class="paramkey"></td>
239 <td></td>
240 <td class="paramtype">const float&#160;</td>
241 <td class="paramname"><em>height</em>, </td>
242 </tr>
243 <tr>
244 <td class="paramkey"></td>
245 <td></td>
246 <td class="paramtype">const float&#160;</td>
247 <td class="paramname"><em>border_size</em>, </td>
248 </tr>
249 <tr>
250 <td class="paramkey"></td>
251 <td></td>
252 <td class="paramtype">const float&#160;</td>
253 <td class="paramname"><em>scale</em>, </td>
254 </tr>
255 <tr>
256 <td class="paramkey"></td>
257 <td></td>
258 <td class="paramtype">const int&#160;</td>
259 <td class="paramname"><em>offset_qasymm</em>&#160;</td>
260 </tr>
261 <tr>
262 <td></td>
263 <td>)</td>
264 <td></td><td></td>
265 </tr>
266 </table>
267 </td>
268 <td class="mlabels-right">
269<span class="mlabels"><span class="mlabel">inline</span></span> </td>
270 </tr>
271</table>
272</div><div class="memdoc">
273
274<p>Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the values. </p>
275<dl class="params"><dt>Parameters</dt><dd>
276 <table class="params">
277 <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Pointer to the source image. </td></tr>
Jenkins514be652019-02-28 12:25:18 +0000278 <tr><td class="paramdir">[in]</td><td class="paramname">coords</td><td><a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information.">Vector</a> of four 2D coordinates. Even pos is x and odd y. </td></tr>
Jenkinsb9abeae2018-11-22 11:58:08 +0000279 <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the image </td></tr>
280 <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the image </td></tr>
281 <tr><td class="paramdir">[in]</td><td class="paramname">border_size</td><td>Border size </td></tr>
282 <tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>Scale value </td></tr>
283 <tr><td class="paramdir">[in]</td><td class="paramname">offset_qasymm</td><td>Offset value </td></tr>
284 </table>
285 </dd>
286</dl>
287
288<p class="definition">Definition at line <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00084">84</a> of file <a class="el" href="warp__helpers__quantized_8h_source.xhtml">warp_helpers_quantized.h</a>.</p>
Jenkins0e205f72019-11-28 16:53:35 +0000289<div class="fragment"><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;{</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="comment">// If any of the 4 texels is out of the image&#39;s boundaries we use the border value (REPLICATE or CONSTANT) for any texel out of the image.</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="comment">// Sets the 4x4 coordinates for each of the four input texels</span></div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="keyword">const</span> float8 fc = floor(coords);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keyword">const</span> float16 c1 = (float16)(</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <a class="code" href="warp__helpers__quantized_8h.xhtml#aafa351a2c35f5f121921cee080c223d6">clamp_to_border_with_size_quantized</a>(<a class="code" href="warp__helpers__quantized_8h.xhtml#ac05d99f194a7cf429a7ecbadd1ffb018">get_neighbour_coords_quantized</a>((float2)(fc.s0, fc.s1)), width, height, border_size),</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <a class="code" href="warp__helpers__quantized_8h.xhtml#aafa351a2c35f5f121921cee080c223d6">clamp_to_border_with_size_quantized</a>(<a class="code" href="warp__helpers__quantized_8h.xhtml#ac05d99f194a7cf429a7ecbadd1ffb018">get_neighbour_coords_quantized</a>((float2)(fc.s2, fc.s3)), width, height, border_size));</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keyword">const</span> float16 c2 = (float16)(</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <a class="code" href="warp__helpers__quantized_8h.xhtml#aafa351a2c35f5f121921cee080c223d6">clamp_to_border_with_size_quantized</a>(<a class="code" href="warp__helpers__quantized_8h.xhtml#ac05d99f194a7cf429a7ecbadd1ffb018">get_neighbour_coords_quantized</a>((float2)(fc.s4, fc.s5)), width, height, border_size),</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <a class="code" href="warp__helpers__quantized_8h.xhtml#aafa351a2c35f5f121921cee080c223d6">clamp_to_border_with_size_quantized</a>(<a class="code" href="warp__helpers__quantized_8h.xhtml#ac05d99f194a7cf429a7ecbadd1ffb018">get_neighbour_coords_quantized</a>((float2)(fc.s6, fc.s7)), width, height, border_size));</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="comment">// Loads the values from the input image</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keyword">const</span> int16 t = (int16)(</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="comment">/* tl, tr, bl, br */</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; * ((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.s0, c1.s1)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.s2, c1.s3)),</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.s4, c1.s5)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.s6, c1.s7)),</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.s8, c1.s9)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.sa, c1.sb)),</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.sc, c1.sd)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.se, c1.sf)),</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.s0, c2.s1)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.s2, c2.s3)),</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.s4, c2.s5)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.s6, c2.s7)),</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.s8, c2.s9)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.sa, c2.sb)),</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.sc, c2.sd)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.se, c2.sf)));</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keyword">const</span> float16 inf32 = convert_float16(t - (int16)offset_qasymm) * (float16)<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acec6d8ad52a28972fa74e071c1a63b6a">scale</a>;</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="keyword">const</span> float8 a = coords - fc;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="keyword">const</span> float8 <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a> = ((float8)(1.f)) - a;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keyword">const</span> float4 fr = (float4)(</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; ((inf32.s0 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s0 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s1) + (inf32.s1 * a.s0 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s1) + (inf32.s2 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s0 * a.s1) + (inf32.s3 * a.s0 * a.s1)),</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; ((inf32.s4 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s2 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s3) + (inf32.s5 * a.s2 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s3) + (inf32.s6 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s2 * a.s3) + (inf32.s7 * a.s2 * a.s3)),</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; ((inf32.s8 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s4 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s5) + (inf32.s9 * a.s4 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s5) + (inf32.sa * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s4 * a.s5) + (inf32.sb * a.s4 * a.s5)),</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; ((inf32.sc * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s6 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s7) + (inf32.sd * a.s6 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s7) + (inf32.se * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.s6 * a.s7) + (inf32.sf * a.s6 * a.s7)));</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keyword">const</span> uchar4 res = convert_uchar4_sat(convert_int4_sat_rtp(fr / <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acec6d8ad52a28972fa74e071c1a63b6a">scale</a>) + offset_qasymm);</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <span class="keywordflow">return</span> res;</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;}</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00510">helpers.h:510</a></div></div>
Jenkins514be652019-02-28 12:25:18 +0000290<div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div>
Jenkins4ba87db2019-05-23 17:11:51 +0100291<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_aa76b4a6e74940dabc5b7fc6b2dab3545"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">arm_compute::test::validation::b</a></div><div class="ttdeci">SimpleTensor&lt; float &gt; b</div><div class="ttdef"><b>Definition:</b> <a href="_c_p_p_2_d_f_t_8cpp_source.xhtml#l00157">DFT.cpp:157</a></div></div>
Jenkins514be652019-02-28 12:25:18 +0000292<div class="ttc" id="warp__helpers__quantized_8h_xhtml_aafa351a2c35f5f121921cee080c223d6"><div class="ttname"><a href="warp__helpers__quantized_8h.xhtml#aafa351a2c35f5f121921cee080c223d6">clamp_to_border_with_size_quantized</a></div><div class="ttdeci">const float8 clamp_to_border_with_size_quantized(float8 coords, const float width, const float height, const float border_size)</div><div class="ttdoc">Clamps the given coordinates to the borders according to the border size.</div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers__quantized_8h_source.xhtml#l00034">warp_helpers_quantized.h:34</a></div></div>
Jenkins975dfe12019-09-02 11:47:54 +0100293<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acec6d8ad52a28972fa74e071c1a63b6a"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acec6d8ad52a28972fa74e071c1a63b6a">arm_compute::test::validation::scale</a></div><div class="ttdeci">scale</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_pixel_wise_multiplication_8cpp_source.xhtml#l00317">PixelWiseMultiplication.cpp:317</a></div></div>
Jenkins514be652019-02-28 12:25:18 +0000294<div class="ttc" id="warp__helpers__quantized_8h_xhtml_ac05d99f194a7cf429a7ecbadd1ffb018"><div class="ttname"><a href="warp__helpers__quantized_8h.xhtml#ac05d99f194a7cf429a7ecbadd1ffb018">get_neighbour_coords_quantized</a></div><div class="ttdeci">const float8 get_neighbour_coords_quantized(const float2 coord)</div><div class="ttdoc">Given a texel coordinates this function will return the following array of coordinates: [ P,...</div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers__quantized_8h_source.xhtml#l00063">warp_helpers_quantized.h:63</a></div></div>
295</div><!-- fragment -->
Jenkins0e205f72019-11-28 16:53:35 +0000296<p class="reference">References <a class="el" href="_c_p_p_2_d_f_t_8cpp_source.xhtml#l00157">arm_compute::test::validation::b</a>, <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00034">clamp_to_border_with_size_quantized()</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00063">get_neighbour_coords_quantized()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00510">offset()</a>, and <a class="el" href="_n_e_o_n_2_pixel_wise_multiplication_8cpp_source.xhtml#l00317">arm_compute::test::validation::scale</a>.</p>
Jenkinsb9abeae2018-11-22 11:58:08 +0000297
298<p class="reference">Referenced by <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00135">bilinear_interpolate_quantized()</a>, and <a class="el" href="scale__quantized_8cl_source.xhtml#l00073">scale_bilinear_quantized_nchw()</a>.</p>
Jenkins514be652019-02-28 12:25:18 +0000299
Jenkinsb9abeae2018-11-22 11:58:08 +0000300</div>
301</div>
302<a id="a33c81135c18bd3881c3f5f36c25fe499"></a>
303<h2 class="memtitle"><span class="permalink"><a href="#a33c81135c18bd3881c3f5f36c25fe499">&#9670;&nbsp;</a></span>clamp_to_border_quantized()</h2>
304
305<div class="memitem">
306<div class="memproto">
307<table class="mlabels">
308 <tr>
309 <td class="mlabels-left">
310 <table class="memname">
311 <tr>
312 <td class="memname">const float8 clamp_to_border_quantized </td>
313 <td>(</td>
314 <td class="paramtype">float8&#160;</td>
315 <td class="paramname"><em>coords</em>, </td>
316 </tr>
317 <tr>
318 <td class="paramkey"></td>
319 <td></td>
320 <td class="paramtype">const float&#160;</td>
321 <td class="paramname"><em>width</em>, </td>
322 </tr>
323 <tr>
324 <td class="paramkey"></td>
325 <td></td>
326 <td class="paramtype">const float&#160;</td>
327 <td class="paramname"><em>height</em>&#160;</td>
328 </tr>
329 <tr>
330 <td></td>
331 <td>)</td>
332 <td></td><td></td>
333 </tr>
334 </table>
335 </td>
336 <td class="mlabels-right">
337<span class="mlabels"><span class="mlabel">inline</span></span> </td>
338 </tr>
339</table>
340</div><div class="memdoc">
341
342<p>Clamps the given coordinates to the borders. </p>
343<dl class="params"><dt>Parameters</dt><dd>
344 <table class="params">
Jenkins514be652019-02-28 12:25:18 +0000345 <tr><td class="paramdir">[in]</td><td class="paramname">coords</td><td><a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information.">Vector</a> of 2D coordinates to clamp. Even positions are X coords, odd positions are Y coords. </td></tr>
Jenkinsb9abeae2018-11-22 11:58:08 +0000346 <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the image </td></tr>
347 <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the image </td></tr>
348 </table>
349 </dd>
350</dl>
351
352<p class="definition">Definition at line <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00049">49</a> of file <a class="el" href="warp__helpers__quantized_8h_source.xhtml">warp_helpers_quantized.h</a>.</p>
Jenkins514be652019-02-28 12:25:18 +0000353<div class="fragment"><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;{</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="keywordflow">return</span> <a class="code" href="warp__helpers__quantized_8h.xhtml#aafa351a2c35f5f121921cee080c223d6">clamp_to_border_with_size_quantized</a>(coords, width, height, 1);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;}</div><div class="ttc" id="warp__helpers__quantized_8h_xhtml_aafa351a2c35f5f121921cee080c223d6"><div class="ttname"><a href="warp__helpers__quantized_8h.xhtml#aafa351a2c35f5f121921cee080c223d6">clamp_to_border_with_size_quantized</a></div><div class="ttdeci">const float8 clamp_to_border_with_size_quantized(float8 coords, const float width, const float height, const float border_size)</div><div class="ttdoc">Clamps the given coordinates to the borders according to the border size.</div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers__quantized_8h_source.xhtml#l00034">warp_helpers_quantized.h:34</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000354</div><!-- fragment -->
Jenkins514be652019-02-28 12:25:18 +0000355<p class="reference">References <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00034">clamp_to_border_with_size_quantized()</a>.</p>
356
Jenkinsb9abeae2018-11-22 11:58:08 +0000357</div>
358</div>
359<a id="aafa351a2c35f5f121921cee080c223d6"></a>
360<h2 class="memtitle"><span class="permalink"><a href="#aafa351a2c35f5f121921cee080c223d6">&#9670;&nbsp;</a></span>clamp_to_border_with_size_quantized()</h2>
361
362<div class="memitem">
363<div class="memproto">
364<table class="mlabels">
365 <tr>
366 <td class="mlabels-left">
367 <table class="memname">
368 <tr>
369 <td class="memname">const float8 clamp_to_border_with_size_quantized </td>
370 <td>(</td>
371 <td class="paramtype">float8&#160;</td>
372 <td class="paramname"><em>coords</em>, </td>
373 </tr>
374 <tr>
375 <td class="paramkey"></td>
376 <td></td>
377 <td class="paramtype">const float&#160;</td>
378 <td class="paramname"><em>width</em>, </td>
379 </tr>
380 <tr>
381 <td class="paramkey"></td>
382 <td></td>
383 <td class="paramtype">const float&#160;</td>
384 <td class="paramname"><em>height</em>, </td>
385 </tr>
386 <tr>
387 <td class="paramkey"></td>
388 <td></td>
389 <td class="paramtype">const float&#160;</td>
390 <td class="paramname"><em>border_size</em>&#160;</td>
391 </tr>
392 <tr>
393 <td></td>
394 <td>)</td>
395 <td></td><td></td>
396 </tr>
397 </table>
398 </td>
399 <td class="mlabels-right">
400<span class="mlabels"><span class="mlabel">inline</span></span> </td>
401 </tr>
402</table>
403</div><div class="memdoc">
404
405<p>Clamps the given coordinates to the borders according to the border size. </p>
406<dl class="params"><dt>Parameters</dt><dd>
407 <table class="params">
Jenkins514be652019-02-28 12:25:18 +0000408 <tr><td class="paramdir">[in]</td><td class="paramname">coords</td><td><a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information.">Vector</a> of 2D coordinates to clamp. Even positions are X coords, odd positions are Y coords. </td></tr>
Jenkinsb9abeae2018-11-22 11:58:08 +0000409 <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the image </td></tr>
410 <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the image </td></tr>
411 <tr><td class="paramdir">[in]</td><td class="paramname">border_size</td><td>Border size of the image </td></tr>
412 </table>
413 </dd>
414</dl>
415
416<p class="definition">Definition at line <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00034">34</a> of file <a class="el" href="warp__helpers__quantized_8h_source.xhtml">warp_helpers_quantized.h</a>.</p>
Jenkins0e205f72019-11-28 16:53:35 +0000417<div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;{</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="keyword">const</span> float4 clamped_x = <a class="code" href="namespacearm__compute_1_1utility.xhtml#a96efecf997f13a914609ddf1eb67f624">clamp</a>(coords.even, 0.0f - border_size, width - 1 + border_size);</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keyword">const</span> float4 clamped_y = <a class="code" href="namespacearm__compute_1_1utility.xhtml#a96efecf997f13a914609ddf1eb67f624">clamp</a>(coords.odd, 0.0f - border_size, height - 1 + border_size);</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keywordflow">return</span> (float8)(clamped_x.s0, clamped_y.s0, clamped_x.s1, clamped_y.s1, clamped_x.s2, clamped_y.s2, clamped_x.s3, clamped_y.s3);</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1utility_xhtml_a96efecf997f13a914609ddf1eb67f624"><div class="ttname"><a href="namespacearm__compute_1_1utility.xhtml#a96efecf997f13a914609ddf1eb67f624">arm_compute::utility::clamp</a></div><div class="ttdeci">DataType clamp(const DataType &amp;n, const DataType &amp;lower=std::numeric_limits&lt; RangeType &gt;::lowest(), const DataType &amp;upper=std::numeric_limits&lt; RangeType &gt;::max())</div><div class="ttdoc">Performs clamping among a lower and upper value.</div><div class="ttdef"><b>Definition:</b> <a href="_utility_8h_source.xhtml#l00099">Utility.h:99</a></div></div>
Jenkins514be652019-02-28 12:25:18 +0000418</div><!-- fragment -->
Jenkins0e205f72019-11-28 16:53:35 +0000419<p class="reference">References <a class="el" href="_utility_8h_source.xhtml#l00099">arm_compute::utility::clamp()</a>.</p>
Jenkinsb9abeae2018-11-22 11:58:08 +0000420
421<p class="reference">Referenced by <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00084">bilinear_interpolate_with_border_quantized()</a>, and <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00049">clamp_to_border_quantized()</a>.</p>
Jenkins514be652019-02-28 12:25:18 +0000422
Jenkinsb9abeae2018-11-22 11:58:08 +0000423</div>
424</div>
425<a id="aa13de3eff8afd51e8bf4c1904a9b7415"></a>
426<h2 class="memtitle"><span class="permalink"><a href="#aa13de3eff8afd51e8bf4c1904a9b7415">&#9670;&nbsp;</a></span>get_current_coords_quantized()</h2>
427
428<div class="memitem">
429<div class="memproto">
430<table class="mlabels">
431 <tr>
432 <td class="mlabels-left">
433 <table class="memname">
434 <tr>
435 <td class="memname">const float2 get_current_coords_quantized </td>
436 <td>(</td>
437 <td class="paramname"></td><td>)</td>
438 <td></td>
439 </tr>
440 </table>
441 </td>
442 <td class="mlabels-right">
443<span class="mlabels"><span class="mlabel">inline</span></span> </td>
444 </tr>
445</table>
446</div><div class="memdoc">
447
448<p>Returns the current thread coordinates. </p>
449
450<p class="definition">Definition at line <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00069">69</a> of file <a class="el" href="warp__helpers__quantized_8h_source.xhtml">warp_helpers_quantized.h</a>.</p>
Jenkinsb9abeae2018-11-22 11:58:08 +0000451<div class="fragment"><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;{</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="keywordflow">return</span> (float2)(get_global_id(0) * 4, get_global_id(1));</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;}</div></div><!-- fragment -->
Jenkins514be652019-02-28 12:25:18 +0000452<p class="reference">Referenced by <a class="el" href="scale__quantized_8cl_source.xhtml#l00073">scale_bilinear_quantized_nchw()</a>.</p>
453
Jenkinsb9abeae2018-11-22 11:58:08 +0000454</div>
455</div>
456<a id="ac05d99f194a7cf429a7ecbadd1ffb018"></a>
457<h2 class="memtitle"><span class="permalink"><a href="#ac05d99f194a7cf429a7ecbadd1ffb018">&#9670;&nbsp;</a></span>get_neighbour_coords_quantized()</h2>
458
459<div class="memitem">
460<div class="memproto">
461<table class="mlabels">
462 <tr>
463 <td class="mlabels-left">
464 <table class="memname">
465 <tr>
466 <td class="memname">const float8 get_neighbour_coords_quantized </td>
467 <td>(</td>
468 <td class="paramtype">const float2&#160;</td>
469 <td class="paramname"><em>coord</em></td><td>)</td>
470 <td></td>
471 </tr>
472 </table>
473 </td>
474 <td class="mlabels-right">
475<span class="mlabels"><span class="mlabel">inline</span></span> </td>
476 </tr>
477</table>
478</div><div class="memdoc">
479
480<p>Given a texel coordinates this function will return the following array of coordinates: [ P, right neighbour, below neighbour, below right neighbour ]. </p>
481<dl class="section note"><dt>Note</dt><dd>No checks to see if the coordinates are out of the image are done here.</dd></dl>
482<dl class="params"><dt>Parameters</dt><dd>
483 <table class="params">
484 <tr><td class="paramdir">[in]</td><td class="paramname">coord</td><td>Input coordinates</td></tr>
485 </table>
486 </dd>
487</dl>
488<dl class="section return"><dt>Returns</dt><dd>vector of 8 floats with the coordinates, even positions are x and odd y. </dd></dl>
489
490<p class="definition">Definition at line <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00063">63</a> of file <a class="el" href="warp__helpers__quantized_8h_source.xhtml">warp_helpers_quantized.h</a>.</p>
Jenkinsb9abeae2018-11-22 11:58:08 +0000491<div class="fragment"><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;{</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keywordflow">return</span> (float8)(<span class="comment">/*tl*/</span> coord.s0, coord.s1, <span class="comment">/*tr*/</span> coord.s0 + 1, coord.s1, <span class="comment">/*bl*/</span> coord.s0, coord.s1 + 1, <span class="comment">/*br*/</span> coord.s0 + 1, coord.s1 + 1);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;}</div></div><!-- fragment -->
Jenkins514be652019-02-28 12:25:18 +0000492<p class="reference">Referenced by <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00084">bilinear_interpolate_with_border_quantized()</a>.</p>
493
Jenkinsb9abeae2018-11-22 11:58:08 +0000494</div>
495</div>
496</div><!-- contents -->
497</div><!-- doc-content -->
498<!-- start footer part -->
499<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
500 <ul>
501 <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_aebb8dcc11953d78e620bbef0b9e2183.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_8c278f79c760e5c5fbd911f9870614c1.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_25885286e9dad4fa105b7b25a8031bbf.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="warp__helpers__quantized_8h.xhtml">warp_helpers_quantized.h</a></li>
Jenkins7f09cf72020-01-22 18:08:16 +0000502 <li class="footer">Generated on Wed Jan 22 2020 18:07:48 for Compute Library by
Jenkinsb9abeae2018-11-22 11:58:08 +0000503 <a href="http://www.doxygen.org/index.html">
Jenkins514be652019-02-28 12:25:18 +0000504 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
Jenkinsb9abeae2018-11-22 11:58:08 +0000505 </ul>
506</div>
507</body>
508</html>