| <!-- HTML header for doxygen 1.8.9.1--> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <meta name="generator" content="Doxygen 1.8.6"/> |
| <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines --> |
| <title>Compute Library: src/core/CL/cl_kernels/threshold.cl File Reference</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="resize.js"></script> |
| <script type="text/javascript" src="navtree.js"></script> |
| <script type="text/javascript"> |
| $(document).ready(initResizable); |
| $(window).load(resizeHeight); |
| </script> |
| <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="search/search.js"></script> |
| <script type="text/javascript"> |
| $(document).ready(function() { searchBox.OnSelectItem(0); }); |
| </script> |
| <script type="text/x-mathjax-config"> |
| MathJax.Hub.Config({ |
| extensions: ["tex2jax.js"], |
| jax: ["input/TeX","output/HTML-CSS"], |
| }); |
| </script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr style="height: 56px;"> |
| <td style="padding-left: 0.5em;"> |
| <div id="projectname">Compute Library |
|  <span id="projectnumber">17.09</span> |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.6 --> |
| <script type="text/javascript"> |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| </script> |
| <div id="navrow1" class="tabs"> |
| <ul class="tablist"> |
| <li><a href="index.xhtml"><span>Main Page</span></a></li> |
| <li><a href="pages.xhtml"><span>Related Pages</span></a></li> |
| <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li> |
| <li><a href="annotated.xhtml"><span>Data Structures</span></a></li> |
| <li class="current"><a href="files.xhtml"><span>Files</span></a></li> |
| <li> |
| <div id="MSearchBox" class="MSearchBoxInactive"> |
| <span class="left"> |
| <img id="MSearchSelect" src="search/mag_sel.png" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| alt=""/> |
| <input type="text" id="MSearchField" value="Search" accesskey="S" |
| onfocus="searchBox.OnSearchFieldFocus(true)" |
| onblur="searchBox.OnSearchFieldFocus(false)" |
| onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| </span><span class="right"> |
| <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| </span> |
| </div> |
| </li> |
| </ul> |
| </div> |
| <div id="navrow2" class="tabs2"> |
| <ul class="tablist"> |
| <li><a href="files.xhtml"><span>File List</span></a></li> |
| <li><a href="globals.xhtml"><span>Globals</span></a></li> |
| </ul> |
| </div> |
| </div><!-- top --> |
| <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| <div id="nav-tree"> |
| <div id="nav-tree-contents"> |
| <div id="nav-sync" class="sync"></div> |
| </div> |
| </div> |
| <div id="splitbar" style="-moz-user-select:none;" |
| class="ui-resizable-handle"> |
| </div> |
| </div> |
| <script type="text/javascript"> |
| $(document).ready(function(){initNavTree('threshold_8cl.xhtml','');}); |
| </script> |
| <div id="doc-content"> |
| <!-- window showing the filter options --> |
| <div id="MSearchSelectWindow" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Pages</a></div> |
| |
| <!-- iframe showing the search results (closed by default) --> |
| <div id="MSearchResultsWindow"> |
| <iframe src="javascript:void(0)" frameborder="0" |
| name="MSearchResults" id="MSearchResults"> |
| </iframe> |
| </div> |
| |
| <div class="header"> |
| <div class="summary"> |
| <a href="#func-members">Functions</a> </div> |
| <div class="headertitle"> |
| <div class="title">threshold.cl File Reference</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| <div class="textblock"><code>#include "<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>"</code><br/> |
| </div> |
| <p><a href="threshold_8cl_source.xhtml">Go to the source code of this file.</a></p> |
| <table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| Functions</h2></td></tr> |
| <tr class="memitem:a6c8801a257e3e3d80af8b60967975d42"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="threshold_8cl.xhtml#a6c8801a257e3e3d80af8b60967975d42">threshold_binary</a> (__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_offset_first_element_in_bytes, const uchar false_val, const uchar true_val, const uchar threshold)</td></tr> |
| <tr class="memdesc:a6c8801a257e3e3d80af8b60967975d42"><td class="mdescLeft"> </td><td class="mdescRight">Perform binary thresholding on an image. <a href="#a6c8801a257e3e3d80af8b60967975d42">More...</a><br/></td></tr> |
| <tr class="separator:a6c8801a257e3e3d80af8b60967975d42"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a2e3f1b089d9b33880c9bb6e98f294bba"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="threshold_8cl.xhtml#a2e3f1b089d9b33880c9bb6e98f294bba">threshold_range</a> (__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_offset_first_element_in_bytes, const uchar false_val, const uchar true_val, const uchar lower, const uchar upper)</td></tr> |
| <tr class="memdesc:a2e3f1b089d9b33880c9bb6e98f294bba"><td class="mdescLeft"> </td><td class="mdescRight">Perform range thresholding on an image. <a href="#a2e3f1b089d9b33880c9bb6e98f294bba">More...</a><br/></td></tr> |
| <tr class="separator:a2e3f1b089d9b33880c9bb6e98f294bba"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <h2 class="groupheader">Function Documentation</h2> |
| <a class="anchor" id="a6c8801a257e3e3d80af8b60967975d42"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">__kernel void threshold_binary </td> |
| <td>(</td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>in_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>in_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>in_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>in_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>in_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>out_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>out_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>out_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>out_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>out_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const uchar </td> |
| <td class="paramname"><em>false_val</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const uchar </td> |
| <td class="paramname"><em>true_val</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const uchar </td> |
| <td class="paramname"><em>threshold</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Perform binary thresholding on an image. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <tr><td class="paramdir">[in]</td><td class="paramname">false_val</td><td>False value </td></tr> |
| <tr><td class="paramdir">[in]</td><td class="paramname">true_val</td><td>True value </td></tr> |
| <tr><td class="paramdir">[in]</td><td class="paramname">threshold</td><td>The thresold value </td></tr> |
| </table> |
| </dd> |
| </dl> |
| |
| <p>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> |
| |
| <p>References <a class="el" href="helpers_8h_source.xhtml#l00093">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00133">Image::ptr</a>.</p> |
| <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="comment">// Get pixels pointer</span></div> |
| <div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <a class="code" href="struct_image.xhtml">Image</a> in = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(in);</div> |
| <div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(out);</div> |
| <div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div> |
| <div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="comment">// Load data</span></div> |
| <div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  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> </div> |
| <div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="comment">// Perform binary thresholding</span></div> |
| <div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  in_data = select((uchar16)false_val, (uchar16)true_val, in_data > (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> </div> |
| <div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="comment">// Store result</span></div> |
| <div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  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> }</div> |
| <div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00093">helpers.h:93</a></div></div> |
| <div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00131">helpers.h:131</a></div></div> |
| <div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00133">helpers.h:133</a></div></div> |
| <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< T > threshold(const SimpleTensor< T > &src, T threshold, T false_value, T true_value, ThresholdType type, T upper)</div><div class="ttdef"><b>Definition:</b> <a href="_c_p_p_2_threshold_8cpp_source.xhtml#l00035">Threshold.cpp:35</a></div></div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| <a class="anchor" id="a2e3f1b089d9b33880c9bb6e98f294bba"></a> |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">__kernel void threshold_range </td> |
| <td>(</td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>in_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>in_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>in_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>in_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>in_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>out_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>out_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>out_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>out_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>out_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const uchar </td> |
| <td class="paramname"><em>false_val</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const uchar </td> |
| <td class="paramname"><em>true_val</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const uchar </td> |
| <td class="paramname"><em>lower</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const uchar </td> |
| <td class="paramname"><em>upper</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Perform range thresholding on an image. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <tr><td class="paramdir">[in]</td><td class="paramname">false_val</td><td>False value </td></tr> |
| <tr><td class="paramdir">[in]</td><td class="paramname">true_val</td><td>True value </td></tr> |
| <tr><td class="paramdir">[in]</td><td class="paramname">lower</td><td>Lower threshold </td></tr> |
| <tr><td class="paramdir">[in]</td><td class="paramname">upper</td><td>Upper threshold </td></tr> |
| </table> |
| </dd> |
| </dl> |
| |
| <p>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> |
| |
| <p>References <a class="el" href="helpers_8h_source.xhtml#l00093">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00133">Image::ptr</a>.</p> |
| <div class="fragment"><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> {</div> |
| <div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="comment">// Get pixels pointer</span></div> |
| <div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <a class="code" href="struct_image.xhtml">Image</a> in = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(in);</div> |
| <div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(out);</div> |
| <div class="line"><a name="l00095"></a><span class="lineno"> 95</span> </div> |
| <div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="comment">// Load data</span></div> |
| <div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  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> </div> |
| <div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="comment">// Perform range thresholding</span></div> |
| <div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  in_data = select((uchar16)true_val, (uchar16)false_val, in_data > (uchar16)upper || in_data < (uchar16)lower);</div> |
| <div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div> |
| <div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="comment">// Store result</span></div> |
| <div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  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> }</div> |
| <div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00093">helpers.h:93</a></div></div> |
| <div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00131">helpers.h:131</a></div></div> |
| <div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00133">helpers.h:133</a></div></div> |
| </div><!-- fragment --> |
| </div> |
| </div> |
| </div><!-- contents --> |
| </div><!-- doc-content --> |
| <!-- start footer part --> |
| <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| <ul> |
| <li class="navelem"><a class="el" href="dir_55b5a5006e943fb664ff8cff3cfe7768.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_f6c3ae42d7e27145d0a3c3e38ca1c000.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_1b7ae9123c88e650426d50d95c19d414.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_b7c3d80b0dadb2139bc73b7161751c12.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="threshold_8cl.xhtml">threshold.cl</a></li> |
| <li class="footer">Generated on Thu Sep 28 2017 14:37:54 for Compute Library by |
| <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li> |
| </ul> |
| </div> |
| </body> |
| </html> |