Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 1 | <!-- HTML header for doxygen 1.8.9.1--> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 6 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 7 | <meta name="generator" content="Doxygen 1.8.13"/> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 8 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines --> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 9 | <title>Compute Library: src/core/CL/cl_kernels/scale.cl File Reference</title> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 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> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 15 | <script type="text/javascript" src="navtreedata.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 16 | <script type="text/javascript" src="navtree.js"></script> |
| 17 | <script type="text/javascript"> |
| 18 | $(document).ready(initResizable); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 19 | </script> |
| 20 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 21 | <script type="text/javascript" src="search/searchdata.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 22 | <script type="text/javascript" src="search/search.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 23 | <script type="text/x-mathjax-config"> |
| 24 | MathJax.Hub.Config({ |
| 25 | extensions: ["tex2jax.js"], |
| 26 | jax: ["input/TeX","output/HTML-CSS"], |
| 27 | }); |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 28 | </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 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;"> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 38 | <div id="projectname">Compute Library |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 39 |  <span id="projectnumber">18.11</span> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 40 | </div> |
| 41 | </td> |
| 42 | </tr> |
| 43 | </tbody> |
| 44 | </table> |
| 45 | </div> |
| 46 | <!-- end header part --> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 47 | <!-- Generated by Doxygen 1.8.13 --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 48 | <script type="text/javascript"> |
| 49 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 50 | </script> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 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> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 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_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)"> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 80 | </div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 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.cl File Reference</div> </div> |
| 94 | </div><!--header--> |
| 95 | <div class="contents"> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 96 | <div class="textblock"><code>#include "<a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml">helpers.h</a>"</code><br /> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 97 | <code>#include "<a class="el" href="warp__helpers_8h_source.xhtml">warp_helpers.h</a>"</code><br /> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 98 | </div> |
| 99 | <p><a href="scale_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> |
| 102 | Functions</h2></td></tr> |
| 103 | <tr class="memitem:a55c710b814464d9b8982c4eb6ca04dee"><td class="memItemLeft" align="right" valign="top">const float8 </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> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 104 | <tr class="memdesc:a55c710b814464d9b8982c4eb6ca04dee"><td class="mdescLeft"> </td><td class="mdescRight">Transforms four 2D coordinates. <a href="#a55c710b814464d9b8982c4eb6ca04dee">More...</a><br /></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 105 | <tr class="separator:a55c710b814464d9b8982c4eb6ca04dee"><td class="memSeparator" colspan="2"> </td></tr> |
| 106 | <tr class="memitem:a1990e87858b15b8fce3f63965fb9b86c"><td class="memItemLeft" align="right" valign="top">const float8 </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> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 107 | <tr class="memdesc:a1990e87858b15b8fce3f63965fb9b86c"><td class="mdescLeft"> </td><td class="mdescRight">Transforms four 2D coordinates. <a href="#a1990e87858b15b8fce3f63965fb9b86c">More...</a><br /></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 108 | <tr class="separator:a1990e87858b15b8fce3f63965fb9b86c"><td class="memSeparator" colspan="2"> </td></tr> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 109 | <tr class="memitem:ab0d36306b50e1c7961dfa9337d73ecbb"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="scale_8cl.xhtml#ab0d36306b50e1c7961dfa9337d73ecbb">scale_nearest_neighbour_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> |
| 110 | <tr class="memdesc:ab0d36306b50e1c7961dfa9337d73ecbb"><td class="mdescLeft"> </td><td class="mdescRight">Performs an affine transformation on an image interpolating with the NEAREAST NEIGHBOUR method. <a href="#ab0d36306b50e1c7961dfa9337d73ecbb">More...</a><br /></td></tr> |
| 111 | <tr class="separator:ab0d36306b50e1c7961dfa9337d73ecbb"><td class="memSeparator" colspan="2"> </td></tr> |
| 112 | <tr class="memitem:a8721515bc3a5bd5c2c07c71680836989"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="scale_8cl.xhtml#a8721515bc3a5bd5c2c07c71680836989">scale_bilinear_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> |
| 113 | <tr class="memdesc:a8721515bc3a5bd5c2c07c71680836989"><td class="mdescLeft"> </td><td class="mdescRight">Performs an affine transformation on an image interpolating with the BILINEAR method. <a href="#a8721515bc3a5bd5c2c07c71680836989">More...</a><br /></td></tr> |
| 114 | <tr class="separator:a8721515bc3a5bd5c2c07c71680836989"><td class="memSeparator" colspan="2"> </td></tr> |
| 115 | <tr class="memitem:a2216ff8602b48932fb95cdc3d02c8bba"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="scale_8cl.xhtml#a2216ff8602b48932fb95cdc3d02c8bba">scale_nearest_neighbour_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> |
| 116 | <tr class="memdesc:a2216ff8602b48932fb95cdc3d02c8bba"><td class="mdescLeft"> </td><td class="mdescRight">Performs scale on an image interpolating with the NEAREAST NEIGHBOUR method. <a href="#a2216ff8602b48932fb95cdc3d02c8bba">More...</a><br /></td></tr> |
| 117 | <tr class="separator:a2216ff8602b48932fb95cdc3d02c8bba"><td class="memSeparator" colspan="2"> </td></tr> |
| 118 | <tr class="memitem:ac0b6964599b54e3488b5ce8e294b67cc"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="scale_8cl.xhtml#ac0b6964599b54e3488b5ce8e294b67cc">scale_bilinear_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> |
| 119 | <tr class="memdesc:ac0b6964599b54e3488b5ce8e294b67cc"><td class="mdescLeft"> </td><td class="mdescRight">Performs scale on an image interpolating with the BILINEAR method. <a href="#ac0b6964599b54e3488b5ce8e294b67cc">More...</a><br /></td></tr> |
| 120 | <tr class="separator:ac0b6964599b54e3488b5ce8e294b67cc"><td class="memSeparator" colspan="2"> </td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 121 | </table> |
| 122 | <h2 class="groupheader">Function Documentation</h2> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 123 | <a id="a8721515bc3a5bd5c2c07c71680836989"></a> |
| 124 | <h2 class="memtitle"><span class="permalink"><a href="#a8721515bc3a5bd5c2c07c71680836989">◆ </a></span>scale_bilinear_nchw()</h2> |
| 125 | |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 126 | <div class="memitem"> |
| 127 | <div class="memproto"> |
| 128 | <table class="memname"> |
| 129 | <tr> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 130 | <td class="memname">__kernel void scale_bilinear_nchw </td> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 131 | <td>(</td> |
| 132 | <td class="paramtype">__global uchar * </td> |
| 133 | <td class="paramname"><em>in_ptr</em>, </td> |
| 134 | </tr> |
| 135 | <tr> |
| 136 | <td class="paramkey"></td> |
| 137 | <td></td> |
| 138 | <td class="paramtype">uint </td> |
| 139 | <td class="paramname"><em>in_stride_x</em>, </td> |
| 140 | </tr> |
| 141 | <tr> |
| 142 | <td class="paramkey"></td> |
| 143 | <td></td> |
| 144 | <td class="paramtype">uint </td> |
| 145 | <td class="paramname"><em>in_step_x</em>, </td> |
| 146 | </tr> |
| 147 | <tr> |
| 148 | <td class="paramkey"></td> |
| 149 | <td></td> |
| 150 | <td class="paramtype">uint </td> |
| 151 | <td class="paramname"><em>in_stride_y</em>, </td> |
| 152 | </tr> |
| 153 | <tr> |
| 154 | <td class="paramkey"></td> |
| 155 | <td></td> |
| 156 | <td class="paramtype">uint </td> |
| 157 | <td class="paramname"><em>in_step_y</em>, </td> |
| 158 | </tr> |
| 159 | <tr> |
| 160 | <td class="paramkey"></td> |
| 161 | <td></td> |
| 162 | <td class="paramtype">uint </td> |
| 163 | <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td> |
| 164 | </tr> |
| 165 | <tr> |
| 166 | <td class="paramkey"></td> |
| 167 | <td></td> |
| 168 | <td class="paramtype">__global uchar * </td> |
| 169 | <td class="paramname"><em>out_ptr</em>, </td> |
| 170 | </tr> |
| 171 | <tr> |
| 172 | <td class="paramkey"></td> |
| 173 | <td></td> |
| 174 | <td class="paramtype">uint </td> |
| 175 | <td class="paramname"><em>out_stride_x</em>, </td> |
| 176 | </tr> |
| 177 | <tr> |
| 178 | <td class="paramkey"></td> |
| 179 | <td></td> |
| 180 | <td class="paramtype">uint </td> |
| 181 | <td class="paramname"><em>out_step_x</em>, </td> |
| 182 | </tr> |
| 183 | <tr> |
| 184 | <td class="paramkey"></td> |
| 185 | <td></td> |
| 186 | <td class="paramtype">uint </td> |
| 187 | <td class="paramname"><em>out_stride_y</em>, </td> |
| 188 | </tr> |
| 189 | <tr> |
| 190 | <td class="paramkey"></td> |
| 191 | <td></td> |
| 192 | <td class="paramtype">uint </td> |
| 193 | <td class="paramname"><em>out_step_y</em>, </td> |
| 194 | </tr> |
| 195 | <tr> |
| 196 | <td class="paramkey"></td> |
| 197 | <td></td> |
| 198 | <td class="paramtype">uint </td> |
| 199 | <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td> |
| 200 | </tr> |
| 201 | <tr> |
| 202 | <td class="paramkey"></td> |
| 203 | <td></td> |
| 204 | <td class="paramtype">const float </td> |
| 205 | <td class="paramname"><em>input_width</em>, </td> |
| 206 | </tr> |
| 207 | <tr> |
| 208 | <td class="paramkey"></td> |
| 209 | <td></td> |
| 210 | <td class="paramtype">const float </td> |
| 211 | <td class="paramname"><em>input_height</em>, </td> |
| 212 | </tr> |
| 213 | <tr> |
| 214 | <td class="paramkey"></td> |
| 215 | <td></td> |
| 216 | <td class="paramtype">const float </td> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 217 | <td class="paramname"><em>scale_x</em>, </td> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 218 | </tr> |
| 219 | <tr> |
| 220 | <td class="paramkey"></td> |
| 221 | <td></td> |
| 222 | <td class="paramtype">const float </td> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 223 | <td class="paramname"><em>scale_y</em> </td> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 224 | </tr> |
| 225 | <tr> |
| 226 | <td></td> |
| 227 | <td>)</td> |
| 228 | <td></td><td></td> |
| 229 | </tr> |
| 230 | </table> |
| 231 | </div><div class="memdoc"> |
| 232 | |
| 233 | <p>Performs an affine transformation on an image interpolating with the BILINEAR method. </p> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 234 | <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></dl> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 235 | <dl class="params"><dt>Parameters</dt><dd> |
| 236 | <table class="params"> |
| 237 | <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> |
| 238 | <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> |
| 239 | <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> |
| 240 | <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> |
| 241 | <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> |
| 242 | <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> |
| 243 | <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> |
| 244 | <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> |
| 245 | <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> |
| 246 | <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> |
| 247 | <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> |
| 248 | <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> |
| 249 | <tr><td class="paramdir">[in]</td><td class="paramname">input_width</td><td>Input image width </td></tr> |
| 250 | <tr><td class="paramdir">[in]</td><td class="paramname">input_height</td><td>Input image height </td></tr> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 251 | <tr><td class="paramdir">[in]</td><td class="paramname">scale_x</td><td>The scale factor along x dimension </td></tr> |
| 252 | <tr><td class="paramdir">[in]</td><td class="paramname">scale_y</td><td>The scale factor along y dimension </td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 253 | </table> |
| 254 | </dd> |
| 255 | </dl> |
| 256 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 257 | <p class="definition">Definition at line <a class="el" href="scale_8cl_source.xhtml#l00122">122</a> of file <a class="el" href="scale_8cl_source.xhtml">scale.cl</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 258 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 259 | <p class="reference">References <a class="el" href="warp__helpers_8h_source.xhtml#l00095">bilinear_interpolate_with_border()</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_8h_source.xhtml#l00068">get_current_coords()</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_8cl_source.xhtml#l00049">transform_bilinear()</a>.</p> |
| 260 | <div class="fragment"><div class="line"><a name="l00129"></a><span class="lineno"> 129</span> {</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <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="l00131"></a><span class="lineno"> 131</span>  <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="l00132"></a><span class="lineno"> 132</span>  <span class="keyword">const</span> float2 r = (float2)(scale_x, scale_y);</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <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><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  vstore4(<a class="code" href="warp__helpers_8h.xhtml#a8eda58d341afa44da00ebf47f9349499">bilinear_interpolate_with_border</a>(&in, tc, input_width, input_height, BORDER_SIZE), 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="l00135"></a><span class="lineno"> 135</span> }</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> |
| 261 | <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> |
| 262 | <div class="ttc" id="warp__helpers_8h_xhtml_a8eda58d341afa44da00ebf47f9349499"><div class="ttname"><a href="warp__helpers_8h.xhtml#a8eda58d341afa44da00ebf47f9349499">bilinear_interpolate_with_border</a></div><div class="ttdeci">const DATA_TYPE4 bilinear_interpolate_with_border(const Image *in, const float8 coords, const float width, const float height, const float border_size)</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#l00095">warp_helpers.h:95</a></div></div> |
| 263 | <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> |
| 264 | <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> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 265 | <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> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 266 | <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> |
| 267 | <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> |
| 268 | <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> |
| 269 | <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#l00068">warp_helpers.h:68</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 270 | </div><!-- fragment --> |
| 271 | </div> |
| 272 | </div> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 273 | <a id="ac0b6964599b54e3488b5ce8e294b67cc"></a> |
| 274 | <h2 class="memtitle"><span class="permalink"><a href="#ac0b6964599b54e3488b5ce8e294b67cc">◆ </a></span>scale_bilinear_nhwc()</h2> |
| 275 | |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 276 | <div class="memitem"> |
| 277 | <div class="memproto"> |
| 278 | <table class="memname"> |
| 279 | <tr> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 280 | <td class="memname">__kernel void scale_bilinear_nhwc </td> |
| 281 | <td>(</td> |
| 282 | <td class="paramtype">__global uchar * </td> |
| 283 | <td class="paramname"><em>in_ptr</em>, </td> |
| 284 | </tr> |
| 285 | <tr> |
| 286 | <td class="paramkey"></td> |
| 287 | <td></td> |
| 288 | <td class="paramtype">uint </td> |
| 289 | <td class="paramname"><em>in_stride_x</em>, </td> |
| 290 | </tr> |
| 291 | <tr> |
| 292 | <td class="paramkey"></td> |
| 293 | <td></td> |
| 294 | <td class="paramtype">uint </td> |
| 295 | <td class="paramname"><em>in_step_x</em>, </td> |
| 296 | </tr> |
| 297 | <tr> |
| 298 | <td class="paramkey"></td> |
| 299 | <td></td> |
| 300 | <td class="paramtype">uint </td> |
| 301 | <td class="paramname"><em>in_stride_y</em>, </td> |
| 302 | </tr> |
| 303 | <tr> |
| 304 | <td class="paramkey"></td> |
| 305 | <td></td> |
| 306 | <td class="paramtype">uint </td> |
| 307 | <td class="paramname"><em>in_step_y</em>, </td> |
| 308 | </tr> |
| 309 | <tr> |
| 310 | <td class="paramkey"></td> |
| 311 | <td></td> |
| 312 | <td class="paramtype">uint </td> |
| 313 | <td class="paramname"><em>in_stride_z</em>, </td> |
| 314 | </tr> |
| 315 | <tr> |
| 316 | <td class="paramkey"></td> |
| 317 | <td></td> |
| 318 | <td class="paramtype">uint </td> |
| 319 | <td class="paramname"><em>in_step_z</em>, </td> |
| 320 | </tr> |
| 321 | <tr> |
| 322 | <td class="paramkey"></td> |
| 323 | <td></td> |
| 324 | <td class="paramtype">uint </td> |
| 325 | <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td> |
| 326 | </tr> |
| 327 | <tr> |
| 328 | <td class="paramkey"></td> |
| 329 | <td></td> |
| 330 | <td class="paramtype">__global uchar * </td> |
| 331 | <td class="paramname"><em>out_ptr</em>, </td> |
| 332 | </tr> |
| 333 | <tr> |
| 334 | <td class="paramkey"></td> |
| 335 | <td></td> |
| 336 | <td class="paramtype">uint </td> |
| 337 | <td class="paramname"><em>out_stride_x</em>, </td> |
| 338 | </tr> |
| 339 | <tr> |
| 340 | <td class="paramkey"></td> |
| 341 | <td></td> |
| 342 | <td class="paramtype">uint </td> |
| 343 | <td class="paramname"><em>out_step_x</em>, </td> |
| 344 | </tr> |
| 345 | <tr> |
| 346 | <td class="paramkey"></td> |
| 347 | <td></td> |
| 348 | <td class="paramtype">uint </td> |
| 349 | <td class="paramname"><em>out_stride_y</em>, </td> |
| 350 | </tr> |
| 351 | <tr> |
| 352 | <td class="paramkey"></td> |
| 353 | <td></td> |
| 354 | <td class="paramtype">uint </td> |
| 355 | <td class="paramname"><em>out_step_y</em>, </td> |
| 356 | </tr> |
| 357 | <tr> |
| 358 | <td class="paramkey"></td> |
| 359 | <td></td> |
| 360 | <td class="paramtype">uint </td> |
| 361 | <td class="paramname"><em>out_stride_z</em>, </td> |
| 362 | </tr> |
| 363 | <tr> |
| 364 | <td class="paramkey"></td> |
| 365 | <td></td> |
| 366 | <td class="paramtype">uint </td> |
| 367 | <td class="paramname"><em>out_step_z</em>, </td> |
| 368 | </tr> |
| 369 | <tr> |
| 370 | <td class="paramkey"></td> |
| 371 | <td></td> |
| 372 | <td class="paramtype">uint </td> |
| 373 | <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td> |
| 374 | </tr> |
| 375 | <tr> |
| 376 | <td class="paramkey"></td> |
| 377 | <td></td> |
| 378 | <td class="paramtype">const float </td> |
| 379 | <td class="paramname"><em>input_width</em>, </td> |
| 380 | </tr> |
| 381 | <tr> |
| 382 | <td class="paramkey"></td> |
| 383 | <td></td> |
| 384 | <td class="paramtype">const float </td> |
| 385 | <td class="paramname"><em>input_height</em>, </td> |
| 386 | </tr> |
| 387 | <tr> |
| 388 | <td class="paramkey"></td> |
| 389 | <td></td> |
| 390 | <td class="paramtype">const float </td> |
| 391 | <td class="paramname"><em>scale_x</em>, </td> |
| 392 | </tr> |
| 393 | <tr> |
| 394 | <td class="paramkey"></td> |
| 395 | <td></td> |
| 396 | <td class="paramtype">const float </td> |
| 397 | <td class="paramname"><em>scale_y</em> </td> |
| 398 | </tr> |
| 399 | <tr> |
| 400 | <td></td> |
| 401 | <td>)</td> |
| 402 | <td></td><td></td> |
| 403 | </tr> |
| 404 | </table> |
| 405 | </div><div class="memdoc"> |
| 406 | |
| 407 | <p>Performs scale on an image interpolating with the BILINEAR method. </p> |
| 408 | <p>(NHWC)</p> |
| 409 | <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> |
| 410 | <dd> |
| 411 | If border mode replicate is used, is should be passed as -DBORDER_MODE_REPLICATE</dd></dl> |
| 412 | <dl class="params"><dt>Parameters</dt><dd> |
| 413 | <table class="params"> |
| 414 | <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: U8/S16/F16/F32. </td></tr> |
| 415 | <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> |
| 416 | <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> |
| 417 | <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> |
| 418 | <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> |
| 419 | <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> |
| 420 | <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> |
| 421 | <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> |
| 422 | <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> |
| 423 | <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> |
| 424 | <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> |
| 425 | <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> |
| 426 | <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> |
| 427 | <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> |
| 428 | <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> |
| 429 | <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> |
| 430 | <tr><td class="paramdir">[in]</td><td class="paramname">input_width</td><td>Input image width </td></tr> |
| 431 | <tr><td class="paramdir">[in]</td><td class="paramname">input_height</td><td>Input image height </td></tr> |
| 432 | <tr><td class="paramdir">[in]</td><td class="paramname">scale_x</td><td>The scale factor along x dimension </td></tr> |
| 433 | <tr><td class="paramdir">[in]</td><td class="paramname">scale_y</td><td>The scale factor along y dimension </td></tr> |
| 434 | </table> |
| 435 | </dd> |
| 436 | </dl> |
| 437 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 438 | <p class="definition">Definition at line <a class="el" href="scale_8cl_source.xhtml#l00207">207</a> of file <a class="el" href="scale_8cl_source.xhtml">scale.cl</a>.</p> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 439 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 440 | <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#l00060">CONVERT</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> |
| 441 | <div class="fragment"><div class="line"><a name="l00214"></a><span class="lineno"> 214</span> {</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <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="l00216"></a><span class="lineno"> 216</span>  <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="l00217"></a><span class="lineno"> 217</span> </div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span> <span class="preprocessor">#ifdef SAMPLING_POLICY_TOP_LEFT</span></div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> new_x = get_global_id(1) * scale_x;</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> new_y = get_global_id(2) * scale_y;</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span> <span class="preprocessor">#elif SAMPLING_POLICY_CENTER</span></div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <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="l00223"></a><span class="lineno"> 223</span>  <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="l00224"></a><span class="lineno"> 224</span> <span class="preprocessor">#else </span><span class="comment">/* SAMPLING_POLICY */</span><span class="preprocessor"></span></div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span> <span class="preprocessor">#error("Unsupported sampling policy");</span></div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span> <span class="preprocessor">#endif </span><span class="comment">/* SAMPLING_POLICY */</span><span class="preprocessor"></span></div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span> </div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> new_xf = floor(new_x);</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> new_yf = floor(new_y);</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <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="l00231"></a><span class="lineno"> 231</span>  <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="l00232"></a><span class="lineno"> 232</span>  <span class="keywordtype">float</span> clamped_x_ = clamped_x;</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <span class="keywordtype">float</span> clamped_x1_ = clamped_x1;</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <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="l00235"></a><span class="lineno"> 235</span>  <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="l00236"></a><span class="lineno"> 236</span> </div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span> <span class="preprocessor">#ifndef BORDER_MODE_REPLICATE</span></div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  clamped_x1 = select(clamped_x1, 0.0f - BORDER_SIZE, new_yf + 1 < 0.f || new_yf + 1 > input_height - 1 || new_xf + 1 < 0.f || new_xf + 1 > input_width - 1);</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  clamped_x_ = select(clamped_x_, 0.0f - BORDER_SIZE, new_yf + 1 > input_height - 1 || new_xf < 0.f || new_xf > input_width - 1);</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  clamped_x = select(clamped_x, 0.0f - BORDER_SIZE, new_yf < 0.f || new_yf > input_height - 1 || new_xf < 0.f || new_xf > input_width - 1);</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  clamped_x1_ = select(clamped_x1_, 0.0f - BORDER_SIZE, new_xf + 1 < 0.f || new_xf + 1 > input_width - 1 || new_yf < 0.f || new_yf > input_height - 1);</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span> <span class="preprocessor">#endif </span><span class="comment">/* BORDER_MODE_REPLICATE */</span><span class="preprocessor"></span></div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span> </div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  float4 ins = (float4)(*((__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>(&in, get_global_id(0), convert_int(clamped_x), convert_int(clamped_y))),</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  *((__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>(&in, get_global_id(0), convert_int(clamped_x1_), convert_int(clamped_y))),</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  *((__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>(&in, get_global_id(0), convert_int(clamped_x_), convert_int(clamped_y1))),</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  *((__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>(&in, get_global_id(0), convert_int(clamped_x1), convert_int(clamped_y1))));</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span> </div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <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="l00250"></a><span class="lineno"> 250</span>  <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="l00251"></a><span class="lineno"> 251</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> a1 = new_y - new_yf;</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> b1 = 1.f - a1;</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> fr = ((ins.s0 * b * b1) + (ins.s1 * a * b1) + (ins.s2 * b * a1) + (ins.s3 * a * a1));</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span> </div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)out.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(fr, <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>);</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span> }</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aa8d95ba04fc73845abc6045952cae5be"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a></div><div class="ttdeci">#define CONVERT(x, type)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00060">helpers.h:60</a></div></div> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 442 | <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 & 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> |
| 443 | <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> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 444 | <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> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 445 | <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 &n, const T &lower, const T &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> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 446 | <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> |
| 447 | <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> |
| 448 | <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> |
| 449 | <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> |
| 450 | <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> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 451 | <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> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 452 | <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> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 453 | </div><!-- fragment --> |
| 454 | </div> |
| 455 | </div> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 456 | <a id="ab0d36306b50e1c7961dfa9337d73ecbb"></a> |
| 457 | <h2 class="memtitle"><span class="permalink"><a href="#ab0d36306b50e1c7961dfa9337d73ecbb">◆ </a></span>scale_nearest_neighbour_nchw()</h2> |
| 458 | |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 459 | <div class="memitem"> |
| 460 | <div class="memproto"> |
| 461 | <table class="memname"> |
| 462 | <tr> |
| 463 | <td class="memname">__kernel void scale_nearest_neighbour_nchw </td> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 464 | <td>(</td> |
| 465 | <td class="paramtype">__global uchar * </td> |
| 466 | <td class="paramname"><em>in_ptr</em>, </td> |
| 467 | </tr> |
| 468 | <tr> |
| 469 | <td class="paramkey"></td> |
| 470 | <td></td> |
| 471 | <td class="paramtype">uint </td> |
| 472 | <td class="paramname"><em>in_stride_x</em>, </td> |
| 473 | </tr> |
| 474 | <tr> |
| 475 | <td class="paramkey"></td> |
| 476 | <td></td> |
| 477 | <td class="paramtype">uint </td> |
| 478 | <td class="paramname"><em>in_step_x</em>, </td> |
| 479 | </tr> |
| 480 | <tr> |
| 481 | <td class="paramkey"></td> |
| 482 | <td></td> |
| 483 | <td class="paramtype">uint </td> |
| 484 | <td class="paramname"><em>in_stride_y</em>, </td> |
| 485 | </tr> |
| 486 | <tr> |
| 487 | <td class="paramkey"></td> |
| 488 | <td></td> |
| 489 | <td class="paramtype">uint </td> |
| 490 | <td class="paramname"><em>in_step_y</em>, </td> |
| 491 | </tr> |
| 492 | <tr> |
| 493 | <td class="paramkey"></td> |
| 494 | <td></td> |
| 495 | <td class="paramtype">uint </td> |
| 496 | <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td> |
| 497 | </tr> |
| 498 | <tr> |
| 499 | <td class="paramkey"></td> |
| 500 | <td></td> |
| 501 | <td class="paramtype">__global uchar * </td> |
| 502 | <td class="paramname"><em>out_ptr</em>, </td> |
| 503 | </tr> |
| 504 | <tr> |
| 505 | <td class="paramkey"></td> |
| 506 | <td></td> |
| 507 | <td class="paramtype">uint </td> |
| 508 | <td class="paramname"><em>out_stride_x</em>, </td> |
| 509 | </tr> |
| 510 | <tr> |
| 511 | <td class="paramkey"></td> |
| 512 | <td></td> |
| 513 | <td class="paramtype">uint </td> |
| 514 | <td class="paramname"><em>out_step_x</em>, </td> |
| 515 | </tr> |
| 516 | <tr> |
| 517 | <td class="paramkey"></td> |
| 518 | <td></td> |
| 519 | <td class="paramtype">uint </td> |
| 520 | <td class="paramname"><em>out_stride_y</em>, </td> |
| 521 | </tr> |
| 522 | <tr> |
| 523 | <td class="paramkey"></td> |
| 524 | <td></td> |
| 525 | <td class="paramtype">uint </td> |
| 526 | <td class="paramname"><em>out_step_y</em>, </td> |
| 527 | </tr> |
| 528 | <tr> |
| 529 | <td class="paramkey"></td> |
| 530 | <td></td> |
| 531 | <td class="paramtype">uint </td> |
| 532 | <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td> |
| 533 | </tr> |
| 534 | <tr> |
| 535 | <td class="paramkey"></td> |
| 536 | <td></td> |
| 537 | <td class="paramtype">const float </td> |
| 538 | <td class="paramname"><em>input_width</em>, </td> |
| 539 | </tr> |
| 540 | <tr> |
| 541 | <td class="paramkey"></td> |
| 542 | <td></td> |
| 543 | <td class="paramtype">const float </td> |
| 544 | <td class="paramname"><em>input_height</em>, </td> |
| 545 | </tr> |
| 546 | <tr> |
| 547 | <td class="paramkey"></td> |
| 548 | <td></td> |
| 549 | <td class="paramtype">const float </td> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 550 | <td class="paramname"><em>scale_x</em>, </td> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 551 | </tr> |
| 552 | <tr> |
| 553 | <td class="paramkey"></td> |
| 554 | <td></td> |
| 555 | <td class="paramtype">const float </td> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 556 | <td class="paramname"><em>scale_y</em> </td> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 557 | </tr> |
| 558 | <tr> |
| 559 | <td></td> |
| 560 | <td>)</td> |
| 561 | <td></td><td></td> |
| 562 | </tr> |
| 563 | </table> |
| 564 | </div><div class="memdoc"> |
| 565 | |
| 566 | <p>Performs an affine transformation on an image interpolating with the NEAREAST NEIGHBOUR method. </p> |
| 567 | <p>Input and output are single channel U8 or S16.</p> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 568 | <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></dl> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 569 | <dl class="params"><dt>Parameters</dt><dd> |
| 570 | <table class="params"> |
| 571 | <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> |
| 572 | <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> |
| 573 | <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> |
| 574 | <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> |
| 575 | <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> |
| 576 | <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> |
| 577 | <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> |
| 578 | <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> |
| 579 | <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> |
| 580 | <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> |
| 581 | <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> |
| 582 | <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> |
| 583 | <tr><td class="paramdir">[in]</td><td class="paramname">input_width</td><td>Input image width </td></tr> |
| 584 | <tr><td class="paramdir">[in]</td><td class="paramname">input_height</td><td>Input image height </td></tr> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 585 | <tr><td class="paramdir">[in]</td><td class="paramname">scale_x</td><td>The scale factor along x dimension </td></tr> |
| 586 | <tr><td class="paramdir">[in]</td><td class="paramname">scale_y</td><td>The scale factor along y dimension </td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 587 | </table> |
| 588 | </dd> |
| 589 | </dl> |
| 590 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 591 | <p class="definition">Definition at line <a class="el" href="scale_8cl_source.xhtml#l00086">86</a> of file <a class="el" href="scale_8cl_source.xhtml">scale.cl</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 592 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 593 | <p class="reference">References <a class="el" href="warp__helpers_8h_source.xhtml#l00034">clamp_to_border_with_size()</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_8h_source.xhtml#l00068">get_current_coords()</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>, <a class="el" href="warp__helpers_8h_source.xhtml#l00059">read_texels4()</a>, and <a class="el" href="scale_8cl_source.xhtml#l00034">transform_nearest()</a>.</p> |
| 594 | <div class="fragment"><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> {</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <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="l00095"></a><span class="lineno"> 95</span>  <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="l00096"></a><span class="lineno"> 96</span>  <span class="keyword">const</span> float2 r = (float2)(scale_x, scale_y);</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keyword">const</span> float8 tc = <a class="code" href="warp__helpers_8h.xhtml#aaef9851523cbc6f833700f0eb572002b">clamp_to_border_with_size</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, BORDER_SIZE);</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  vstore4(<a class="code" href="warp__helpers_8h.xhtml#aba42442a4c991cdbb52727fa370676f1">read_texels4</a>(&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><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> }</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> |
| 595 | <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> |
| 596 | <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> |
| 597 | <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> |
| 598 | <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> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 599 | <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> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 600 | <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> |
| 601 | <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> |
| 602 | <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#l00059">warp_helpers.h:59</a></div></div> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 603 | <div class="ttc" id="warp__helpers_8h_xhtml_aaef9851523cbc6f833700f0eb572002b"><div class="ttname"><a href="warp__helpers_8h.xhtml#aaef9851523cbc6f833700f0eb572002b">clamp_to_border_with_size</a></div><div class="ttdeci">const float8 clamp_to_border_with_size(float8 coords, const float width, const float height, const float border_size)</div><div class="ttdoc">Clamps the given coordinates to the borders according to the border size. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00034">warp_helpers.h:34</a></div></div> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 604 | <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#l00068">warp_helpers.h:68</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 605 | </div><!-- fragment --> |
| 606 | </div> |
| 607 | </div> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 608 | <a id="a2216ff8602b48932fb95cdc3d02c8bba"></a> |
| 609 | <h2 class="memtitle"><span class="permalink"><a href="#a2216ff8602b48932fb95cdc3d02c8bba">◆ </a></span>scale_nearest_neighbour_nhwc()</h2> |
| 610 | |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 611 | <div class="memitem"> |
| 612 | <div class="memproto"> |
| 613 | <table class="memname"> |
| 614 | <tr> |
| 615 | <td class="memname">__kernel void scale_nearest_neighbour_nhwc </td> |
| 616 | <td>(</td> |
| 617 | <td class="paramtype">__global uchar * </td> |
| 618 | <td class="paramname"><em>in_ptr</em>, </td> |
| 619 | </tr> |
| 620 | <tr> |
| 621 | <td class="paramkey"></td> |
| 622 | <td></td> |
| 623 | <td class="paramtype">uint </td> |
| 624 | <td class="paramname"><em>in_stride_x</em>, </td> |
| 625 | </tr> |
| 626 | <tr> |
| 627 | <td class="paramkey"></td> |
| 628 | <td></td> |
| 629 | <td class="paramtype">uint </td> |
| 630 | <td class="paramname"><em>in_step_x</em>, </td> |
| 631 | </tr> |
| 632 | <tr> |
| 633 | <td class="paramkey"></td> |
| 634 | <td></td> |
| 635 | <td class="paramtype">uint </td> |
| 636 | <td class="paramname"><em>in_stride_y</em>, </td> |
| 637 | </tr> |
| 638 | <tr> |
| 639 | <td class="paramkey"></td> |
| 640 | <td></td> |
| 641 | <td class="paramtype">uint </td> |
| 642 | <td class="paramname"><em>in_step_y</em>, </td> |
| 643 | </tr> |
| 644 | <tr> |
| 645 | <td class="paramkey"></td> |
| 646 | <td></td> |
| 647 | <td class="paramtype">uint </td> |
| 648 | <td class="paramname"><em>in_stride_z</em>, </td> |
| 649 | </tr> |
| 650 | <tr> |
| 651 | <td class="paramkey"></td> |
| 652 | <td></td> |
| 653 | <td class="paramtype">uint </td> |
| 654 | <td class="paramname"><em>in_step_z</em>, </td> |
| 655 | </tr> |
| 656 | <tr> |
| 657 | <td class="paramkey"></td> |
| 658 | <td></td> |
| 659 | <td class="paramtype">uint </td> |
| 660 | <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td> |
| 661 | </tr> |
| 662 | <tr> |
| 663 | <td class="paramkey"></td> |
| 664 | <td></td> |
| 665 | <td class="paramtype">__global uchar * </td> |
| 666 | <td class="paramname"><em>out_ptr</em>, </td> |
| 667 | </tr> |
| 668 | <tr> |
| 669 | <td class="paramkey"></td> |
| 670 | <td></td> |
| 671 | <td class="paramtype">uint </td> |
| 672 | <td class="paramname"><em>out_stride_x</em>, </td> |
| 673 | </tr> |
| 674 | <tr> |
| 675 | <td class="paramkey"></td> |
| 676 | <td></td> |
| 677 | <td class="paramtype">uint </td> |
| 678 | <td class="paramname"><em>out_step_x</em>, </td> |
| 679 | </tr> |
| 680 | <tr> |
| 681 | <td class="paramkey"></td> |
| 682 | <td></td> |
| 683 | <td class="paramtype">uint </td> |
| 684 | <td class="paramname"><em>out_stride_y</em>, </td> |
| 685 | </tr> |
| 686 | <tr> |
| 687 | <td class="paramkey"></td> |
| 688 | <td></td> |
| 689 | <td class="paramtype">uint </td> |
| 690 | <td class="paramname"><em>out_step_y</em>, </td> |
| 691 | </tr> |
| 692 | <tr> |
| 693 | <td class="paramkey"></td> |
| 694 | <td></td> |
| 695 | <td class="paramtype">uint </td> |
| 696 | <td class="paramname"><em>out_stride_z</em>, </td> |
| 697 | </tr> |
| 698 | <tr> |
| 699 | <td class="paramkey"></td> |
| 700 | <td></td> |
| 701 | <td class="paramtype">uint </td> |
| 702 | <td class="paramname"><em>out_step_z</em>, </td> |
| 703 | </tr> |
| 704 | <tr> |
| 705 | <td class="paramkey"></td> |
| 706 | <td></td> |
| 707 | <td class="paramtype">uint </td> |
| 708 | <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td> |
| 709 | </tr> |
| 710 | <tr> |
| 711 | <td class="paramkey"></td> |
| 712 | <td></td> |
| 713 | <td class="paramtype">const float </td> |
| 714 | <td class="paramname"><em>input_width</em>, </td> |
| 715 | </tr> |
| 716 | <tr> |
| 717 | <td class="paramkey"></td> |
| 718 | <td></td> |
| 719 | <td class="paramtype">const float </td> |
| 720 | <td class="paramname"><em>input_height</em>, </td> |
| 721 | </tr> |
| 722 | <tr> |
| 723 | <td class="paramkey"></td> |
| 724 | <td></td> |
| 725 | <td class="paramtype">const float </td> |
| 726 | <td class="paramname"><em>scale_x</em>, </td> |
| 727 | </tr> |
| 728 | <tr> |
| 729 | <td class="paramkey"></td> |
| 730 | <td></td> |
| 731 | <td class="paramtype">const float </td> |
| 732 | <td class="paramname"><em>scale_y</em> </td> |
| 733 | </tr> |
| 734 | <tr> |
| 735 | <td></td> |
| 736 | <td>)</td> |
| 737 | <td></td><td></td> |
| 738 | </tr> |
| 739 | </table> |
| 740 | </div><div class="memdoc"> |
| 741 | |
| 742 | <p>Performs scale on an image interpolating with the NEAREAST NEIGHBOUR method. </p> |
| 743 | <p>Input and output are single channel F32. (NHWC)</p> |
| 744 | <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></dl> |
| 745 | <dl class="params"><dt>Parameters</dt><dd> |
| 746 | <table class="params"> |
| 747 | <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: U8/S16/F16/F32. </td></tr> |
| 748 | <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> |
| 749 | <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> |
| 750 | <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> |
| 751 | <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> |
| 752 | <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> |
| 753 | <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> |
| 754 | <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> |
| 755 | <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> |
| 756 | <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> |
| 757 | <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> |
| 758 | <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> |
| 759 | <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> |
| 760 | <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> |
| 761 | <tr><td class="paramdir">[in]</td><td class="paramname">out_step_z</td><td>dst_stride_z * number of elements along Z processed per workitem(in bytes) </td></tr> |
| 762 | <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> |
| 763 | <tr><td class="paramdir">[in]</td><td class="paramname">input_width</td><td>Input image width </td></tr> |
| 764 | <tr><td class="paramdir">[in]</td><td class="paramname">input_height</td><td>Input image height </td></tr> |
| 765 | <tr><td class="paramdir">[in]</td><td class="paramname">scale_x</td><td>The scale factor along x dimension </td></tr> |
| 766 | <tr><td class="paramdir">[in]</td><td class="paramname">scale_y</td><td>The scale factor along y dimension </td></tr> |
| 767 | </table> |
| 768 | </dd> |
| 769 | </dl> |
| 770 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 771 | <p class="definition">Definition at line <a class="el" href="scale_8cl_source.xhtml#l00162">162</a> of file <a class="el" href="scale_8cl_source.xhtml">scale.cl</a>.</p> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 772 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 773 | <p class="reference">References <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> |
| 774 | <div class="fragment"><div class="line"><a name="l00169"></a><span class="lineno"> 169</span> {</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <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="l00171"></a><span class="lineno"> 171</span>  <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="l00172"></a><span class="lineno"> 172</span> </div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> new_x = (get_global_id(1) + 0.5f) * scale_x;</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> new_y = (get_global_id(2) + 0.5f) * scale_y;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> clamped_x = <a class="code" href="namespacearm__compute_1_1utility.xhtml#a12c3c62f510452805c289e180ec78bb7">clamp</a>(new_x, 0.0f, input_width - 1);</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <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_y, 0.0f, input_height - 1);</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span> </div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)out.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) = *((__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>(&in, get_global_id(0), convert_int(clamped_x), convert_int(clamped_y)));</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span> }</div><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> |
| 775 | <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> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 776 | <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 &n, const T &lower, const T &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> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 777 | <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> |
| 778 | <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> |
| 779 | <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> |
| 780 | <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> |
| 781 | <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> |
| 782 | <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> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 783 | </div><!-- fragment --> |
| 784 | </div> |
| 785 | </div> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 786 | <a id="a1990e87858b15b8fce3f63965fb9b86c"></a> |
| 787 | <h2 class="memtitle"><span class="permalink"><a href="#a1990e87858b15b8fce3f63965fb9b86c">◆ </a></span>transform_bilinear()</h2> |
| 788 | |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 789 | <div class="memitem"> |
| 790 | <div class="memproto"> |
| 791 | <table class="mlabels"> |
| 792 | <tr> |
| 793 | <td class="mlabels-left"> |
| 794 | <table class="memname"> |
| 795 | <tr> |
| 796 | <td class="memname">const float8 transform_bilinear </td> |
| 797 | <td>(</td> |
| 798 | <td class="paramtype">const float2 </td> |
| 799 | <td class="paramname"><em>coord</em>, </td> |
| 800 | </tr> |
| 801 | <tr> |
| 802 | <td class="paramkey"></td> |
| 803 | <td></td> |
| 804 | <td class="paramtype">const float2 </td> |
| 805 | <td class="paramname"><em>scale</em> </td> |
| 806 | </tr> |
| 807 | <tr> |
| 808 | <td></td> |
| 809 | <td>)</td> |
| 810 | <td></td><td></td> |
| 811 | </tr> |
| 812 | </table> |
| 813 | </td> |
| 814 | <td class="mlabels-right"> |
| 815 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 816 | </tr> |
| 817 | </table> |
| 818 | </div><div class="memdoc"> |
| 819 | |
| 820 | <p>Transforms four 2D coordinates. </p> |
| 821 | <p>This is used to map the output coordinates to the input coordinates.</p> |
| 822 | <dl class="params"><dt>Parameters</dt><dd> |
| 823 | <table class="params"> |
| 824 | <tr><td class="paramdir">[in]</td><td class="paramname">coord</td><td>2D coordinates to transform. </td></tr> |
| 825 | <tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>input/output scale ratio</td></tr> |
| 826 | </table> |
| 827 | </dd> |
| 828 | </dl> |
| 829 | <dl class="section return"><dt>Returns</dt><dd>a float8 containing 4 2D transformed values in the input image. </dd></dl> |
| 830 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 831 | <p class="definition">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> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 832 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 833 | <p class="reference">Referenced by <a class="el" href="scale_8cl_source.xhtml#l00122">scale_bilinear_nchw()</a>.</p> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 834 | <div class="fragment"><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> {</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <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="l00052"></a><span class="lineno"> 52</span> <span class="preprocessor">#ifdef SAMPLING_POLICY_TOP_LEFT</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <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="l00054"></a><span class="lineno"> 54</span>  <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="l00055"></a><span class="lineno"> 55</span>  <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="l00056"></a><span class="lineno"> 56</span> <span class="preprocessor">#elif SAMPLING_POLICY_CENTER</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <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="l00058"></a><span class="lineno"> 58</span>  <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="l00059"></a><span class="lineno"> 59</span>  <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="l00060"></a><span class="lineno"> 60</span> <span class="preprocessor">#else </span><span class="comment">/* SAMPLING_POLICY */</span><span class="preprocessor"></span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> <span class="preprocessor">#error("Unsupported sampling policy");</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="preprocessor">#endif </span><span class="comment">/* SAMPLING_POLICY */</span><span class="preprocessor"></span></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> }</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> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 835 | </div><!-- fragment --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 836 | </div> |
| 837 | </div> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 838 | <a id="a55c710b814464d9b8982c4eb6ca04dee"></a> |
| 839 | <h2 class="memtitle"><span class="permalink"><a href="#a55c710b814464d9b8982c4eb6ca04dee">◆ </a></span>transform_nearest()</h2> |
| 840 | |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 841 | <div class="memitem"> |
| 842 | <div class="memproto"> |
| 843 | <table class="mlabels"> |
| 844 | <tr> |
| 845 | <td class="mlabels-left"> |
| 846 | <table class="memname"> |
| 847 | <tr> |
| 848 | <td class="memname">const float8 transform_nearest </td> |
| 849 | <td>(</td> |
| 850 | <td class="paramtype">const float2 </td> |
| 851 | <td class="paramname"><em>coord</em>, </td> |
| 852 | </tr> |
| 853 | <tr> |
| 854 | <td class="paramkey"></td> |
| 855 | <td></td> |
| 856 | <td class="paramtype">const float2 </td> |
| 857 | <td class="paramname"><em>scale</em> </td> |
| 858 | </tr> |
| 859 | <tr> |
| 860 | <td></td> |
| 861 | <td>)</td> |
| 862 | <td></td><td></td> |
| 863 | </tr> |
| 864 | </table> |
| 865 | </td> |
| 866 | <td class="mlabels-right"> |
| 867 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 868 | </tr> |
| 869 | </table> |
| 870 | </div><div class="memdoc"> |
| 871 | |
| 872 | <p>Transforms four 2D coordinates. </p> |
| 873 | <p>This is used to map the output coordinates to the input coordinates.</p> |
| 874 | <dl class="params"><dt>Parameters</dt><dd> |
| 875 | <table class="params"> |
| 876 | <tr><td class="paramdir">[in]</td><td class="paramname">coord</td><td>2D coordinates to transform. </td></tr> |
| 877 | <tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>input/output scale ratio</td></tr> |
| 878 | </table> |
| 879 | </dd> |
| 880 | </dl> |
| 881 | <dl class="section return"><dt>Returns</dt><dd>a float8 containing 4 2D transformed values in the input image. </dd></dl> |
| 882 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 883 | <p class="definition">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> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 884 | |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 885 | <p class="reference">Referenced by <a class="el" href="scale_8cl_source.xhtml#l00086">scale_nearest_neighbour_nchw()</a>.</p> |
Jenkins | 52ba29e | 2018-08-29 15:32:11 +0000 | [diff] [blame] | 886 | <div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> {</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <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>  <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);</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <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);</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <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="l00040"></a><span class="lineno"> 40</span> }</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> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 887 | </div><!-- fragment --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 888 | </div> |
| 889 | </div> |
| 890 | </div><!-- contents --> |
| 891 | </div><!-- doc-content --> |
| 892 | <!-- start footer part --> |
| 893 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 894 | <ul> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame] | 895 | <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_8cl.xhtml">scale.cl</a></li> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 896 | <li class="footer">Generated on Thu Nov 22 2018 11:57:43 for Compute Library by |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 897 | <a href="http://www.doxygen.org/index.html"> |
Jenkins | b9abeae | 2018-11-22 11:58:08 +0000 | [diff] [blame^] | 898 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 899 | </ul> |
| 900 | </div> |
| 901 | </body> |
| 902 | </html> |