blob: 7688c1afa398c77603f1e9d5ae8f3bdd46893160 [file] [log] [blame]
Anthony Barbier871448e2017-03-24 14:54:29 +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"/>
Kaizen8938bd32017-09-28 14:38:23 +01007<meta name="generator" content="Doxygen 1.8.6"/>
Anthony Barbier871448e2017-03-24 14:54:29 +00008<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
Anthony Barbierdbdab852017-06-23 15:42:00 +01009<title>Compute Library: src/core/CL/cl_kernels/scale.cl File Reference</title>
Anthony Barbier871448e2017-03-24 14:54:29 +000010<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>
Anthony Barbier871448e2017-03-24 14:54:29 +000015<script type="text/javascript" src="navtree.js"></script>
16<script type="text/javascript">
17 $(document).ready(initResizable);
18 $(window).load(resizeHeight);
19</script>
20<link href="search/search.css" rel="stylesheet" type="text/css"/>
Anthony Barbier871448e2017-03-24 14:54:29 +000021<script type="text/javascript" src="search/search.js"></script>
22<script type="text/javascript">
Kaizen8938bd32017-09-28 14:38:23 +010023 $(document).ready(function() { searchBox.OnSelectItem(0); });
Anthony Barbier871448e2017-03-24 14:54:29 +000024</script>
25<script type="text/x-mathjax-config">
26 MathJax.Hub.Config({
27 extensions: ["tex2jax.js"],
28 jax: ["input/TeX","output/HTML-CSS"],
29});
Kaizen8938bd32017-09-28 14:38:23 +010030</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000031<link href="doxygen.css" rel="stylesheet" type="text/css" />
32</head>
33<body>
34<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
35<div id="titlearea">
36<table cellspacing="0" cellpadding="0">
37 <tbody>
38 <tr style="height: 56px;">
39 <td style="padding-left: 0.5em;">
Anthony Barbierdbdab852017-06-23 15:42:00 +010040 <div id="projectname">Compute Library
Kaizenbf8b01d2017-10-12 14:26:51 +010041 &#160;<span id="projectnumber">17.10</span>
Anthony Barbier871448e2017-03-24 14:54:29 +000042 </div>
43 </td>
44 </tr>
45 </tbody>
46</table>
47</div>
48<!-- end header part -->
Kaizen8938bd32017-09-28 14:38:23 +010049<!-- Generated by Doxygen 1.8.6 -->
Anthony Barbier871448e2017-03-24 14:54:29 +000050<script type="text/javascript">
51var searchBox = new SearchBox("searchBox", "search",false,'Search');
52</script>
53 <div id="navrow1" class="tabs">
54 <ul class="tablist">
55 <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
Anthony Barbierdbdab852017-06-23 15:42:00 +010056 <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +000057 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
58 <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
59 <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
60 <li>
61 <div id="MSearchBox" class="MSearchBoxInactive">
62 <span class="left">
63 <img id="MSearchSelect" src="search/mag_sel.png"
64 onmouseover="return searchBox.OnSearchSelectShow()"
65 onmouseout="return searchBox.OnSearchSelectHide()"
66 alt=""/>
67 <input type="text" id="MSearchField" value="Search" accesskey="S"
68 onfocus="searchBox.OnSearchFieldFocus(true)"
69 onblur="searchBox.OnSearchFieldFocus(false)"
70 onkeyup="searchBox.OnSearchFieldChange(event)"/>
71 </span><span class="right">
72 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
73 </span>
74 </div>
75 </li>
76 </ul>
77 </div>
78 <div id="navrow2" class="tabs2">
79 <ul class="tablist">
80 <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
81 <li><a href="globals.xhtml"><span>Globals</span></a></li>
82 </ul>
83 </div>
84</div><!-- top -->
85<div id="side-nav" class="ui-resizable side-nav-resizable">
86 <div id="nav-tree">
87 <div id="nav-tree-contents">
88 <div id="nav-sync" class="sync"></div>
89 </div>
90 </div>
91 <div id="splitbar" style="-moz-user-select:none;"
92 class="ui-resizable-handle">
93 </div>
94</div>
95<script type="text/javascript">
96$(document).ready(function(){initNavTree('scale_8cl.xhtml','');});
97</script>
98<div id="doc-content">
99<!-- window showing the filter options -->
100<div id="MSearchSelectWindow"
101 onmouseover="return searchBox.OnSearchSelectShow()"
102 onmouseout="return searchBox.OnSearchSelectHide()"
103 onkeydown="return searchBox.OnSearchSelectKey(event)">
Kaizen8938bd32017-09-28 14:38:23 +0100104<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000105
106<!-- iframe showing the search results (closed by default) -->
107<div id="MSearchResultsWindow">
108<iframe src="javascript:void(0)" frameborder="0"
109 name="MSearchResults" id="MSearchResults">
110</iframe>
111</div>
112
113<div class="header">
114 <div class="summary">
115<a href="#func-members">Functions</a> </div>
116 <div class="headertitle">
117<div class="title">scale.cl File Reference</div> </div>
118</div><!--header-->
119<div class="contents">
Kaizen8938bd32017-09-28 14:38:23 +0100120<div class="textblock"><code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br/>
121<code>#include &quot;<a class="el" href="warp__helpers_8h_source.xhtml">warp_helpers.h</a>&quot;</code><br/>
Anthony Barbier871448e2017-03-24 14:54:29 +0000122</div>
123<p><a href="scale_8cl_source.xhtml">Go to the source code of this file.</a></p>
124<table class="memberdecls">
125<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
126Functions</h2></td></tr>
127<tr class="memitem:a55c710b814464d9b8982c4eb6ca04dee"><td class="memItemLeft" align="right" valign="top">const float8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="scale_8cl.xhtml#a55c710b814464d9b8982c4eb6ca04dee">transform_nearest</a> (const float2 coord, const float2 scale)</td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100128<tr class="memdesc:a55c710b814464d9b8982c4eb6ca04dee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transforms four 2D coordinates. <a href="#a55c710b814464d9b8982c4eb6ca04dee">More...</a><br/></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000129<tr class="separator:a55c710b814464d9b8982c4eb6ca04dee"><td class="memSeparator" colspan="2">&#160;</td></tr>
130<tr class="memitem:a1990e87858b15b8fce3f63965fb9b86c"><td class="memItemLeft" align="right" valign="top">const float8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="scale_8cl.xhtml#a1990e87858b15b8fce3f63965fb9b86c">transform_bilinear</a> (const float2 coord, const float2 scale)</td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100131<tr class="memdesc:a1990e87858b15b8fce3f63965fb9b86c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Transforms four 2D coordinates. <a href="#a1990e87858b15b8fce3f63965fb9b86c">More...</a><br/></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000132<tr class="separator:a1990e87858b15b8fce3f63965fb9b86c"><td class="memSeparator" colspan="2">&#160;</td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100133<tr class="memitem:ace0505bd2794cb971269d525953b9b78"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="scale_8cl.xhtml#ace0505bd2794cb971269d525953b9b78">scale_nearest_neighbour</a> (__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, 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>
134<tr class="memdesc:ace0505bd2794cb971269d525953b9b78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs an affine transformation on an image interpolating with the NEAREAST NEIGHBOUR method. <a href="#ace0505bd2794cb971269d525953b9b78">More...</a><br/></td></tr>
135<tr class="separator:ace0505bd2794cb971269d525953b9b78"><td class="memSeparator" colspan="2">&#160;</td></tr>
136<tr class="memitem:afafd19fca28a0b88836611dae58ed787"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="scale_8cl.xhtml#afafd19fca28a0b88836611dae58ed787">scale_bilinear</a> (__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, 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>
137<tr class="memdesc:afafd19fca28a0b88836611dae58ed787"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs an affine transformation on an image interpolating with the BILINEAR method. <a href="#afafd19fca28a0b88836611dae58ed787">More...</a><br/></td></tr>
138<tr class="separator:afafd19fca28a0b88836611dae58ed787"><td class="memSeparator" colspan="2">&#160;</td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000139</table>
140<h2 class="groupheader">Function Documentation</h2>
Kaizen8938bd32017-09-28 14:38:23 +0100141<a class="anchor" id="afafd19fca28a0b88836611dae58ed787"></a>
Anthony Barbier871448e2017-03-24 14:54:29 +0000142<div class="memitem">
143<div class="memproto">
144 <table class="memname">
145 <tr>
146 <td class="memname">__kernel void scale_bilinear </td>
147 <td>(</td>
148 <td class="paramtype">__global uchar *&#160;</td>
149 <td class="paramname"><em>in_ptr</em>, </td>
150 </tr>
151 <tr>
152 <td class="paramkey"></td>
153 <td></td>
154 <td class="paramtype">uint&#160;</td>
155 <td class="paramname"><em>in_stride_x</em>, </td>
156 </tr>
157 <tr>
158 <td class="paramkey"></td>
159 <td></td>
160 <td class="paramtype">uint&#160;</td>
161 <td class="paramname"><em>in_step_x</em>, </td>
162 </tr>
163 <tr>
164 <td class="paramkey"></td>
165 <td></td>
166 <td class="paramtype">uint&#160;</td>
167 <td class="paramname"><em>in_stride_y</em>, </td>
168 </tr>
169 <tr>
170 <td class="paramkey"></td>
171 <td></td>
172 <td class="paramtype">uint&#160;</td>
173 <td class="paramname"><em>in_step_y</em>, </td>
174 </tr>
175 <tr>
176 <td class="paramkey"></td>
177 <td></td>
178 <td class="paramtype">uint&#160;</td>
179 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
180 </tr>
181 <tr>
182 <td class="paramkey"></td>
183 <td></td>
184 <td class="paramtype">__global uchar *&#160;</td>
185 <td class="paramname"><em>out_ptr</em>, </td>
186 </tr>
187 <tr>
188 <td class="paramkey"></td>
189 <td></td>
190 <td class="paramtype">uint&#160;</td>
191 <td class="paramname"><em>out_stride_x</em>, </td>
192 </tr>
193 <tr>
194 <td class="paramkey"></td>
195 <td></td>
196 <td class="paramtype">uint&#160;</td>
197 <td class="paramname"><em>out_step_x</em>, </td>
198 </tr>
199 <tr>
200 <td class="paramkey"></td>
201 <td></td>
202 <td class="paramtype">uint&#160;</td>
203 <td class="paramname"><em>out_stride_y</em>, </td>
204 </tr>
205 <tr>
206 <td class="paramkey"></td>
207 <td></td>
208 <td class="paramtype">uint&#160;</td>
209 <td class="paramname"><em>out_step_y</em>, </td>
210 </tr>
211 <tr>
212 <td class="paramkey"></td>
213 <td></td>
214 <td class="paramtype">uint&#160;</td>
215 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
216 </tr>
217 <tr>
218 <td class="paramkey"></td>
219 <td></td>
220 <td class="paramtype">const float&#160;</td>
221 <td class="paramname"><em>input_width</em>, </td>
222 </tr>
223 <tr>
224 <td class="paramkey"></td>
225 <td></td>
226 <td class="paramtype">const float&#160;</td>
227 <td class="paramname"><em>input_height</em>, </td>
228 </tr>
229 <tr>
230 <td class="paramkey"></td>
231 <td></td>
232 <td class="paramtype">const float&#160;</td>
Kaizen8938bd32017-09-28 14:38:23 +0100233 <td class="paramname"><em>scale_x</em>, </td>
Anthony Barbier871448e2017-03-24 14:54:29 +0000234 </tr>
235 <tr>
236 <td class="paramkey"></td>
237 <td></td>
238 <td class="paramtype">const float&#160;</td>
Kaizen8938bd32017-09-28 14:38:23 +0100239 <td class="paramname"><em>scale_y</em>&#160;</td>
Anthony Barbier871448e2017-03-24 14:54:29 +0000240 </tr>
241 <tr>
242 <td></td>
243 <td>)</td>
244 <td></td><td></td>
245 </tr>
246 </table>
247</div><div class="memdoc">
248
249<p>Performs an affine transformation on an image interpolating with the BILINEAR method. </p>
250<dl class="params"><dt>Parameters</dt><dd>
251 <table class="params">
252 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: U8, S16. </td></tr>
253 <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>
254 <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>
255 <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>
256 <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>
257 <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>
258 <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>
259 <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>
260 <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>
261 <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>
262 <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>
263 <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>
264 <tr><td class="paramdir">[in]</td><td class="paramname">input_width</td><td>Input image width </td></tr>
265 <tr><td class="paramdir">[in]</td><td class="paramname">input_height</td><td>Input image height </td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100266 <tr><td class="paramdir">[in]</td><td class="paramname">scale_x</td><td>The scale factor along x dimension </td></tr>
267 <tr><td class="paramdir">[in]</td><td class="paramname">scale_y</td><td>The scale factor along y dimension </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000268 </table>
269 </dd>
270</dl>
271
272<p>Definition at line <a class="el" href="scale_8cl_source.xhtml#l00110">110</a> of file <a class="el" href="scale_8cl_source.xhtml">scale.cl</a>.</p>
273
Kaizenbf8b01d2017-10-12 14:26:51 +0100274<p>References <a class="el" href="warp__helpers_8h_source.xhtml#l00080">bilinear_interpolate()</a>, <a class="el" href="helpers_8h_source.xhtml#l00096">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00099">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_8h_source.xhtml#l00054">get_current_coords()</a>, <a class="el" href="helpers_8h_source.xhtml#l00136">Image::ptr</a>, and <a class="el" href="scale_8cl_source.xhtml#l00049">transform_bilinear()</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100275<div class="fragment"><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;{</div>
276<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> in = <a class="code" href="helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>(in);</div>
277<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(out);</div>
278<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keyword">const</span> float2 r = (float2)(scale_x, scale_y);</div>
279<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="keyword">const</span> float8 tc = <a class="code" href="scale_8cl.xhtml#a1990e87858b15b8fce3f63965fb9b86c">transform_bilinear</a>(<a class="code" href="warp__helpers_8h.xhtml#a4caaeeb51ea58015267a9974675226d1">get_current_coords</a>(), r);</div>
280<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; vstore4(<a class="code" href="warp__helpers_8h.xhtml#abea9f226daf3e0ad741d03cf7417d353">bilinear_interpolate</a>(&amp;in, tc, input_width, input_height), 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>
281<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;}</div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000282<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>
Kaizenbf8b01d2017-10-12 14:26:51 +0100283<div class="ttc" id="helpers_8h_xhtml_a4334a4a76f8e9628c0fb9e1acf616e2a"><div class="ttname"><a href="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="helpers_8h_source.xhtml#l00099">helpers.h:99</a></div></div>
284<div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="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="helpers_8h_source.xhtml#l00096">helpers.h:96</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000285<div class="ttc" id="scale_8cl_xhtml_a1990e87858b15b8fce3f63965fb9b86c"><div class="ttname"><a href="scale_8cl.xhtml#a1990e87858b15b8fce3f63965fb9b86c">transform_bilinear</a></div><div class="ttdeci">const float8 transform_bilinear(const float2 coord, const float2 scale)</div><div class="ttdoc">Transforms four 2D coordinates. </div><div class="ttdef"><b>Definition:</b> <a href="scale_8cl_source.xhtml#l00049">scale.cl:49</a></div></div>
Kaizenbf8b01d2017-10-12 14:26:51 +0100286<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="helpers_8h_source.xhtml#l00134">helpers.h:134</a></div></div>
287<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="helpers_8h_source.xhtml#l00136">helpers.h:136</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000288<div class="ttc" id="warp__helpers_8h_xhtml_a4caaeeb51ea58015267a9974675226d1"><div class="ttname"><a href="warp__helpers_8h.xhtml#a4caaeeb51ea58015267a9974675226d1">get_current_coords</a></div><div class="ttdeci">const float2 get_current_coords()</div><div class="ttdoc">Returns the current thread coordinates. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00054">warp_helpers.h:54</a></div></div>
289<div class="ttc" id="warp__helpers_8h_xhtml_abea9f226daf3e0ad741d03cf7417d353"><div class="ttname"><a href="warp__helpers_8h.xhtml#abea9f226daf3e0ad741d03cf7417d353">bilinear_interpolate</a></div><div class="ttdeci">const DATA_TYPE4 bilinear_interpolate(const Image *in, const float8 coords, const float width, const float height)</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_8h_source.xhtml#l00080">warp_helpers.h:80</a></div></div>
290</div><!-- fragment -->
291</div>
292</div>
Kaizen8938bd32017-09-28 14:38:23 +0100293<a class="anchor" id="ace0505bd2794cb971269d525953b9b78"></a>
Anthony Barbier871448e2017-03-24 14:54:29 +0000294<div class="memitem">
295<div class="memproto">
296 <table class="memname">
297 <tr>
298 <td class="memname">__kernel void scale_nearest_neighbour </td>
299 <td>(</td>
300 <td class="paramtype">__global uchar *&#160;</td>
301 <td class="paramname"><em>in_ptr</em>, </td>
302 </tr>
303 <tr>
304 <td class="paramkey"></td>
305 <td></td>
306 <td class="paramtype">uint&#160;</td>
307 <td class="paramname"><em>in_stride_x</em>, </td>
308 </tr>
309 <tr>
310 <td class="paramkey"></td>
311 <td></td>
312 <td class="paramtype">uint&#160;</td>
313 <td class="paramname"><em>in_step_x</em>, </td>
314 </tr>
315 <tr>
316 <td class="paramkey"></td>
317 <td></td>
318 <td class="paramtype">uint&#160;</td>
319 <td class="paramname"><em>in_stride_y</em>, </td>
320 </tr>
321 <tr>
322 <td class="paramkey"></td>
323 <td></td>
324 <td class="paramtype">uint&#160;</td>
325 <td class="paramname"><em>in_step_y</em>, </td>
326 </tr>
327 <tr>
328 <td class="paramkey"></td>
329 <td></td>
330 <td class="paramtype">uint&#160;</td>
331 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
332 </tr>
333 <tr>
334 <td class="paramkey"></td>
335 <td></td>
336 <td class="paramtype">__global uchar *&#160;</td>
337 <td class="paramname"><em>out_ptr</em>, </td>
338 </tr>
339 <tr>
340 <td class="paramkey"></td>
341 <td></td>
342 <td class="paramtype">uint&#160;</td>
343 <td class="paramname"><em>out_stride_x</em>, </td>
344 </tr>
345 <tr>
346 <td class="paramkey"></td>
347 <td></td>
348 <td class="paramtype">uint&#160;</td>
349 <td class="paramname"><em>out_step_x</em>, </td>
350 </tr>
351 <tr>
352 <td class="paramkey"></td>
353 <td></td>
354 <td class="paramtype">uint&#160;</td>
355 <td class="paramname"><em>out_stride_y</em>, </td>
356 </tr>
357 <tr>
358 <td class="paramkey"></td>
359 <td></td>
360 <td class="paramtype">uint&#160;</td>
361 <td class="paramname"><em>out_step_y</em>, </td>
362 </tr>
363 <tr>
364 <td class="paramkey"></td>
365 <td></td>
366 <td class="paramtype">uint&#160;</td>
367 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
368 </tr>
369 <tr>
370 <td class="paramkey"></td>
371 <td></td>
372 <td class="paramtype">const float&#160;</td>
373 <td class="paramname"><em>input_width</em>, </td>
374 </tr>
375 <tr>
376 <td class="paramkey"></td>
377 <td></td>
378 <td class="paramtype">const float&#160;</td>
379 <td class="paramname"><em>input_height</em>, </td>
380 </tr>
381 <tr>
382 <td class="paramkey"></td>
383 <td></td>
384 <td class="paramtype">const float&#160;</td>
Kaizen8938bd32017-09-28 14:38:23 +0100385 <td class="paramname"><em>scale_x</em>, </td>
Anthony Barbier871448e2017-03-24 14:54:29 +0000386 </tr>
387 <tr>
388 <td class="paramkey"></td>
389 <td></td>
390 <td class="paramtype">const float&#160;</td>
Kaizen8938bd32017-09-28 14:38:23 +0100391 <td class="paramname"><em>scale_y</em>&#160;</td>
Anthony Barbier871448e2017-03-24 14:54:29 +0000392 </tr>
393 <tr>
394 <td></td>
395 <td>)</td>
396 <td></td><td></td>
397 </tr>
398 </table>
399</div><div class="memdoc">
400
401<p>Performs an affine transformation on an image interpolating with the NEAREAST NEIGHBOUR method. </p>
402<p>Input and output are single channel U8 or S16.</p>
403<dl class="params"><dt>Parameters</dt><dd>
404 <table class="params">
405 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: U8, S16. </td></tr>
406 <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>
407 <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>
408 <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>
409 <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>
410 <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>
411 <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>
412 <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>
413 <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>
414 <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>
415 <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>
416 <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>
417 <tr><td class="paramdir">[in]</td><td class="paramname">input_width</td><td>Input image width </td></tr>
418 <tr><td class="paramdir">[in]</td><td class="paramname">input_height</td><td>Input image height </td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100419 <tr><td class="paramdir">[in]</td><td class="paramname">scale_x</td><td>The scale factor along x dimension </td></tr>
420 <tr><td class="paramdir">[in]</td><td class="paramname">scale_y</td><td>The scale factor along y dimension </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000421 </table>
422 </dd>
423</dl>
424
425<p>Definition at line <a class="el" href="scale_8cl_source.xhtml#l00076">76</a> of file <a class="el" href="scale_8cl_source.xhtml">scale.cl</a>.</p>
426
Kaizenbf8b01d2017-10-12 14:26:51 +0100427<p>References <a class="el" href="warp__helpers_8h_source.xhtml#l00033">clamp_to_border()</a>, <a class="el" href="helpers_8h_source.xhtml#l00096">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00099">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_8h_source.xhtml#l00054">get_current_coords()</a>, <a class="el" href="helpers_8h_source.xhtml#l00136">Image::ptr</a>, <a class="el" href="warp__helpers_8h_source.xhtml#l00045">read_texels4()</a>, and <a class="el" href="scale_8cl_source.xhtml#l00034">transform_nearest()</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100428<div class="fragment"><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;{</div>
429<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> in = <a class="code" href="helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>(in);</div>
430<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(out);</div>
431<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keyword">const</span> float2 r = (float2)(scale_x, scale_y);</div>
432<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keyword">const</span> float8 tc = <a class="code" href="warp__helpers_8h.xhtml#adbdf2ca9e8fe0b67f9359929ef743126">clamp_to_border</a>(<a class="code" href="scale_8cl.xhtml#a55c710b814464d9b8982c4eb6ca04dee">transform_nearest</a>(<a class="code" href="warp__helpers_8h.xhtml#a4caaeeb51ea58015267a9974675226d1">get_current_coords</a>(), r), input_width, input_height);</div>
433<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; vstore4(<a class="code" href="warp__helpers_8h.xhtml#aba42442a4c991cdbb52727fa370676f1">read_texels4</a>(&amp;in, convert_int8(tc)), 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>
434<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;}</div>
435<div class="ttc" id="warp__helpers_8h_xhtml_adbdf2ca9e8fe0b67f9359929ef743126"><div class="ttname"><a href="warp__helpers_8h.xhtml#adbdf2ca9e8fe0b67f9359929ef743126">clamp_to_border</a></div><div class="ttdeci">const float8 clamp_to_border(float8 coords, const float width, const float height)</div><div class="ttdoc">Clamps the given coordinates to the borders. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00033">warp_helpers.h:33</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000436<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>
Kaizenbf8b01d2017-10-12 14:26:51 +0100437<div class="ttc" id="helpers_8h_xhtml_a4334a4a76f8e9628c0fb9e1acf616e2a"><div class="ttname"><a href="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="helpers_8h_source.xhtml#l00099">helpers.h:99</a></div></div>
438<div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="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="helpers_8h_source.xhtml#l00096">helpers.h:96</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000439<div class="ttc" id="scale_8cl_xhtml_a55c710b814464d9b8982c4eb6ca04dee"><div class="ttname"><a href="scale_8cl.xhtml#a55c710b814464d9b8982c4eb6ca04dee">transform_nearest</a></div><div class="ttdeci">const float8 transform_nearest(const float2 coord, const float2 scale)</div><div class="ttdoc">Transforms four 2D coordinates. </div><div class="ttdef"><b>Definition:</b> <a href="scale_8cl_source.xhtml#l00034">scale.cl:34</a></div></div>
Kaizenbf8b01d2017-10-12 14:26:51 +0100440<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="helpers_8h_source.xhtml#l00134">helpers.h:134</a></div></div>
441<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="helpers_8h_source.xhtml#l00136">helpers.h:136</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000442<div class="ttc" id="warp__helpers_8h_xhtml_aba42442a4c991cdbb52727fa370676f1"><div class="ttname"><a href="warp__helpers_8h.xhtml#aba42442a4c991cdbb52727fa370676f1">read_texels4</a></div><div class="ttdeci">const DATA_TYPE4 read_texels4(const Image *in, const int8 coords)</div><div class="ttdoc">Reads four texels from the input image. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00045">warp_helpers.h:45</a></div></div>
443<div class="ttc" id="warp__helpers_8h_xhtml_a4caaeeb51ea58015267a9974675226d1"><div class="ttname"><a href="warp__helpers_8h.xhtml#a4caaeeb51ea58015267a9974675226d1">get_current_coords</a></div><div class="ttdeci">const float2 get_current_coords()</div><div class="ttdoc">Returns the current thread coordinates. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00054">warp_helpers.h:54</a></div></div>
444</div><!-- fragment -->
445</div>
446</div>
447<a class="anchor" id="a1990e87858b15b8fce3f63965fb9b86c"></a>
448<div class="memitem">
449<div class="memproto">
450<table class="mlabels">
451 <tr>
452 <td class="mlabels-left">
453 <table class="memname">
454 <tr>
455 <td class="memname">const float8 transform_bilinear </td>
456 <td>(</td>
457 <td class="paramtype">const float2&#160;</td>
458 <td class="paramname"><em>coord</em>, </td>
459 </tr>
460 <tr>
461 <td class="paramkey"></td>
462 <td></td>
463 <td class="paramtype">const float2&#160;</td>
464 <td class="paramname"><em>scale</em>&#160;</td>
465 </tr>
466 <tr>
467 <td></td>
468 <td>)</td>
469 <td></td><td></td>
470 </tr>
471 </table>
472 </td>
473 <td class="mlabels-right">
474<span class="mlabels"><span class="mlabel">inline</span></span> </td>
475 </tr>
476</table>
477</div><div class="memdoc">
478
479<p>Transforms four 2D coordinates. </p>
480<p>This is used to map the output coordinates to the input coordinates.</p>
481<dl class="params"><dt>Parameters</dt><dd>
482 <table class="params">
483 <tr><td class="paramdir">[in]</td><td class="paramname">coord</td><td>2D coordinates to transform. </td></tr>
484 <tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>input/output scale ratio</td></tr>
485 </table>
486 </dd>
487</dl>
488<dl class="section return"><dt>Returns</dt><dd>a float8 containing 4 2D transformed values in the input image. </dd></dl>
489
490<p>Definition at line <a class="el" href="scale_8cl_source.xhtml#l00049">49</a> of file <a class="el" href="scale_8cl_source.xhtml">scale.cl</a>.</p>
491
492<p>Referenced by <a class="el" href="scale_8cl_source.xhtml#l00110">scale_bilinear()</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100493<div class="fragment"><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;{</div>
494<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="keyword">const</span> float4 in_x_coords = (float4)(coord.s0, 1 + coord.s0, 2 + coord.s0, 3 + coord.s0);</div>
495<div class="line"><a name="l00052"></a><span class="lineno"> 52</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_1_1reference.xhtml#a2c08fc82f2e4b9733cd0dacd6eabe579">scale</a>.s0) - (float4)(0.5f);</div>
496<div class="line"><a name="l00053"></a><span class="lineno"> 53</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_1_1reference.xhtml#a2c08fc82f2e4b9733cd0dacd6eabe579">scale</a>.s1 - 0.5f);</div>
497<div class="line"><a name="l00054"></a><span class="lineno"> 54</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>
498<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;}</div>
499<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_1_1reference_xhtml_a2c08fc82f2e4b9733cd0dacd6eabe579"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a2c08fc82f2e4b9733cd0dacd6eabe579">arm_compute::test::validation::reference::scale</a></div><div class="ttdeci">SimpleTensor&lt; T &gt; scale(const SimpleTensor&lt; T &gt; &amp;in, float scale_x, float scale_y, InterpolationPolicy policy, BorderMode border_mode, T constant_border_value)</div><div class="ttdef"><b>Definition:</b> <a href="_c_p_p_2_scale_8cpp_source.xhtml#l00039">Scale.cpp:39</a></div></div>
500</div><!-- fragment -->
Anthony Barbier871448e2017-03-24 14:54:29 +0000501</div>
502</div>
503<a class="anchor" id="a55c710b814464d9b8982c4eb6ca04dee"></a>
504<div class="memitem">
505<div class="memproto">
506<table class="mlabels">
507 <tr>
508 <td class="mlabels-left">
509 <table class="memname">
510 <tr>
511 <td class="memname">const float8 transform_nearest </td>
512 <td>(</td>
513 <td class="paramtype">const float2&#160;</td>
514 <td class="paramname"><em>coord</em>, </td>
515 </tr>
516 <tr>
517 <td class="paramkey"></td>
518 <td></td>
519 <td class="paramtype">const float2&#160;</td>
520 <td class="paramname"><em>scale</em>&#160;</td>
521 </tr>
522 <tr>
523 <td></td>
524 <td>)</td>
525 <td></td><td></td>
526 </tr>
527 </table>
528 </td>
529 <td class="mlabels-right">
530<span class="mlabels"><span class="mlabel">inline</span></span> </td>
531 </tr>
532</table>
533</div><div class="memdoc">
534
535<p>Transforms four 2D coordinates. </p>
536<p>This is used to map the output coordinates to the input coordinates.</p>
537<dl class="params"><dt>Parameters</dt><dd>
538 <table class="params">
539 <tr><td class="paramdir">[in]</td><td class="paramname">coord</td><td>2D coordinates to transform. </td></tr>
540 <tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>input/output scale ratio</td></tr>
541 </table>
542 </dd>
543</dl>
544<dl class="section return"><dt>Returns</dt><dd>a float8 containing 4 2D transformed values in the input image. </dd></dl>
545
546<p>Definition at line <a class="el" href="scale_8cl_source.xhtml#l00034">34</a> of file <a class="el" href="scale_8cl_source.xhtml">scale.cl</a>.</p>
547
548<p>Referenced by <a class="el" href="scale_8cl_source.xhtml#l00076">scale_nearest_neighbour()</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100549<div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;{</div>
550<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>
551<div class="line"><a name="l00037"></a><span class="lineno"> 37</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_1_1reference.xhtml#a2c08fc82f2e4b9733cd0dacd6eabe579">scale</a>.s0);</div>
552<div class="line"><a name="l00038"></a><span class="lineno"> 38</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_1_1reference.xhtml#a2c08fc82f2e4b9733cd0dacd6eabe579">scale</a>.s1);</div>
553<div class="line"><a name="l00039"></a><span class="lineno"> 39</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>
554<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;}</div>
555<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_1_1reference_xhtml_a2c08fc82f2e4b9733cd0dacd6eabe579"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a2c08fc82f2e4b9733cd0dacd6eabe579">arm_compute::test::validation::reference::scale</a></div><div class="ttdeci">SimpleTensor&lt; T &gt; scale(const SimpleTensor&lt; T &gt; &amp;in, float scale_x, float scale_y, InterpolationPolicy policy, BorderMode border_mode, T constant_border_value)</div><div class="ttdef"><b>Definition:</b> <a href="_c_p_p_2_scale_8cpp_source.xhtml#l00039">Scale.cpp:39</a></div></div>
556</div><!-- fragment -->
Anthony Barbier871448e2017-03-24 14:54:29 +0000557</div>
558</div>
559</div><!-- contents -->
560</div><!-- doc-content -->
561<!-- start footer part -->
562<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
563 <ul>
Kaizen8938bd32017-09-28 14:38:23 +0100564 <li class="navelem"><a class="el" href="dir_55b5a5006e943fb664ff8cff3cfe7768.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_f6c3ae42d7e27145d0a3c3e38ca1c000.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_1b7ae9123c88e650426d50d95c19d414.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_b7c3d80b0dadb2139bc73b7161751c12.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="scale_8cl.xhtml">scale.cl</a></li>
Kaizenbf8b01d2017-10-12 14:26:51 +0100565 <li class="footer">Generated on Thu Oct 12 2017 14:26:35 for Compute Library by
Anthony Barbier871448e2017-03-24 14:54:29 +0000566 <a href="http://www.doxygen.org/index.html">
Kaizen8938bd32017-09-28 14:38:23 +0100567 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000568 </ul>
569</div>
570</body>
571</html>