blob: 8540dae54e36a14c72f5ed90bc31ffd3ecad6e1f [file] [log] [blame]
<!-- HTML header for doxygen 1.8.15-->
<!-- Remember to use version doxygen 1.8.15 +-->
<!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.15"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: src/core/CL/kernels/CLNonLinearFilterKernel.cpp Source File</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="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="stylesheet.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;">
<img alt="Compute Library" src="https://raw.githubusercontent.com/ARM-software/ComputeLibrary/gh-pages/ACL_logo.png" style="max-width: 100%;margin-top: 15px;margin-left: 10px"/>
<td style="padding-left: 0.5em;">
<div id="projectname">
&#160;<span id="projectnumber">20.02.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></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">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('_c_l_non_linear_filter_kernel_8cpp_source.xhtml','');});
/* @license-end */
</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)">
</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="headertitle">
<div class="title">CLNonLinearFilterKernel.cpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="_c_l_non_linear_filter_kernel_8cpp.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Copyright (c) 2017-2018 ARM Limited.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * of this software and associated documentation files (the &quot;Software&quot;), to</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * deal in the Software without restriction, including without limitation the</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_c_l_non_linear_filter_kernel_8h.xhtml">arm_compute/core/CL/kernels/CLNonLinearFilterKernel.h</a>&quot;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="core_2_c_l_2_c_l_helpers_8h.xhtml">arm_compute/core/CL/CLHelpers.h</a>&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_c_l_kernel_library_8h.xhtml">arm_compute/core/CL/CLKernelLibrary.h</a>&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_i_c_l_tensor_8h.xhtml">arm_compute/core/CL/ICLTensor.h</a>&quot;</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_open_c_l_8h.xhtml">arm_compute/core/CL/OpenCL.h</a>&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_error_8h.xhtml">arm_compute/core/Error.h</a>&quot;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="arm__compute_2core_2_helpers_8h.xhtml">arm_compute/core/Helpers.h</a>&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_tensor_info_8h.xhtml">arm_compute/core/TensorInfo.h</a>&quot;</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="arm__compute_2core_2_utils_8h.xhtml">arm_compute/core/Utils.h</a>&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_validate_8h.xhtml">arm_compute/core/Validate.h</a>&quot;</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_window_8h.xhtml">arm_compute/core/Window.h</a>&quot;</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="preprocessor">#include &lt;cstdlib&gt;</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="preprocessor">#include &lt;set&gt;</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="preprocessor">#include &lt;sstream&gt;</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespacearm__compute.xhtml">arm_compute</a>;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml#a84f1118322af5d0170abdef07b79779b"> 46</a></span>&#160;<a class="code" href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml#a84f1118322af5d0170abdef07b79779b">CLNonLinearFilterKernel::CLNonLinearFilterKernel</a>()</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; : _border_size(0)</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;{</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;}</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml#a423f9a45a52983b4de5e2b347f4369c7"> 51</a></span>&#160;<a class="code" href="structarm__compute_1_1_border_size.xhtml">BorderSize</a> <a class="code" href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml#a423f9a45a52983b4de5e2b347f4369c7">CLNonLinearFilterKernel::border_size</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordflow">return</span> _border_size;</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;</div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml#a09ed8b2a062c440ad00a290624c39319"> 56</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml#a09ed8b2a062c440ad00a290624c39319">CLNonLinearFilterKernel::configure</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_i_c_l_tensor.xhtml">ICLTensor</a> *<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>, <a class="code" href="classarm__compute_1_1_i_c_l_tensor.xhtml">ICLTensor</a> *output, <a class="code" href="namespacearm__compute.xhtml#adf2ced65e536375a1c96425d9fced858">NonLinearFilterFunction</a> <span class="keyword">function</span>,</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mask_size, <a class="code" href="namespacearm__compute.xhtml#afdda916edc7502967bbec17ea3c06c02">MatrixPattern</a> pattern, <span class="keyword">const</span> uint8_t *mask,</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="keywordtype">bool</span> border_undefined)</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;{</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <a class="code" href="_validate_8h.xhtml#aadf5c9cff86327b96d88d04649d9715e">ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>, 1, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <a class="code" href="_validate_8h.xhtml#aadf5c9cff86327b96d88d04649d9715e">ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN</a>(output, 1, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(mask_size != 3 &amp;&amp; mask_size != 5);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <a class="code" href="_error_8h.xhtml#a0b0eb3235749a2909dc5a101afe59a1b">ARM_COMPUTE_ERROR_ON_MSG</a>(pattern == <a class="code" href="namespacearm__compute.xhtml#afdda916edc7502967bbec17ea3c06c02a03570470bad94692ce93e32700d2e1cb">MatrixPattern::OTHER</a>, <span class="stringliteral">&quot;MatrixPattern::OTHER is not supported!&quot;</span>);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <a class="code" href="_error_8h.xhtml#a6dc630a6ae9cc063b3924bcea8dee9d6">ARM_COMPUTE_UNUSED</a>(mask);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; _input = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; _output = output;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; _border_size = <a class="code" href="structarm__compute_1_1_border_size.xhtml">BorderSize</a>(mask_size / 2);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="comment">// Define build options</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; std::set&lt;std::string&gt; build_opts;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; build_opts.emplace(<span class="stringliteral">&quot;-D&quot;</span> + <a class="code" href="namespacearm__compute.xhtml#a99248d472f05dbf03ac613620f5acbbb">string_from_non_linear_filter_function</a>(<span class="keyword">function</span>));</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="comment">// Define kernel</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; std::string pattern_name = <a class="code" href="namespacearm__compute.xhtml#a067481a9a245a2ee831a650e72a377ce">string_from_matrix_pattern</a>(pattern);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; std::transform(pattern_name.begin(), pattern_name.end(), pattern_name.begin(), <a class="code" href="namespacearm__compute_1_1utility.xhtml#abb96ad5c7071ec3a47ea5f07e817a636">::tolower</a>);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; std::stringstream ss;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; ss &lt;&lt; <span class="stringliteral">&quot;non_linear_filter_&quot;</span> &lt;&lt; pattern_name &lt;&lt; mask_size &lt;&lt; <span class="stringliteral">&quot;x&quot;</span> &lt;&lt; mask_size;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="comment">// Create kernel</span></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; _kernel = static_cast&lt;cl::Kernel&gt;(<a class="code" href="classarm__compute_1_1_c_l_kernel_library.xhtml#acba005f5ce2c62cbf3f94d074d9007aa">CLKernelLibrary::get</a>().<a class="code" href="namespacearm__compute.xhtml#abc72c95941485d8a068fa38372308574">create_kernel</a>(ss.str(), build_opts));</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="comment">// Configure kernel window</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; constexpr <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="_c_l_im2_col_kernel_8cpp.xhtml#a4e45c1f5e4280813a78a77dda71d8799">num_elems_processed_per_iteration</a> = 8;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; constexpr <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_elems_read_per_iteration = 16;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_rows_read_per_iteration = mask_size;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <a class="code" href="classarm__compute_1_1_window.xhtml">Window</a> win = <a class="code" href="namespacearm__compute.xhtml#ab7980fa5ee693e3282a76da047a1c3b5">calculate_max_window</a>(*<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>-&gt;info(), <a class="code" href="_c_l_im2_col_kernel_8cpp.xhtml#a4e45c1f5e4280813a78a77dda71d8799">num_elems_processed_per_iteration</a>, border_undefined, <a class="code" href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml#a423f9a45a52983b4de5e2b347f4369c7">border_size</a>());</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <a class="code" href="classarm__compute_1_1_access_window_rectangle.xhtml">AccessWindowRectangle</a> input_access(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>-&gt;info(), -<a class="code" href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml#a423f9a45a52983b4de5e2b347f4369c7">border_size</a>().<a class="code" href="structarm__compute_1_1_border_size.xhtml#a05374b750b0fc472c34ee61e6f028bba">left</a>, -<a class="code" href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml#a423f9a45a52983b4de5e2b347f4369c7">border_size</a>().<a class="code" href="structarm__compute_1_1_border_size.xhtml#a3fdd42ea34070a54e696b3adc28c4be3">top</a>, num_elems_read_per_iteration, num_rows_read_per_iteration);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <a class="code" href="classarm__compute_1_1_access_window_horizontal.xhtml">AccessWindowHorizontal</a> output_access(output-&gt;<a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">info</a>(), 0, <a class="code" href="_c_l_im2_col_kernel_8cpp.xhtml#a4e45c1f5e4280813a78a77dda71d8799">num_elems_processed_per_iteration</a>);</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <a class="code" href="namespacearm__compute.xhtml#afc4bd8e872567d9c4c57d89eb0bb3da1">update_window_and_padding</a>(win, input_access, output_access);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; output_access.set_valid_region(win, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>-&gt;info()-&gt;valid_region(), border_undefined, <a class="code" href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml#a423f9a45a52983b4de5e2b347f4369c7">border_size</a>());</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; ICLKernel::configure_internal(win);</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;}</div><div class="ttc" id="structarm__compute_1_1_border_size_xhtml_a3fdd42ea34070a54e696b3adc28c4be3"><div class="ttname"><a href="structarm__compute_1_1_border_size.xhtml#a3fdd42ea34070a54e696b3adc28c4be3">arm_compute::BorderSize::top</a></div><div class="ttdeci">unsigned int top</div><div class="ttdoc">top of the border</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00349">Types.h:349</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a067481a9a245a2ee831a650e72a377ce"><div class="ttname"><a href="namespacearm__compute.xhtml#a067481a9a245a2ee831a650e72a377ce">arm_compute::string_from_matrix_pattern</a></div><div class="ttdeci">const std::string &amp; string_from_matrix_pattern(MatrixPattern pattern)</div><div class="ttdoc">Convert a matrix pattern into a string.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_utils_8cpp_source.xhtml#l00194">Utils.cpp:194</a></div></div>
<div class="ttc" id="structarm__compute_1_1_border_size_xhtml"><div class="ttname"><a href="structarm__compute_1_1_border_size.xhtml">arm_compute::BorderSize</a></div><div class="ttdoc">Container for 2D border size.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00269">Types.h:269</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_non_linear_filter_kernel_xhtml_a09ed8b2a062c440ad00a290624c39319"><div class="ttname"><a href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml#a09ed8b2a062c440ad00a290624c39319">arm_compute::CLNonLinearFilterKernel::configure</a></div><div class="ttdeci">void configure(const ICLTensor *input, ICLTensor *output, NonLinearFilterFunction function, unsigned int mask_size, MatrixPattern pattern, const uint8_t *mask, bool border_undefined)</div><div class="ttdoc">Set the source, destination and border mode of the kernel.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_non_linear_filter_kernel_8cpp_source.xhtml#l00056">CLNonLinearFilterKernel.cpp:56</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">1 channel, 1 U8 per channel</div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_non_linear_filter_kernel_xhtml_a423f9a45a52983b4de5e2b347f4369c7"><div class="ttname"><a href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml#a423f9a45a52983b4de5e2b347f4369c7">arm_compute::CLNonLinearFilterKernel::border_size</a></div><div class="ttdeci">BorderSize border_size() const override</div><div class="ttdoc">The size of the border for that kernel.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_non_linear_filter_kernel_8cpp_source.xhtml#l00051">CLNonLinearFilterKernel.cpp:51</a></div></div>
<div class="ttc" id="_window_8h_xhtml"><div class="ttname"><a href="_window_8h.xhtml">Window.h</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON(cond)</div><div class="ttdoc">If the condition is true then an error message is printed and an exception thrown.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00466">Error.h:466</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_kernel_library_xhtml_acba005f5ce2c62cbf3f94d074d9007aa"><div class="ttname"><a href="classarm__compute_1_1_c_l_kernel_library.xhtml#acba005f5ce2c62cbf3f94d074d9007aa">arm_compute::CLKernelLibrary::get</a></div><div class="ttdeci">static CLKernelLibrary &amp; get()</div><div class="ttdoc">Access the KernelLibrary singleton.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_kernel_library_8cpp_source.xhtml#l01072">CLKernelLibrary.cpp:1072</a></div></div>
<div class="ttc" id="core_2_c_l_2_c_l_helpers_8h_xhtml"><div class="ttname"><a href="core_2_c_l_2_c_l_helpers_8h.xhtml">CLHelpers.h</a></div></div>
<div class="ttc" id="_tensor_info_8h_xhtml"><div class="ttname"><a href="_tensor_info_8h.xhtml">TensorInfo.h</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab7980fa5ee693e3282a76da047a1c3b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab7980fa5ee693e3282a76da047a1c3b5">arm_compute::calculate_max_window</a></div><div class="ttdeci">Window calculate_max_window(const ValidRegion &amp;valid_region, const Steps &amp;steps=Steps(), bool skip_border=false, BorderSize border_size=BorderSize())</div><div class="ttdoc">Calculate the maximum window for a given tensor shape and border setting.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_helpers_8cpp_source.xhtml#l00028">Helpers.cpp:28</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml"><div class="ttname"><a href="namespacearm__compute.xhtml">arm_compute</a></div><div class="ttdoc">Copyright (c) 2017-2020 ARM Limited.</div><div class="ttdef"><b>Definition:</b> <a href="00__introduction_8dox_source.xhtml#l00024">00_introduction.dox:24</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a8fcf2ddd9a1d58b1b280f5c0aed71845"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">arm_compute::test::validation::input</a></div><div class="ttdeci">auto input</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_l_s_t_m_layer_quantized_8cpp_source.xhtml#l00487">LSTMLayerQuantized.cpp:487</a></div></div>
<div class="ttc" id="arm__compute_2core_2_utils_8h_xhtml"><div class="ttname"><a href="arm__compute_2core_2_utils_8h.xhtml">Utils.h</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1utility_xhtml_abb96ad5c7071ec3a47ea5f07e817a636"><div class="ttname"><a href="namespacearm__compute_1_1utility.xhtml#abb96ad5c7071ec3a47ea5f07e817a636">arm_compute::utility::tolower</a></div><div class="ttdeci">std::string tolower(std::string string)</div><div class="ttdoc">Convert string to lower case.</div><div class="ttdef"><b>Definition:</b> <a href="_utility_8h_source.xhtml#l00203">Utility.h:203</a></div></div>
<div class="ttc" id="classarm__compute_1_1_access_window_rectangle_xhtml"><div class="ttname"><a href="classarm__compute_1_1_access_window_rectangle.xhtml">arm_compute::AccessWindowRectangle</a></div><div class="ttdoc">Implementation of a rectangular access pattern.</div><div class="ttdef"><b>Definition:</b> <a href="_i_access_window_8h_source.xhtml#l00107">IAccessWindow.h:107</a></div></div>
<div class="ttc" id="_c_l_non_linear_filter_kernel_8h_xhtml"><div class="ttname"><a href="_c_l_non_linear_filter_kernel_8h.xhtml">CLNonLinearFilterKernel.h</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_afc4bd8e872567d9c4c57d89eb0bb3da1"><div class="ttname"><a href="namespacearm__compute.xhtml#afc4bd8e872567d9c4c57d89eb0bb3da1">arm_compute::update_window_and_padding</a></div><div class="ttdeci">bool update_window_and_padding(Window &amp;win, Ts &amp;&amp;... patterns)</div><div class="ttdoc">Update window and padding size for each of the access patterns.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_helpers_8h_source.xhtml#l00402">Helpers.h:402</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a6dc630a6ae9cc063b3924bcea8dee9d6"><div class="ttname"><a href="_error_8h.xhtml#a6dc630a6ae9cc063b3924bcea8dee9d6">ARM_COMPUTE_UNUSED</a></div><div class="ttdeci">#define ARM_COMPUTE_UNUSED(...)</div><div class="ttdoc">To avoid unused variables warnings.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00152">Error.h:152</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a0b0eb3235749a2909dc5a101afe59a1b"><div class="ttname"><a href="_error_8h.xhtml#a0b0eb3235749a2909dc5a101afe59a1b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00456">Error.h:456</a></div></div>
<div class="ttc" id="classarm__compute_1_1_access_window_horizontal_xhtml"><div class="ttname"><a href="classarm__compute_1_1_access_window_horizontal.xhtml">arm_compute::AccessWindowHorizontal</a></div><div class="ttdoc">Implementation of a row access pattern.</div><div class="ttdef"><b>Definition:</b> <a href="_i_access_window_8h_source.xhtml#l00232">IAccessWindow.h:232</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_xhtml_a0e95dc1e53c361348314873b168ae237"><div class="ttname"><a href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">arm_compute::ITensor::info</a></div><div class="ttdeci">virtual ITensorInfo * info() const =0</div><div class="ttdoc">Interface to be implemented by the child class to return the tensor's metadata.</div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a99248d472f05dbf03ac613620f5acbbb"><div class="ttname"><a href="namespacearm__compute.xhtml#a99248d472f05dbf03ac613620f5acbbb">arm_compute::string_from_non_linear_filter_function</a></div><div class="ttdeci">const std::string &amp; string_from_non_linear_filter_function(NonLinearFilterFunction function)</div><div class="ttdoc">Translates a given non linear function to a string.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_utils_8cpp_source.xhtml#l00207">Utils.cpp:207</a></div></div>
<div class="ttc" id="_error_8h_xhtml"><div class="ttname"><a href="_error_8h.xhtml">Error.h</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_abc72c95941485d8a068fa38372308574"><div class="ttname"><a href="namespacearm__compute.xhtml#abc72c95941485d8a068fa38372308574">arm_compute::create_kernel</a></div><div class="ttdeci">std::unique_ptr&lt; Kernel &gt; create_kernel()</div><div class="ttdoc">Helper function to create and return a unique_ptr pointed to a CL/GLES kernel object.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_helpers_8h_source.xhtml#l00086">Helpers.h:86</a></div></div>
<div class="ttc" id="structarm__compute_1_1_border_size_xhtml_a05374b750b0fc472c34ee61e6f028bba"><div class="ttname"><a href="structarm__compute_1_1_border_size.xhtml#a05374b750b0fc472c34ee61e6f028bba">arm_compute::BorderSize::left</a></div><div class="ttdeci">unsigned int left</div><div class="ttdoc">left of the border</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00352">Types.h:352</a></div></div>
<div class="ttc" id="_validate_8h_xhtml_aadf5c9cff86327b96d88d04649d9715e"><div class="ttname"><a href="_validate_8h.xhtml#aadf5c9cff86327b96d88d04649d9715e">ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)</div><div class="ttdef"><b>Definition:</b> <a href="_validate_8h_source.xhtml#l00790">Validate.h:790</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_non_linear_filter_kernel_xhtml_a84f1118322af5d0170abdef07b79779b"><div class="ttname"><a href="classarm__compute_1_1_c_l_non_linear_filter_kernel.xhtml#a84f1118322af5d0170abdef07b79779b">arm_compute::CLNonLinearFilterKernel::CLNonLinearFilterKernel</a></div><div class="ttdeci">CLNonLinearFilterKernel()</div><div class="ttdoc">Default constructor.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_non_linear_filter_kernel_8cpp_source.xhtml#l00046">CLNonLinearFilterKernel.cpp:46</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_c_l_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1_i_c_l_tensor.xhtml">arm_compute::ICLTensor</a></div><div class="ttdoc">Interface for OpenCL tensor.</div><div class="ttdef"><b>Definition:</b> <a href="_i_c_l_tensor_8h_source.xhtml#l00042">ICLTensor.h:42</a></div></div>
<div class="ttc" id="_i_c_l_tensor_8h_xhtml"><div class="ttname"><a href="_i_c_l_tensor_8h.xhtml">ICLTensor.h</a></div></div>
<div class="ttc" id="_c_l_kernel_library_8h_xhtml"><div class="ttname"><a href="_c_l_kernel_library_8h.xhtml">CLKernelLibrary.h</a></div></div>
<div class="ttc" id="_open_c_l_8h_xhtml"><div class="ttname"><a href="_open_c_l_8h.xhtml">OpenCL.h</a></div></div>
<div class="ttc" id="_c_l_im2_col_kernel_8cpp_xhtml_a4e45c1f5e4280813a78a77dda71d8799"><div class="ttname"><a href="_c_l_im2_col_kernel_8cpp.xhtml#a4e45c1f5e4280813a78a77dda71d8799">num_elems_processed_per_iteration</a></div><div class="ttdeci">unsigned int num_elems_processed_per_iteration</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_im2_col_kernel_8cpp_source.xhtml#l00054">CLIm2ColKernel.cpp:54</a></div></div>
<div class="ttc" id="arm__compute_2core_2_helpers_8h_xhtml"><div class="ttname"><a href="arm__compute_2core_2_helpers_8h.xhtml">Helpers.h</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_afdda916edc7502967bbec17ea3c06c02"><div class="ttname"><a href="namespacearm__compute.xhtml#afdda916edc7502967bbec17ea3c06c02">arm_compute::MatrixPattern</a></div><div class="ttdeci">MatrixPattern</div><div class="ttdoc">Available matrix patterns.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00478">Types.h:478</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_afdda916edc7502967bbec17ea3c06c02a03570470bad94692ce93e32700d2e1cb"><div class="ttname"><a href="namespacearm__compute.xhtml#afdda916edc7502967bbec17ea3c06c02a03570470bad94692ce93e32700d2e1cb">arm_compute::MatrixPattern::OTHER</a></div><div class="ttdoc">Any other matrix pattern.</div></div>
<div class="ttc" id="classarm__compute_1_1_window_xhtml"><div class="ttname"><a href="classarm__compute_1_1_window.xhtml">arm_compute::Window</a></div><div class="ttdoc">Describe a multidimensional execution window.</div><div class="ttdef"><b>Definition:</b> <a href="_window_8h_source.xhtml#l00039">Window.h:39</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_adf2ced65e536375a1c96425d9fced858"><div class="ttname"><a href="namespacearm__compute.xhtml#adf2ced65e536375a1c96425d9fced858">arm_compute::NonLinearFilterFunction</a></div><div class="ttdeci">NonLinearFilterFunction</div><div class="ttdoc">Available non linear functions.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00487">Types.h:487</a></div></div>
<div class="ttc" id="_validate_8h_xhtml"><div class="ttname"><a href="_validate_8h.xhtml">Validate.h</a></div></div>
</div><!-- fragment --></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_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_8a6a287e420ec4de95804825506d2fde.xhtml">kernels</a></li><li class="navelem"><a class="el" href="_c_l_non_linear_filter_kernel_8cpp.xhtml">CLNonLinearFilterKernel.cpp</a></li>
<li class="footer">Generated on Thu Mar 5 2020 16:06:59 for Compute Library by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
</ul>
</div>
</body>
</html>