blob: d783eea5b69b35695acabaf2814ae54e29bf5815 [file] [log] [blame]
Anthony Barbier871448e2017-03-24 14:54:29 +00001<!-- HTML header for doxygen 1.8.9.1-->
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6<meta http-equiv="X-UA-Compatible" content="IE=9"/>
Jenkinsb9abeae2018-11-22 11:58:08 +00007<meta name="generator" content="Doxygen 1.8.13"/>
Anthony Barbier871448e2017-03-24 14:54:29 +00008<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
Anthony Barbierdbdab852017-06-23 15:42:00 +01009<title>Compute Library: src/core/CL/cl_kernels/threshold.cl File Reference</title>
Anthony Barbier871448e2017-03-24 14:54:29 +000010<link href="tabs.css" rel="stylesheet" type="text/css"/>
11<script type="text/javascript" src="jquery.js"></script>
12<script type="text/javascript" src="dynsections.js"></script>
13<link href="navtree.css" rel="stylesheet" type="text/css"/>
14<script type="text/javascript" src="resize.js"></script>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000015<script type="text/javascript" src="navtreedata.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000016<script type="text/javascript" src="navtree.js"></script>
17<script type="text/javascript">
18 $(document).ready(initResizable);
Anthony Barbier871448e2017-03-24 14:54:29 +000019</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>
Anthony Barbier871448e2017-03-24 14:54:29 +000022<script type="text/javascript" src="search/search.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000023<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>
Anthony Barbier871448e2017-03-24 14:54:29 +000029<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 Barbierdbdab852017-06-23 15:42:00 +010038 <div id="projectname">Compute Library
Jenkinsb9abeae2018-11-22 11:58:08 +000039 &#160;<span id="projectnumber">18.11</span>
Anthony Barbier871448e2017-03-24 14:54:29 +000040 </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 -->
Anthony Barbier871448e2017-03-24 14:54:29 +000048<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>
Anthony Barbier871448e2017-03-24 14:54:29 +000060</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('threshold_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>
Anthony Barbier871448e2017-03-24 14:54:29 +000081
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">threshold.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 />
Anthony Barbier871448e2017-03-24 14:54:29 +000097</div>
98<p><a href="threshold_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>
Jenkins52ba29e2018-08-29 15:32:11 +0000102<tr class="memitem:a6c8801a257e3e3d80af8b60967975d42"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="threshold_8cl.xhtml#a6c8801a257e3e3d80af8b60967975d42">threshold_binary</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 uchar false_val, const uchar true_val, const uchar threshold)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000103<tr class="memdesc:a6c8801a257e3e3d80af8b60967975d42"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform binary thresholding on an image. <a href="#a6c8801a257e3e3d80af8b60967975d42">More...</a><br /></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000104<tr class="separator:a6c8801a257e3e3d80af8b60967975d42"><td class="memSeparator" colspan="2">&#160;</td></tr>
Jenkins52ba29e2018-08-29 15:32:11 +0000105<tr class="memitem:a2e3f1b089d9b33880c9bb6e98f294bba"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="threshold_8cl.xhtml#a2e3f1b089d9b33880c9bb6e98f294bba">threshold_range</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 uchar false_val, const uchar true_val, const uchar lower, const uchar upper)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000106<tr class="memdesc:a2e3f1b089d9b33880c9bb6e98f294bba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform range thresholding on an image. <a href="#a2e3f1b089d9b33880c9bb6e98f294bba">More...</a><br /></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000107<tr class="separator:a2e3f1b089d9b33880c9bb6e98f294bba"><td class="memSeparator" colspan="2">&#160;</td></tr>
108</table>
109<h2 class="groupheader">Function Documentation</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000110<a id="a6c8801a257e3e3d80af8b60967975d42"></a>
111<h2 class="memtitle"><span class="permalink"><a href="#a6c8801a257e3e3d80af8b60967975d42">&#9670;&nbsp;</a></span>threshold_binary()</h2>
112
Anthony Barbier871448e2017-03-24 14:54:29 +0000113<div class="memitem">
114<div class="memproto">
115 <table class="memname">
116 <tr>
117 <td class="memname">__kernel void threshold_binary </td>
118 <td>(</td>
119 <td class="paramtype">__global uchar *&#160;</td>
120 <td class="paramname"><em>in_ptr</em>, </td>
121 </tr>
122 <tr>
123 <td class="paramkey"></td>
124 <td></td>
125 <td class="paramtype">uint&#160;</td>
126 <td class="paramname"><em>in_stride_x</em>, </td>
127 </tr>
128 <tr>
129 <td class="paramkey"></td>
130 <td></td>
131 <td class="paramtype">uint&#160;</td>
132 <td class="paramname"><em>in_step_x</em>, </td>
133 </tr>
134 <tr>
135 <td class="paramkey"></td>
136 <td></td>
137 <td class="paramtype">uint&#160;</td>
138 <td class="paramname"><em>in_stride_y</em>, </td>
139 </tr>
140 <tr>
141 <td class="paramkey"></td>
142 <td></td>
143 <td class="paramtype">uint&#160;</td>
144 <td class="paramname"><em>in_step_y</em>, </td>
145 </tr>
146 <tr>
147 <td class="paramkey"></td>
148 <td></td>
149 <td class="paramtype">uint&#160;</td>
150 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
151 </tr>
152 <tr>
153 <td class="paramkey"></td>
154 <td></td>
155 <td class="paramtype">__global uchar *&#160;</td>
156 <td class="paramname"><em>out_ptr</em>, </td>
157 </tr>
158 <tr>
159 <td class="paramkey"></td>
160 <td></td>
161 <td class="paramtype">uint&#160;</td>
162 <td class="paramname"><em>out_stride_x</em>, </td>
163 </tr>
164 <tr>
165 <td class="paramkey"></td>
166 <td></td>
167 <td class="paramtype">uint&#160;</td>
168 <td class="paramname"><em>out_step_x</em>, </td>
169 </tr>
170 <tr>
171 <td class="paramkey"></td>
172 <td></td>
173 <td class="paramtype">uint&#160;</td>
174 <td class="paramname"><em>out_stride_y</em>, </td>
175 </tr>
176 <tr>
177 <td class="paramkey"></td>
178 <td></td>
179 <td class="paramtype">uint&#160;</td>
180 <td class="paramname"><em>out_step_y</em>, </td>
181 </tr>
182 <tr>
183 <td class="paramkey"></td>
184 <td></td>
185 <td class="paramtype">uint&#160;</td>
186 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
187 </tr>
188 <tr>
189 <td class="paramkey"></td>
190 <td></td>
191 <td class="paramtype">const uchar&#160;</td>
192 <td class="paramname"><em>false_val</em>, </td>
193 </tr>
194 <tr>
195 <td class="paramkey"></td>
196 <td></td>
197 <td class="paramtype">const uchar&#160;</td>
198 <td class="paramname"><em>true_val</em>, </td>
199 </tr>
200 <tr>
201 <td class="paramkey"></td>
202 <td></td>
203 <td class="paramtype">const uchar&#160;</td>
204 <td class="paramname"><em>threshold</em>&#160;</td>
205 </tr>
206 <tr>
207 <td></td>
208 <td>)</td>
209 <td></td><td></td>
210 </tr>
211 </table>
212</div><div class="memdoc">
213
214<p>Perform binary thresholding on an image. </p>
215<dl class="params"><dt>Parameters</dt><dd>
216 <table class="params">
217 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image </td></tr>
218 <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>
219 <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>
220 <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>
221 <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>
222 <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 first source image </td></tr>
223 <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image </td></tr>
224 <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>
225 <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>
226 <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>
227 <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>
228 <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>
229 <tr><td class="paramdir">[in]</td><td class="paramname">false_val</td><td>False value </td></tr>
230 <tr><td class="paramdir">[in]</td><td class="paramname">true_val</td><td>True value </td></tr>
231 <tr><td class="paramdir">[in]</td><td class="paramname">threshold</td><td>The thresold value </td></tr>
232 </table>
233 </dd>
234</dl>
235
Jenkinsb9abeae2018-11-22 11:58:08 +0000236<p class="definition">Definition at line <a class="el" href="threshold_8cl_source.xhtml#l00044">44</a> of file <a class="el" href="threshold_8cl_source.xhtml">threshold.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000237
Jenkinsb9abeae2018-11-22 11:58:08 +0000238<p class="reference">References <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="_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>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00150">Image::ptr</a>.</p>
239<div class="fragment"><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;{</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(in);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af8a8a0625e7981212a0af48deb9d2a09">out</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(out);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="comment">// Load data</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; uchar16 in_data = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="comment">// Perform binary thresholding</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; in_data = select((uchar16)false_val, (uchar16)true_val, in_data &gt; (uchar16)<a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a6cae310822a46019ba25a00ddb0f7e62">threshold</a>);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="comment">// Store result</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; vstore16(in_data, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;}</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00110">helpers.h:110</a></div></div>
240<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>
241<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>
242<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>
243<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>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000244<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_1_1reference_xhtml_a6cae310822a46019ba25a00ddb0f7e62"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a6cae310822a46019ba25a00ddb0f7e62">arm_compute::test::validation::reference::threshold</a></div><div class="ttdeci">SimpleTensor&lt; T &gt; threshold(const SimpleTensor&lt; T &gt; &amp;src, T threshold, T false_value, T true_value, ThresholdType type, T upper)</div><div class="ttdef"><b>Definition:</b> <a href="reference_2_threshold_8cpp_source.xhtml#l00035">Threshold.cpp:35</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000245</div><!-- fragment -->
246</div>
247</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000248<a id="a2e3f1b089d9b33880c9bb6e98f294bba"></a>
249<h2 class="memtitle"><span class="permalink"><a href="#a2e3f1b089d9b33880c9bb6e98f294bba">&#9670;&nbsp;</a></span>threshold_range()</h2>
250
Anthony Barbier871448e2017-03-24 14:54:29 +0000251<div class="memitem">
252<div class="memproto">
253 <table class="memname">
254 <tr>
255 <td class="memname">__kernel void threshold_range </td>
256 <td>(</td>
257 <td class="paramtype">__global uchar *&#160;</td>
258 <td class="paramname"><em>in_ptr</em>, </td>
259 </tr>
260 <tr>
261 <td class="paramkey"></td>
262 <td></td>
263 <td class="paramtype">uint&#160;</td>
264 <td class="paramname"><em>in_stride_x</em>, </td>
265 </tr>
266 <tr>
267 <td class="paramkey"></td>
268 <td></td>
269 <td class="paramtype">uint&#160;</td>
270 <td class="paramname"><em>in_step_x</em>, </td>
271 </tr>
272 <tr>
273 <td class="paramkey"></td>
274 <td></td>
275 <td class="paramtype">uint&#160;</td>
276 <td class="paramname"><em>in_stride_y</em>, </td>
277 </tr>
278 <tr>
279 <td class="paramkey"></td>
280 <td></td>
281 <td class="paramtype">uint&#160;</td>
282 <td class="paramname"><em>in_step_y</em>, </td>
283 </tr>
284 <tr>
285 <td class="paramkey"></td>
286 <td></td>
287 <td class="paramtype">uint&#160;</td>
288 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
289 </tr>
290 <tr>
291 <td class="paramkey"></td>
292 <td></td>
293 <td class="paramtype">__global uchar *&#160;</td>
294 <td class="paramname"><em>out_ptr</em>, </td>
295 </tr>
296 <tr>
297 <td class="paramkey"></td>
298 <td></td>
299 <td class="paramtype">uint&#160;</td>
300 <td class="paramname"><em>out_stride_x</em>, </td>
301 </tr>
302 <tr>
303 <td class="paramkey"></td>
304 <td></td>
305 <td class="paramtype">uint&#160;</td>
306 <td class="paramname"><em>out_step_x</em>, </td>
307 </tr>
308 <tr>
309 <td class="paramkey"></td>
310 <td></td>
311 <td class="paramtype">uint&#160;</td>
312 <td class="paramname"><em>out_stride_y</em>, </td>
313 </tr>
314 <tr>
315 <td class="paramkey"></td>
316 <td></td>
317 <td class="paramtype">uint&#160;</td>
318 <td class="paramname"><em>out_step_y</em>, </td>
319 </tr>
320 <tr>
321 <td class="paramkey"></td>
322 <td></td>
323 <td class="paramtype">uint&#160;</td>
324 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
325 </tr>
326 <tr>
327 <td class="paramkey"></td>
328 <td></td>
329 <td class="paramtype">const uchar&#160;</td>
330 <td class="paramname"><em>false_val</em>, </td>
331 </tr>
332 <tr>
333 <td class="paramkey"></td>
334 <td></td>
335 <td class="paramtype">const uchar&#160;</td>
336 <td class="paramname"><em>true_val</em>, </td>
337 </tr>
338 <tr>
339 <td class="paramkey"></td>
340 <td></td>
341 <td class="paramtype">const uchar&#160;</td>
342 <td class="paramname"><em>lower</em>, </td>
343 </tr>
344 <tr>
345 <td class="paramkey"></td>
346 <td></td>
347 <td class="paramtype">const uchar&#160;</td>
348 <td class="paramname"><em>upper</em>&#160;</td>
349 </tr>
350 <tr>
351 <td></td>
352 <td>)</td>
353 <td></td><td></td>
354 </tr>
355 </table>
356</div><div class="memdoc">
357
358<p>Perform range thresholding on an image. </p>
359<dl class="params"><dt>Parameters</dt><dd>
360 <table class="params">
361 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image </td></tr>
362 <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>
363 <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>
364 <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>
365 <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>
366 <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 first source image </td></tr>
367 <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image </td></tr>
368 <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>
369 <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>
370 <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>
371 <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>
372 <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>
373 <tr><td class="paramdir">[in]</td><td class="paramname">false_val</td><td>False value </td></tr>
374 <tr><td class="paramdir">[in]</td><td class="paramname">true_val</td><td>True value </td></tr>
375 <tr><td class="paramdir">[in]</td><td class="paramname">lower</td><td>Lower threshold </td></tr>
376 <tr><td class="paramdir">[in]</td><td class="paramname">upper</td><td>Upper threshold </td></tr>
377 </table>
378 </dd>
379</dl>
380
Jenkinsb9abeae2018-11-22 11:58:08 +0000381<p class="definition">Definition at line <a class="el" href="threshold_8cl_source.xhtml#l00084">84</a> of file <a class="el" href="threshold_8cl_source.xhtml">threshold.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000382
Jenkinsb9abeae2018-11-22 11:58:08 +0000383<p class="reference">References <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="_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>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00150">Image::ptr</a>.</p>
384<div class="fragment"><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;{</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(in);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af8a8a0625e7981212a0af48deb9d2a09">out</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(out);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="comment">// Load data</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; uchar16 in_data = vload16(0, in.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="comment">// Perform range thresholding</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; in_data = select((uchar16)true_val, (uchar16)false_val, in_data &gt; (uchar16)upper || in_data &lt; (uchar16)lower);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="comment">// Store result</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; vstore16(in_data, 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;}</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00110">helpers.h:110</a></div></div>
385<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>
386<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>
387<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>
388<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>
Anthony Barbier871448e2017-03-24 14:54:29 +0000389</div><!-- fragment -->
390</div>
391</div>
392</div><!-- contents -->
393</div><!-- doc-content -->
394<!-- start footer part -->
395<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
396 <ul>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000397 <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="threshold_8cl.xhtml">threshold.cl</a></li>
Jenkinsb9abeae2018-11-22 11:58:08 +0000398 <li class="footer">Generated on Thu Nov 22 2018 11:57:43 for Compute Library by
Anthony Barbier871448e2017-03-24 14:54:29 +0000399 <a href="http://www.doxygen.org/index.html">
Jenkinsb9abeae2018-11-22 11:58:08 +0000400 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000401 </ul>
402</div>
403</body>
404</html>