blob: 692c6a4d9adf6911ce4328c30f987094e0de8997 [file] [log] [blame]
Kaizen8938bd32017-09-28 14:38:23 +01001<!-- 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"/>
Jenkinsb9abeae2018-11-22 11:58:08 +00007<meta name="generator" content="Doxygen 1.8.13"/>
Kaizen8938bd32017-09-28 14:38:23 +01008<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
9<title>Compute Library: src/core/CL/cl_kernels/floor.cl File Reference</title>
10<link href="tabs.css" rel="stylesheet" type="text/css"/>
11<script type="text/javascript" src="jquery.js"></script>
12<script type="text/javascript" src="dynsections.js"></script>
13<link href="navtree.css" rel="stylesheet" type="text/css"/>
14<script type="text/javascript" src="resize.js"></script>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000015<script type="text/javascript" src="navtreedata.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010016<script type="text/javascript" src="navtree.js"></script>
17<script type="text/javascript">
18 $(document).ready(initResizable);
Kaizen8938bd32017-09-28 14:38:23 +010019</script>
20<link href="search/search.css" rel="stylesheet" type="text/css"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000021<script type="text/javascript" src="search/searchdata.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010022<script type="text/javascript" src="search/search.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010023<script type="text/x-mathjax-config">
24 MathJax.Hub.Config({
25 extensions: ["tex2jax.js"],
26 jax: ["input/TeX","output/HTML-CSS"],
27});
Anthony Barbier8140e1e2017-12-14 23:48:46 +000028</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010029<link href="doxygen.css" rel="stylesheet" type="text/css" />
30</head>
31<body>
32<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
33<div id="titlearea">
34<table cellspacing="0" cellpadding="0">
35 <tbody>
36 <tr style="height: 56px;">
37 <td style="padding-left: 0.5em;">
38 <div id="projectname">Compute Library
Jenkinsb9abeae2018-11-22 11:58:08 +000039 &#160;<span id="projectnumber">18.11</span>
Kaizen8938bd32017-09-28 14:38:23 +010040 </div>
41 </td>
42 </tr>
43 </tbody>
44</table>
45</div>
46<!-- end header part -->
Jenkinsb9abeae2018-11-22 11:58:08 +000047<!-- Generated by Doxygen 1.8.13 -->
Kaizen8938bd32017-09-28 14:38:23 +010048<script type="text/javascript">
49var searchBox = new SearchBox("searchBox", "search",false,'Search');
50</script>
Jenkinsb9abeae2018-11-22 11:58:08 +000051<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>
Kaizen8938bd32017-09-28 14:38:23 +010060</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('floor_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 Barbier8140e1e2017-12-14 23:48:46 +000080</div>
Kaizen8938bd32017-09-28 14:38:23 +010081
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">floor.cl File Reference</div> </div>
94</div><!--header-->
95<div class="contents">
Jenkinsb9abeae2018-11-22 11:58:08 +000096<div class="textblock"><code>#include &quot;<a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br />
Kaizen8938bd32017-09-28 14:38:23 +010097</div>
98<p><a href="floor_8cl_source.xhtml">Go to the source code of this file.</a></p>
99<table class="memberdecls">
100<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
101Functions</h2></td></tr>
102<tr class="memitem:af0d15673a262fbeaea48ea912573f5d5"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="floor_8cl.xhtml#af0d15673a262fbeaea48ea912573f5d5">floor_layer</a> (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_stride_z, uint input_step_z, uint input_offset_first_element_in_bytes, __global uchar *output_ptr, uint output_stride_x, uint output_step_x, uint output_stride_y, uint output_step_y, uint output_stride_z, uint output_step_z, uint output_offset_first_element_in_bytes)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000103<tr class="memdesc:af0d15673a262fbeaea48ea912573f5d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform a floor operation on an input tensor. <a href="#af0d15673a262fbeaea48ea912573f5d5">More...</a><br /></td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100104<tr class="separator:af0d15673a262fbeaea48ea912573f5d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
105</table>
106<h2 class="groupheader">Function Documentation</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000107<a id="af0d15673a262fbeaea48ea912573f5d5"></a>
108<h2 class="memtitle"><span class="permalink"><a href="#af0d15673a262fbeaea48ea912573f5d5">&#9670;&nbsp;</a></span>floor_layer()</h2>
109
Kaizen8938bd32017-09-28 14:38:23 +0100110<div class="memitem">
111<div class="memproto">
112 <table class="memname">
113 <tr>
114 <td class="memname">__kernel void floor_layer </td>
115 <td>(</td>
116 <td class="paramtype">__global uchar *&#160;</td>
117 <td class="paramname"><em>input_ptr</em>, </td>
118 </tr>
119 <tr>
120 <td class="paramkey"></td>
121 <td></td>
122 <td class="paramtype">uint&#160;</td>
123 <td class="paramname"><em>input_stride_x</em>, </td>
124 </tr>
125 <tr>
126 <td class="paramkey"></td>
127 <td></td>
128 <td class="paramtype">uint&#160;</td>
129 <td class="paramname"><em>input_step_x</em>, </td>
130 </tr>
131 <tr>
132 <td class="paramkey"></td>
133 <td></td>
134 <td class="paramtype">uint&#160;</td>
135 <td class="paramname"><em>input_stride_y</em>, </td>
136 </tr>
137 <tr>
138 <td class="paramkey"></td>
139 <td></td>
140 <td class="paramtype">uint&#160;</td>
141 <td class="paramname"><em>input_step_y</em>, </td>
142 </tr>
143 <tr>
144 <td class="paramkey"></td>
145 <td></td>
146 <td class="paramtype">uint&#160;</td>
147 <td class="paramname"><em>input_stride_z</em>, </td>
148 </tr>
149 <tr>
150 <td class="paramkey"></td>
151 <td></td>
152 <td class="paramtype">uint&#160;</td>
153 <td class="paramname"><em>input_step_z</em>, </td>
154 </tr>
155 <tr>
156 <td class="paramkey"></td>
157 <td></td>
158 <td class="paramtype">uint&#160;</td>
159 <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
160 </tr>
161 <tr>
162 <td class="paramkey"></td>
163 <td></td>
164 <td class="paramtype">__global uchar *&#160;</td>
165 <td class="paramname"><em>output_ptr</em>, </td>
166 </tr>
167 <tr>
168 <td class="paramkey"></td>
169 <td></td>
170 <td class="paramtype">uint&#160;</td>
171 <td class="paramname"><em>output_stride_x</em>, </td>
172 </tr>
173 <tr>
174 <td class="paramkey"></td>
175 <td></td>
176 <td class="paramtype">uint&#160;</td>
177 <td class="paramname"><em>output_step_x</em>, </td>
178 </tr>
179 <tr>
180 <td class="paramkey"></td>
181 <td></td>
182 <td class="paramtype">uint&#160;</td>
183 <td class="paramname"><em>output_stride_y</em>, </td>
184 </tr>
185 <tr>
186 <td class="paramkey"></td>
187 <td></td>
188 <td class="paramtype">uint&#160;</td>
189 <td class="paramname"><em>output_step_y</em>, </td>
190 </tr>
191 <tr>
192 <td class="paramkey"></td>
193 <td></td>
194 <td class="paramtype">uint&#160;</td>
195 <td class="paramname"><em>output_stride_z</em>, </td>
196 </tr>
197 <tr>
198 <td class="paramkey"></td>
199 <td></td>
200 <td class="paramtype">uint&#160;</td>
201 <td class="paramname"><em>output_step_z</em>, </td>
202 </tr>
203 <tr>
204 <td class="paramkey"></td>
205 <td></td>
206 <td class="paramtype">uint&#160;</td>
207 <td class="paramname"><em>output_offset_first_element_in_bytes</em>&#160;</td>
208 </tr>
209 <tr>
210 <td></td>
211 <td>)</td>
212 <td></td><td></td>
213 </tr>
214 </table>
215</div><div class="memdoc">
216
217<p>Perform a floor operation on an input tensor. </p>
218<dl class="section attention"><dt>Attention</dt><dd>Data type can be passed using the -DDATA_TYPE compile flag, e.g. -DDATA_TYPE=float </dd>
219<dd>
220<a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information. ">Vector</a> size should be given as a preprocessor argument using -DVEC_SIZE=size. e.g. -DVEC_SIZE=16 </dd></dl>
221<dl class="section note"><dt>Note</dt><dd>Can only take floating point data types.</dd></dl>
222<dl class="params"><dt>Parameters</dt><dd>
223 <table class="params">
224 <tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the source image. Supported data types: F16/F32 </td></tr>
225 <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
226 <tr><td class="paramdir">[in]</td><td class="paramname">input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
227 <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
228 <tr><td class="paramdir">[in]</td><td class="paramname">input_step_y</td><td>input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
229 <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_z</td><td>Stride of the source tensor in Z dimension (in bytes) </td></tr>
230 <tr><td class="paramdir">[in]</td><td class="paramname">input_step_z</td><td>input_stride_z * number of elements along Z processed per workitem(in bytes) </td></tr>
231 <tr><td class="paramdir">[in]</td><td class="paramname">input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
232 <tr><td class="paramdir">[out]</td><td class="paramname">output_ptr</td><td>Pointer to the destination image. Supported data types: same as <code>input_ptr</code> </td></tr>
233 <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
234 <tr><td class="paramdir">[in]</td><td class="paramname">output_step_x</td><td>output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
235 <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
236 <tr><td class="paramdir">[in]</td><td class="paramname">output_step_y</td><td>output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
237 <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_z</td><td>Stride of the source tensor in Z dimension (in bytes) </td></tr>
238 <tr><td class="paramdir">[in]</td><td class="paramname">output_step_z</td><td>output_stride_z * number of elements along Z processed per workitem(in bytes) </td></tr>
239 <tr><td class="paramdir">[in]</td><td class="paramname">output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
240 </table>
241 </dd>
242</dl>
243
Jenkinsb9abeae2018-11-22 11:58:08 +0000244<p class="definition">Definition at line <a class="el" href="floor_8cl_source.xhtml#l00049">49</a> of file <a class="el" href="floor_8cl_source.xhtml">floor.cl</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100245
Jenkinsb9abeae2018-11-22 11:58:08 +0000246<p class="reference">References <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="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00159">Tensor3D::ptr</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00048">VLOAD</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00051">VSTORE</a>.</p>
247<div class="fragment"><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;{</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> input = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(input);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> output = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(output);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#acb282042d1edeeaa3cc979a206f78b54">VSTORE</a>(VEC_SIZE)</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; (floor(<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a287e2fc366c312b468382c95bb90f91f">VLOAD</a>(VEC_SIZE)(0, (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)input.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>)), 0, (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)output.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;}</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>
248<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>
249<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>
250<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_acb282042d1edeeaa3cc979a206f78b54"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#acb282042d1edeeaa3cc979a206f78b54">VSTORE</a></div><div class="ttdeci">#define VSTORE(size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00051">helpers.h:51</a></div></div>
251<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>
252<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a287e2fc366c312b468382c95bb90f91f"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a287e2fc366c312b468382c95bb90f91f">VLOAD</a></div><div class="ttdeci">#define VLOAD(size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00048">helpers.h:48</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100253</div><!-- fragment -->
254</div>
255</div>
256</div><!-- contents -->
257</div><!-- doc-content -->
258<!-- start footer part -->
259<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
260 <ul>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000261 <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="floor_8cl.xhtml">floor.cl</a></li>
Jenkinsb9abeae2018-11-22 11:58:08 +0000262 <li class="footer">Generated on Thu Nov 22 2018 11:57:43 for Compute Library by
Kaizen8938bd32017-09-28 14:38:23 +0100263 <a href="http://www.doxygen.org/index.html">
Jenkinsb9abeae2018-11-22 11:58:08 +0000264 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
Kaizen8938bd32017-09-28 14:38:23 +0100265 </ul>
266</div>
267</body>
268</html>