blob: 8e4f140f8d049fb82893f55e9dee452b4154e2bb [file] [log] [blame]
Jenkinsb9abeae2018-11-22 11:58:08 +00001<!-- 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.13"/>
8<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
9<title>Compute Library: src/core/CL/cl_kernels/scale_quantized.cl File Reference</title>
10<link href="tabs.css" rel="stylesheet" type="text/css"/>
11<script type="text/javascript" src="jquery.js"></script>
12<script type="text/javascript" src="dynsections.js"></script>
13<link href="navtree.css" rel="stylesheet" type="text/css"/>
14<script type="text/javascript" src="resize.js"></script>
15<script type="text/javascript" src="navtreedata.js"></script>
16<script type="text/javascript" src="navtree.js"></script>
17<script type="text/javascript">
18 $(document).ready(initResizable);
19</script>
20<link href="search/search.css" rel="stylesheet" type="text/css"/>
21<script type="text/javascript" src="search/searchdata.js"></script>
22<script type="text/javascript" src="search/search.js"></script>
23<script type="text/x-mathjax-config">
24 MathJax.Hub.Config({
25 extensions: ["tex2jax.js"],
26 jax: ["input/TeX","output/HTML-CSS"],
27});
28</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
29<link href="doxygen.css" rel="stylesheet" type="text/css" />
30</head>
31<body>
32<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
33<div id="titlearea">
34<table cellspacing="0" cellpadding="0">
35 <tbody>
36 <tr style="height: 56px;">
37 <td style="padding-left: 0.5em;">
38 <div id="projectname">Compute Library
39 &#160;<span id="projectnumber">18.11</span>
40 </div>
41 </td>
42 </tr>
43 </tbody>
44</table>
45</div>
46<!-- end header part -->
47<!-- Generated by Doxygen 1.8.13 -->
48<script type="text/javascript">
49var searchBox = new SearchBox("searchBox", "search",false,'Search');
50</script>
51<script type="text/javascript" src="menudata.js"></script>
52<script type="text/javascript" src="menu.js"></script>
53<script type="text/javascript">
54$(function() {
55 initMenu('',true,false,'search.php','Search');
56 $(document).ready(function() { init_search(); });
57});
58</script>
59<div id="main-nav"></div>
60</div><!-- top -->
61<div id="side-nav" class="ui-resizable side-nav-resizable">
62 <div id="nav-tree">
63 <div id="nav-tree-contents">
64 <div id="nav-sync" class="sync"></div>
65 </div>
66 </div>
67 <div id="splitbar" style="-moz-user-select:none;"
68 class="ui-resizable-handle">
69 </div>
70</div>
71<script type="text/javascript">
72$(document).ready(function(){initNavTree('scale__quantized_8cl.xhtml','');});
73</script>
74<div id="doc-content">
75<!-- window showing the filter options -->
76<div id="MSearchSelectWindow"
77 onmouseover="return searchBox.OnSearchSelectShow()"
78 onmouseout="return searchBox.OnSearchSelectHide()"
79 onkeydown="return searchBox.OnSearchSelectKey(event)">
80</div>
81
82<!-- iframe showing the search results (closed by default) -->
83<div id="MSearchResultsWindow">
84<iframe src="javascript:void(0)" frameborder="0"
85 name="MSearchResults" id="MSearchResults">
86</iframe>
87</div>
88
89<div class="header">
90 <div class="summary">
91<a href="#func-members">Functions</a> </div>
92 <div class="headertitle">
93<div class="title">scale_quantized.cl File Reference</div> </div>
94</div><!--header-->
95<div class="contents">
96<div class="textblock"><code>#include &quot;<a class="el" href="helpers__asymm_8h_source.xhtml">helpers_asymm.h</a>&quot;</code><br />
97<code>#include &quot;<a class="el" href="warp__helpers__quantized_8h_source.xhtml">warp_helpers_quantized.h</a>&quot;</code><br />
98</div>
99<p><a href="scale__quantized_8cl_source.xhtml">Go to the source code of this file.</a></p>
100<table class="memberdecls">
101<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
102Functions</h2></td></tr>
103<tr class="memitem:acbe073ffe68691758706acfe1dc305ba"><td class="memItemLeft" align="right" valign="top">const float8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="scale__quantized_8cl.xhtml#acbe073ffe68691758706acfe1dc305ba">transform_bilinear_quantized</a> (const float2 coord, const float2 scale)</td></tr>
104<tr class="memdesc:acbe073ffe68691758706acfe1dc305ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transforms four 2D coordinates. <a href="#acbe073ffe68691758706acfe1dc305ba">More...</a><br /></td></tr>
105<tr class="separator:acbe073ffe68691758706acfe1dc305ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
106<tr class="memitem:a157d3c35f643dafe1c4bed09594f3bb5"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="scale__quantized_8cl.xhtml#a157d3c35f643dafe1c4bed09594f3bb5">scale_bilinear_quantized_nchw</a> (__global uchar *in_ptr, uint <a class="el" href="depthwise__convolution_8cl.xhtml#a5447e2c4e1aae8fff9290b775fe813ff">in_stride_x</a>, uint in_step_x, uint <a class="el" href="depthwise__convolution_8cl.xhtml#ac353c0687abd8c71a4fa096d322b39ec">in_stride_y</a>, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint <a class="el" href="depthwise__convolution_8cl.xhtml#a68fce1f0ee4080ed89c9427496d625f2">out_stride_x</a>, uint out_step_x, uint <a class="el" href="depthwise__convolution_8cl.xhtml#ac8b6b732372937bba276e6391944d1e1">out_stride_y</a>, uint out_step_y, uint out_offset_first_element_in_bytes, const float input_width, const float input_height, const float scale_x, const float scale_y)</td></tr>
107<tr class="memdesc:a157d3c35f643dafe1c4bed09594f3bb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs an affine transformation on an image interpolating with the BILINEAR method. <a href="#a157d3c35f643dafe1c4bed09594f3bb5">More...</a><br /></td></tr>
108<tr class="separator:a157d3c35f643dafe1c4bed09594f3bb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
109<tr class="memitem:af7bbf833ca2587ae7421833cc006d3f4"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="scale__quantized_8cl.xhtml#af7bbf833ca2587ae7421833cc006d3f4">scale_bilinear_quantized_nhwc</a> (__global uchar *in_ptr, uint <a class="el" href="depthwise__convolution_8cl.xhtml#a5447e2c4e1aae8fff9290b775fe813ff">in_stride_x</a>, uint in_step_x, uint <a class="el" href="depthwise__convolution_8cl.xhtml#ac353c0687abd8c71a4fa096d322b39ec">in_stride_y</a>, uint in_step_y, uint <a class="el" href="depthwise__convolution_8cl.xhtml#a32137dd220c1110408a7b498108de2c5">in_stride_z</a>, uint in_step_z, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint <a class="el" href="depthwise__convolution_8cl.xhtml#a68fce1f0ee4080ed89c9427496d625f2">out_stride_x</a>, uint out_step_x, uint <a class="el" href="depthwise__convolution_8cl.xhtml#ac8b6b732372937bba276e6391944d1e1">out_stride_y</a>, uint out_step_y, uint <a class="el" href="depthwise__convolution_8cl.xhtml#a128f47cb6aacde29e07fde2c4b9f5dd2">out_stride_z</a>, uint out_step_z, uint out_offset_first_element_in_bytes, const float input_width, const float input_height, const float scale_x, const float scale_y)</td></tr>
110<tr class="memdesc:af7bbf833ca2587ae7421833cc006d3f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs scale on an image interpolating with the BILINEAR method. <a href="#af7bbf833ca2587ae7421833cc006d3f4">More...</a><br /></td></tr>
111<tr class="separator:af7bbf833ca2587ae7421833cc006d3f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
112</table>
113<h2 class="groupheader">Function Documentation</h2>
114<a id="a157d3c35f643dafe1c4bed09594f3bb5"></a>
115<h2 class="memtitle"><span class="permalink"><a href="#a157d3c35f643dafe1c4bed09594f3bb5">&#9670;&nbsp;</a></span>scale_bilinear_quantized_nchw()</h2>
116
117<div class="memitem">
118<div class="memproto">
119 <table class="memname">
120 <tr>
121 <td class="memname">__kernel void scale_bilinear_quantized_nchw </td>
122 <td>(</td>
123 <td class="paramtype">__global uchar *&#160;</td>
124 <td class="paramname"><em>in_ptr</em>, </td>
125 </tr>
126 <tr>
127 <td class="paramkey"></td>
128 <td></td>
129 <td class="paramtype">uint&#160;</td>
130 <td class="paramname"><em>in_stride_x</em>, </td>
131 </tr>
132 <tr>
133 <td class="paramkey"></td>
134 <td></td>
135 <td class="paramtype">uint&#160;</td>
136 <td class="paramname"><em>in_step_x</em>, </td>
137 </tr>
138 <tr>
139 <td class="paramkey"></td>
140 <td></td>
141 <td class="paramtype">uint&#160;</td>
142 <td class="paramname"><em>in_stride_y</em>, </td>
143 </tr>
144 <tr>
145 <td class="paramkey"></td>
146 <td></td>
147 <td class="paramtype">uint&#160;</td>
148 <td class="paramname"><em>in_step_y</em>, </td>
149 </tr>
150 <tr>
151 <td class="paramkey"></td>
152 <td></td>
153 <td class="paramtype">uint&#160;</td>
154 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
155 </tr>
156 <tr>
157 <td class="paramkey"></td>
158 <td></td>
159 <td class="paramtype">__global uchar *&#160;</td>
160 <td class="paramname"><em>out_ptr</em>, </td>
161 </tr>
162 <tr>
163 <td class="paramkey"></td>
164 <td></td>
165 <td class="paramtype">uint&#160;</td>
166 <td class="paramname"><em>out_stride_x</em>, </td>
167 </tr>
168 <tr>
169 <td class="paramkey"></td>
170 <td></td>
171 <td class="paramtype">uint&#160;</td>
172 <td class="paramname"><em>out_step_x</em>, </td>
173 </tr>
174 <tr>
175 <td class="paramkey"></td>
176 <td></td>
177 <td class="paramtype">uint&#160;</td>
178 <td class="paramname"><em>out_stride_y</em>, </td>
179 </tr>
180 <tr>
181 <td class="paramkey"></td>
182 <td></td>
183 <td class="paramtype">uint&#160;</td>
184 <td class="paramname"><em>out_step_y</em>, </td>
185 </tr>
186 <tr>
187 <td class="paramkey"></td>
188 <td></td>
189 <td class="paramtype">uint&#160;</td>
190 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
191 </tr>
192 <tr>
193 <td class="paramkey"></td>
194 <td></td>
195 <td class="paramtype">const float&#160;</td>
196 <td class="paramname"><em>input_width</em>, </td>
197 </tr>
198 <tr>
199 <td class="paramkey"></td>
200 <td></td>
201 <td class="paramtype">const float&#160;</td>
202 <td class="paramname"><em>input_height</em>, </td>
203 </tr>
204 <tr>
205 <td class="paramkey"></td>
206 <td></td>
207 <td class="paramtype">const float&#160;</td>
208 <td class="paramname"><em>scale_x</em>, </td>
209 </tr>
210 <tr>
211 <td class="paramkey"></td>
212 <td></td>
213 <td class="paramtype">const float&#160;</td>
214 <td class="paramname"><em>scale_y</em>&#160;</td>
215 </tr>
216 <tr>
217 <td></td>
218 <td>)</td>
219 <td></td><td></td>
220 </tr>
221 </table>
222</div><div class="memdoc">
223
224<p>Performs an affine transformation on an image interpolating with the BILINEAR method. </p>
225<dl class="section note"><dt>Note</dt><dd>Sampling policy to used is passed as -DSAMPLING_POLICY_(TYPE) e.g. -DSAMPLING_POLICY_TOP_LEFT </dd>
226<dd>
227Scale value for QASYMM8 data type to used is passed as -DSCALE=</dd></dl>
228<p>e.g. -DSCALE=0.5 </p><dl class="section note"><dt>Note</dt><dd>Offset value for QASYMM8 data type to used is passed as -DOFFSET=</dd></dl>
229<p>e.g. -DOFFSET=1</p>
230<dl class="params"><dt>Parameters</dt><dd>
231 <table class="params">
232 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: QASYMM8. </td></tr>
233 <tr><td class="paramdir">[in]</td><td class="paramname">in_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
234 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
235 <tr><td class="paramdir">[in]</td><td class="paramname">in_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
236 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
237 <tr><td class="paramdir">[in]</td><td class="paramname">in_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
238 <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image. Supported data types: U8, S16. (Must be the same as the input) </td></tr>
239 <tr><td class="paramdir">[in]</td><td class="paramname">out_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
240 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
241 <tr><td class="paramdir">[in]</td><td class="paramname">out_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
242 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
243 <tr><td class="paramdir">[in]</td><td class="paramname">out_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
244 <tr><td class="paramdir">[in]</td><td class="paramname">input_width</td><td>Input image width </td></tr>
245 <tr><td class="paramdir">[in]</td><td class="paramname">input_height</td><td>Input image height </td></tr>
246 <tr><td class="paramdir">[in]</td><td class="paramname">scale_x</td><td>The scale factor along x dimension </td></tr>
247 <tr><td class="paramdir">[in]</td><td class="paramname">scale_y</td><td>The scale factor along y dimension </td></tr>
248 </table>
249 </dd>
250</dl>
251
252<p class="definition">Definition at line <a class="el" href="scale__quantized_8cl_source.xhtml#l00073">73</a> of file <a class="el" href="scale__quantized_8cl_source.xhtml">scale_quantized.cl</a>.</p>
253
254<p class="reference">References <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00084">bilinear_interpolate_with_border_quantized()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00110">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00113">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00069">get_current_coords_quantized()</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00265">arm_compute::test::validation::in</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00266">arm_compute::test::validation::out</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00150">Image::ptr</a>, and <a class="el" href="scale__quantized_8cl_source.xhtml#l00034">transform_bilinear_quantized()</a>.</p>
255<div class="fragment"><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;{</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>(in);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af8a8a0625e7981212a0af48deb9d2a09">out</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(out);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keyword">const</span> float2 r = (float2)(scale_x, scale_y);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="keyword">const</span> float8 tc = <a class="code" href="scale__quantized_8cl.xhtml#acbe073ffe68691758706acfe1dc305ba">transform_bilinear_quantized</a>(<a class="code" href="warp__helpers__quantized_8h.xhtml#aa13de3eff8afd51e8bf4c1904a9b7415">get_current_coords_quantized</a>(), r);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; vstore4(<a class="code" href="warp__helpers__quantized_8h.xhtml#ae8a3d61874f95580e8110f4f206c3b8b">bilinear_interpolate_with_border_quantized</a>(&amp;in, tc, input_width, input_height, BORDER_SIZE, SCALE, OFFSET), 0, (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;}</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00110">helpers.h:110</a></div></div>
256<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>
257<div class="ttc" id="scale__quantized_8cl_xhtml_acbe073ffe68691758706acfe1dc305ba"><div class="ttname"><a href="scale__quantized_8cl.xhtml#acbe073ffe68691758706acfe1dc305ba">transform_bilinear_quantized</a></div><div class="ttdeci">const float8 transform_bilinear_quantized(const float2 coord, const float2 scale)</div><div class="ttdoc">Transforms four 2D coordinates. </div><div class="ttdef"><b>Definition:</b> <a href="scale__quantized_8cl_source.xhtml#l00034">scale_quantized.cl:34</a></div></div>
258<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ad366eaa4cf2d106037d91c30795a5c76"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">arm_compute::test::validation::in</a></div><div class="ttdeci">CLTensor in</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00265">Winograd.cpp:265</a></div></div>
259<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a4334a4a76f8e9628c0fb9e1acf616e2a"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT_NO_STEP(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00113">helpers.h:113</a></div></div>
260<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>
261<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_af8a8a0625e7981212a0af48deb9d2a09"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#af8a8a0625e7981212a0af48deb9d2a09">arm_compute::test::validation::out</a></div><div class="ttdeci">CLTensor out</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00266">Winograd.cpp:266</a></div></div>
262<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00148">helpers.h:148</a></div></div>
263<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00150">helpers.h:150</a></div></div>
264<div class="ttc" id="warp__helpers__quantized_8h_xhtml_aa13de3eff8afd51e8bf4c1904a9b7415"><div class="ttname"><a href="warp__helpers__quantized_8h.xhtml#aa13de3eff8afd51e8bf4c1904a9b7415">get_current_coords_quantized</a></div><div class="ttdeci">const float2 get_current_coords_quantized()</div><div class="ttdoc">Returns the current thread coordinates. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers__quantized_8h_source.xhtml#l00069">warp_helpers_quantized.h:69</a></div></div>
265</div><!-- fragment -->
266</div>
267</div>
268<a id="af7bbf833ca2587ae7421833cc006d3f4"></a>
269<h2 class="memtitle"><span class="permalink"><a href="#af7bbf833ca2587ae7421833cc006d3f4">&#9670;&nbsp;</a></span>scale_bilinear_quantized_nhwc()</h2>
270
271<div class="memitem">
272<div class="memproto">
273 <table class="memname">
274 <tr>
275 <td class="memname">__kernel void scale_bilinear_quantized_nhwc </td>
276 <td>(</td>
277 <td class="paramtype">__global uchar *&#160;</td>
278 <td class="paramname"><em>in_ptr</em>, </td>
279 </tr>
280 <tr>
281 <td class="paramkey"></td>
282 <td></td>
283 <td class="paramtype">uint&#160;</td>
284 <td class="paramname"><em>in_stride_x</em>, </td>
285 </tr>
286 <tr>
287 <td class="paramkey"></td>
288 <td></td>
289 <td class="paramtype">uint&#160;</td>
290 <td class="paramname"><em>in_step_x</em>, </td>
291 </tr>
292 <tr>
293 <td class="paramkey"></td>
294 <td></td>
295 <td class="paramtype">uint&#160;</td>
296 <td class="paramname"><em>in_stride_y</em>, </td>
297 </tr>
298 <tr>
299 <td class="paramkey"></td>
300 <td></td>
301 <td class="paramtype">uint&#160;</td>
302 <td class="paramname"><em>in_step_y</em>, </td>
303 </tr>
304 <tr>
305 <td class="paramkey"></td>
306 <td></td>
307 <td class="paramtype">uint&#160;</td>
308 <td class="paramname"><em>in_stride_z</em>, </td>
309 </tr>
310 <tr>
311 <td class="paramkey"></td>
312 <td></td>
313 <td class="paramtype">uint&#160;</td>
314 <td class="paramname"><em>in_step_z</em>, </td>
315 </tr>
316 <tr>
317 <td class="paramkey"></td>
318 <td></td>
319 <td class="paramtype">uint&#160;</td>
320 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
321 </tr>
322 <tr>
323 <td class="paramkey"></td>
324 <td></td>
325 <td class="paramtype">__global uchar *&#160;</td>
326 <td class="paramname"><em>out_ptr</em>, </td>
327 </tr>
328 <tr>
329 <td class="paramkey"></td>
330 <td></td>
331 <td class="paramtype">uint&#160;</td>
332 <td class="paramname"><em>out_stride_x</em>, </td>
333 </tr>
334 <tr>
335 <td class="paramkey"></td>
336 <td></td>
337 <td class="paramtype">uint&#160;</td>
338 <td class="paramname"><em>out_step_x</em>, </td>
339 </tr>
340 <tr>
341 <td class="paramkey"></td>
342 <td></td>
343 <td class="paramtype">uint&#160;</td>
344 <td class="paramname"><em>out_stride_y</em>, </td>
345 </tr>
346 <tr>
347 <td class="paramkey"></td>
348 <td></td>
349 <td class="paramtype">uint&#160;</td>
350 <td class="paramname"><em>out_step_y</em>, </td>
351 </tr>
352 <tr>
353 <td class="paramkey"></td>
354 <td></td>
355 <td class="paramtype">uint&#160;</td>
356 <td class="paramname"><em>out_stride_z</em>, </td>
357 </tr>
358 <tr>
359 <td class="paramkey"></td>
360 <td></td>
361 <td class="paramtype">uint&#160;</td>
362 <td class="paramname"><em>out_step_z</em>, </td>
363 </tr>
364 <tr>
365 <td class="paramkey"></td>
366 <td></td>
367 <td class="paramtype">uint&#160;</td>
368 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
369 </tr>
370 <tr>
371 <td class="paramkey"></td>
372 <td></td>
373 <td class="paramtype">const float&#160;</td>
374 <td class="paramname"><em>input_width</em>, </td>
375 </tr>
376 <tr>
377 <td class="paramkey"></td>
378 <td></td>
379 <td class="paramtype">const float&#160;</td>
380 <td class="paramname"><em>input_height</em>, </td>
381 </tr>
382 <tr>
383 <td class="paramkey"></td>
384 <td></td>
385 <td class="paramtype">const float&#160;</td>
386 <td class="paramname"><em>scale_x</em>, </td>
387 </tr>
388 <tr>
389 <td class="paramkey"></td>
390 <td></td>
391 <td class="paramtype">const float&#160;</td>
392 <td class="paramname"><em>scale_y</em>&#160;</td>
393 </tr>
394 <tr>
395 <td></td>
396 <td>)</td>
397 <td></td><td></td>
398 </tr>
399 </table>
400</div><div class="memdoc">
401
402<p>Performs scale on an image interpolating with the BILINEAR method. </p>
403<p>(NHWC)</p>
404<dl class="section note"><dt>Note</dt><dd>Sampling policy to be used is passed as -DSAMPLING_POLICY_(TYPE) e.g. -DSAMPLING_POLICY_TOP_LEFT </dd>
405<dd>
406Scale value for QASYMM8 data type to used is passed as -DSCALE=</dd></dl>
407<p>e.g. -DSCALE=0.5 </p><dl class="section note"><dt>Note</dt><dd>Offset value for QASYMM8 data type to used is passed as -DOFFSET=</dd></dl>
408<p>e.g. -DOFFSET=1 </p><dl class="section note"><dt>Note</dt><dd>If border mode replicate is used, is should be passed as -DBORDER_MODE_REPLICATE</dd></dl>
409<dl class="params"><dt>Parameters</dt><dd>
410 <table class="params">
411 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: QASYMM8. </td></tr>
412 <tr><td class="paramdir">[in]</td><td class="paramname">in_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
413 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
414 <tr><td class="paramdir">[in]</td><td class="paramname">in_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
415 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
416 <tr><td class="paramdir">[in]</td><td class="paramname">in_stride_z</td><td>Stride of the source image in Z dimension (in bytes) </td></tr>
417 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_z</td><td>src_stride_z * number of elements along Z processed per workitem(in bytes) </td></tr>
418 <tr><td class="paramdir">[in]</td><td class="paramname">in_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
419 <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image. Supported data types: same as <code>in_ptr</code> </td></tr>
420 <tr><td class="paramdir">[in]</td><td class="paramname">out_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
421 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
422 <tr><td class="paramdir">[in]</td><td class="paramname">out_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
423 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
424 <tr><td class="paramdir">[in]</td><td class="paramname">out_stride_z</td><td>Stride of the destination image in Z dimension (in bytes) </td></tr>
425 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_z</td><td>dst_stride_y * number of elements along Z processed per workitem(in bytes) </td></tr>
426 <tr><td class="paramdir">[in]</td><td class="paramname">out_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
427 <tr><td class="paramdir">[in]</td><td class="paramname">input_width</td><td>Input image width </td></tr>
428 <tr><td class="paramdir">[in]</td><td class="paramname">input_height</td><td>Input image height </td></tr>
429 <tr><td class="paramdir">[in]</td><td class="paramname">scale_x</td><td>The scale factor along x dimension </td></tr>
430 <tr><td class="paramdir">[in]</td><td class="paramname">scale_y</td><td>The scale factor along y dimension </td></tr>
431 </table>
432 </dd>
433</dl>
434
435<p class="definition">Definition at line <a class="el" href="scale__quantized_8cl_source.xhtml#l00116">116</a> of file <a class="el" href="scale__quantized_8cl_source.xhtml">scale_quantized.cl</a>.</p>
436
437<p class="reference">References <a class="el" href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00102">arm_compute::test::validation::a</a>, <a class="el" href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00091">arm_compute::test::validation::b</a>, <a class="el" href="_utility_8h_source.xhtml#l00084">arm_compute::utility::clamp()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00125">CONVERT_TO_TENSOR3D_STRUCT</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00129">CONVERT_TO_TENSOR3D_STRUCT_NO_STEP</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00265">arm_compute::test::validation::in</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00266">arm_compute::test::validation::out</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00159">Tensor3D::ptr</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00321">tensor3D_offset()</a>.</p>
438<div class="fragment"><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;{</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a79e8e562daa6599317d2d1cd86ef1bf2">CONVERT_TO_TENSOR3D_STRUCT_NO_STEP</a>(in);</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af8a8a0625e7981212a0af48deb9d2a09">out</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(out);</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;<span class="preprocessor">#ifdef SAMPLING_POLICY_TOP_LEFT</span></div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> new_x = get_global_id(1) * scale_x;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> new_y = get_global_id(2) * scale_y;</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;<span class="preprocessor">#elif SAMPLING_POLICY_CENTER</span></div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> new_x = (get_global_id(1) + 0.5f) * scale_x - 0.5f;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> new_y = (get_global_id(2) + 0.5f) * scale_y - 0.5f;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;<span class="preprocessor">#else </span><span class="comment">/* SAMPLING_POLICY */</span><span class="preprocessor"></span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;<span class="preprocessor">#error(&quot;Unsupported sampling policy&quot;);</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* SAMPLING_POLICY */</span><span class="preprocessor"></span></div><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="keyword">const</span> <span class="keywordtype">float</span> new_xf = floor(new_x);</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> new_yf = floor(new_y);</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="keywordtype">float</span> clamped_x = <a class="code" href="namespacearm__compute_1_1utility.xhtml#a12c3c62f510452805c289e180ec78bb7">clamp</a>(new_xf, 0.0f, input_width - 1);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="keywordtype">float</span> clamped_x1 = <a class="code" href="namespacearm__compute_1_1utility.xhtml#a12c3c62f510452805c289e180ec78bb7">clamp</a>(new_xf + 1, 0.0f, input_width - 1);</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="keywordtype">float</span> clamped_x_ = clamped_x;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keywordtype">float</span> clamped_x1_ = clamped_x1;</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> clamped_y = <a class="code" href="namespacearm__compute_1_1utility.xhtml#a12c3c62f510452805c289e180ec78bb7">clamp</a>(new_yf, 0.0f, input_height - 1);</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> clamped_y1 = <a class="code" href="namespacearm__compute_1_1utility.xhtml#a12c3c62f510452805c289e180ec78bb7">clamp</a>(new_yf + 1, 0.0f, input_height - 1);</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;<span class="preprocessor">#ifndef BORDER_MODE_REPLICATE</span></div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; clamped_x1 = select(clamped_x1, 0.0f - BORDER_SIZE, new_yf + 1 &lt; 0.f || new_yf + 1 &gt; input_height - 1 || new_xf + 1 &lt; 0.f || new_xf + 1 &gt; input_width - 1);</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; clamped_x_ = select(clamped_x_, 0.0f - BORDER_SIZE, new_yf + 1 &gt; input_height - 1 || new_xf &lt; 0.f || new_xf &gt; input_width - 1);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; clamped_x = select(clamped_x, 0.0f - BORDER_SIZE, new_yf &lt; 0.f || new_yf &gt; input_height - 1 || new_xf &lt; 0.f || new_xf &gt; input_width - 1);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; clamped_x1_ = select(clamped_x1_, 0.0f - BORDER_SIZE, new_xf + 1 &lt; 0.f || new_xf + 1 &gt; input_width - 1 || new_yf &lt; 0.f || new_yf &gt; input_height - 1);</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* BORDER_MODE_REPLICATE */</span><span class="preprocessor"></span></div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; int4 ins = (int4)(*((__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#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&amp;in, get_global_id(0), convert_int(clamped_x), convert_int(clamped_y))),</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</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#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&amp;in, get_global_id(0), convert_int(clamped_x1_), convert_int(clamped_y))),</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</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#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&amp;in, get_global_id(0), convert_int(clamped_x_), convert_int(clamped_y1))),</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</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#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&amp;in, get_global_id(0), convert_int(clamped_x1), convert_int(clamped_y1))));</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">a</a> = new_x - new_xf;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">b</a> = 1.f - <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">a</a>;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> a1 = new_y - new_yf;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> b1 = 1.f - a1;</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="keyword">const</span> float4 insf32 = convert_float4(ins - (int4)OFFSET) * (float4)SCALE;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> fr = ((insf32.s0 * b * b1) + (insf32.s1 * a * b1) + (insf32.s2 * b * a1) + (insf32.s3 * a * a1));</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; uchar res = convert_uchar_sat(convert_int_sat_rtp(fr / SCALE) + OFFSET);</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)out.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) = res;</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_aac40b7097f2bda9274ae07fa33d15a79"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">arm_compute::test::validation::a</a></div><div class="ttdeci">gemm configure &amp; a</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00102">GEMM.cpp:102</a></div></div>
439<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>
440<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ad366eaa4cf2d106037d91c30795a5c76"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">arm_compute::test::validation::in</a></div><div class="ttdeci">CLTensor in</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00265">Winograd.cpp:265</a></div></div>
441<div class="ttc" id="namespacearm__compute_1_1utility_xhtml_a12c3c62f510452805c289e180ec78bb7"><div class="ttname"><a href="namespacearm__compute_1_1utility.xhtml#a12c3c62f510452805c289e180ec78bb7">arm_compute::utility::clamp</a></div><div class="ttdeci">T clamp(const T &amp;n, const T &amp;lower, const T &amp;upper)</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#l00084">Utility.h:84</a></div></div>
442<div class="ttc" id="struct_tensor3_d_xhtml"><div class="ttname"><a href="struct_tensor3_d.xhtml">Tensor3D</a></div><div class="ttdoc">Structure to hold 3D tensor information. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00157">helpers.h:157</a></div></div>
443<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a79e8e562daa6599317d2d1cd86ef1bf2"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a79e8e562daa6599317d2d1cd86ef1bf2">CONVERT_TO_TENSOR3D_STRUCT_NO_STEP</a></div><div class="ttdeci">#define CONVERT_TO_TENSOR3D_STRUCT_NO_STEP(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00129">helpers.h:129</a></div></div>
444<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_af8a8a0625e7981212a0af48deb9d2a09"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#af8a8a0625e7981212a0af48deb9d2a09">arm_compute::test::validation::out</a></div><div class="ttdeci">CLTensor out</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00266">Winograd.cpp:266</a></div></div>
445<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a31c8c760f08fb1a331b16b7c204321dc"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_TENSOR3D_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00125">helpers.h:125</a></div></div>
446<div class="ttc" id="struct_tensor3_d_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">Tensor3D::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00159">helpers.h:159</a></div></div>
447<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a7b8004eef325a40dd43eb80755610fff"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">arm_compute::test::validation::b</a></div><div class="ttdeci">CLTensor b</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00091">GEMM.cpp:91</a></div></div>
448<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a2101b2fe0193ce227ae4e0945e321d85"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a></div><div class="ttdeci">__global const uchar * tensor3D_offset(const Tensor3D *tensor, int x, int y, int z)</div><div class="ttdoc">Get the pointer position of a Tensor3D. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00321">helpers.h:321</a></div></div>
449</div><!-- fragment -->
450</div>
451</div>
452<a id="acbe073ffe68691758706acfe1dc305ba"></a>
453<h2 class="memtitle"><span class="permalink"><a href="#acbe073ffe68691758706acfe1dc305ba">&#9670;&nbsp;</a></span>transform_bilinear_quantized()</h2>
454
455<div class="memitem">
456<div class="memproto">
457<table class="mlabels">
458 <tr>
459 <td class="mlabels-left">
460 <table class="memname">
461 <tr>
462 <td class="memname">const float8 transform_bilinear_quantized </td>
463 <td>(</td>
464 <td class="paramtype">const float2&#160;</td>
465 <td class="paramname"><em>coord</em>, </td>
466 </tr>
467 <tr>
468 <td class="paramkey"></td>
469 <td></td>
470 <td class="paramtype">const float2&#160;</td>
471 <td class="paramname"><em>scale</em>&#160;</td>
472 </tr>
473 <tr>
474 <td></td>
475 <td>)</td>
476 <td></td><td></td>
477 </tr>
478 </table>
479 </td>
480 <td class="mlabels-right">
481<span class="mlabels"><span class="mlabel">inline</span></span> </td>
482 </tr>
483</table>
484</div><div class="memdoc">
485
486<p>Transforms four 2D coordinates. </p>
487<p>This is used to map the output coordinates to the input coordinates.</p>
488<dl class="params"><dt>Parameters</dt><dd>
489 <table class="params">
490 <tr><td class="paramdir">[in]</td><td class="paramname">coord</td><td>2D coordinates to transform. </td></tr>
491 <tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>input/output scale ratio</td></tr>
492 </table>
493 </dd>
494</dl>
495<dl class="section return"><dt>Returns</dt><dd>a float8 containing 4 2D transformed values in the input image. </dd></dl>
496
497<p class="definition">Definition at line <a class="el" href="scale__quantized_8cl_source.xhtml#l00034">34</a> of file <a class="el" href="scale__quantized_8cl_source.xhtml">scale_quantized.cl</a>.</p>
498
499<p class="reference">Referenced by <a class="el" href="scale__quantized_8cl_source.xhtml#l00073">scale_bilinear_quantized_nchw()</a>.</p>
500<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 in_x_coords = (float4)(coord.s0, 1 + coord.s0, 2 + coord.s0, 3 + coord.s0);</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#ifdef SAMPLING_POLICY_TOP_LEFT</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keyword">const</span> float4 new_x = in_x_coords * (float4)(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acec6d8ad52a28972fa74e071c1a63b6a">scale</a>.s0);</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keyword">const</span> float4 new_y = (float4)(coord.s1 * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acec6d8ad52a28972fa74e071c1a63b6a">scale</a>.s1);</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; <span class="keywordflow">return</span> (float8)(new_x.s0, new_y.s0, new_x.s1, new_y.s1, new_x.s2, new_y.s2, new_x.s3, new_y.s3);</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="preprocessor">#elif SAMPLING_POLICY_CENTER</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keyword">const</span> float4 new_x = (in_x_coords + ((float4)(0.5f))) * (float4)(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acec6d8ad52a28972fa74e071c1a63b6a">scale</a>.s0) - (float4)(0.5f);</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keyword">const</span> float4 new_y = (float4)((coord.s1 + 0.5f) * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acec6d8ad52a28972fa74e071c1a63b6a">scale</a>.s1 - 0.5f);</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <span class="keywordflow">return</span> (float8)(new_x.s0, new_y.s0, new_x.s1, new_y.s1, new_x.s2, new_y.s2, new_x.s3, new_y.s3);</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="preprocessor">#else </span><span class="comment">/* SAMPLING_POLICY */</span><span class="preprocessor"></span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="preprocessor">#error(&quot;Unsupported sampling policy&quot;);</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* SAMPLING_POLICY */</span><span class="preprocessor"></span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;}</div><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#l00168">PixelWiseMultiplication.cpp:168</a></div></div>
501</div><!-- fragment -->
502</div>
503</div>
504</div><!-- contents -->
505</div><!-- doc-content -->
506<!-- start footer part -->
507<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
508 <ul>
509 <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="scale__quantized_8cl.xhtml">scale_quantized.cl</a></li>
510 <li class="footer">Generated on Thu Nov 22 2018 11:57:43 for Compute Library by
511 <a href="http://www.doxygen.org/index.html">
512 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
513 </ul>
514</div>
515</body>
516</html>