blob: 4cb927fc0e1675ab11b30c0b86ddcd901a5d9240 [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: Iterator Class 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="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('classarm__compute_1_1_iterator.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="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">Iterator Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classarm__compute_1_1_iterator.xhtml" title="Iterator updated by execute_window_loop for each window element.">Iterator</a> updated by <a class="el" href="namespacearm__compute.xhtml#a5002bf7ec46d52971f9526e94172cfee">execute_window_loop</a> for each window element.
<a href="classarm__compute_1_1_iterator.xhtml#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml">Helpers.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a45381773d6cba2ad9e9d2d04515fa40b"><td class="memItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_iterator.xhtml#a45381773d6cba2ad9e9d2d04515fa40b">Iterator</a> ()</td></tr>
<tr class="memdesc:a45381773d6cba2ad9e9d2d04515fa40b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor to create an empty iterator. <a href="#a45381773d6cba2ad9e9d2d04515fa40b">More...</a><br /></td></tr>
<tr class="separator:a45381773d6cba2ad9e9d2d04515fa40b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92d6469b972ef1e52b55b1ad7da70b02"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_iterator.xhtml#a92d6469b972ef1e52b55b1ad7da70b02">Iterator</a> (const <a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> *tensor, const <a class="el" href="classarm__compute_1_1_window.xhtml">Window</a> &amp;window)</td></tr>
<tr class="memdesc:a92d6469b972ef1e52b55b1ad7da70b02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a container iterator for the metadata and allocation contained in the <a class="el" href="classarm__compute_1_1_i_tensor.xhtml" title="Interface for NEON tensor.">ITensor</a>. <a href="#a92d6469b972ef1e52b55b1ad7da70b02">More...</a><br /></td></tr>
<tr class="separator:a92d6469b972ef1e52b55b1ad7da70b02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e507a84d19ad08bb0f7fc1558ec429a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_iterator.xhtml#a6e507a84d19ad08bb0f7fc1558ec429a">increment</a> (size_t dimension)</td></tr>
<tr class="memdesc:a6e507a84d19ad08bb0f7fc1558ec429a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Increment the iterator along the specified dimension of the step value associated to the dimension. <a href="#a6e507a84d19ad08bb0f7fc1558ec429a">More...</a><br /></td></tr>
<tr class="separator:a6e507a84d19ad08bb0f7fc1558ec429a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d48061a9abb9959505f167fb02e53e1"><td class="memItemLeft" align="right" valign="top">constexpr int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_iterator.xhtml#a7d48061a9abb9959505f167fb02e53e1">offset</a> () const</td></tr>
<tr class="memdesc:a7d48061a9abb9959505f167fb02e53e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the offset in bytes from the first element to the current position of the iterator. <a href="#a7d48061a9abb9959505f167fb02e53e1">More...</a><br /></td></tr>
<tr class="separator:a7d48061a9abb9959505f167fb02e53e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab260e292b1df3944bc1d55a9b2301e41"><td class="memItemLeft" align="right" valign="top">constexpr uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_iterator.xhtml#ab260e292b1df3944bc1d55a9b2301e41">ptr</a> () const</td></tr>
<tr class="memdesc:ab260e292b1df3944bc1d55a9b2301e41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a pointer to the current pixel. <a href="#ab260e292b1df3944bc1d55a9b2301e41">More...</a><br /></td></tr>
<tr class="separator:ab260e292b1df3944bc1d55a9b2301e41"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a599f5025b7e6b8bfead740a88e56d5bc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_iterator.xhtml#a599f5025b7e6b8bfead740a88e56d5bc">reset</a> (size_t dimension)</td></tr>
<tr class="memdesc:a599f5025b7e6b8bfead740a88e56d5bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move the iterator back to the beginning of the specified dimension. <a href="#a599f5025b7e6b8bfead740a88e56d5bc">More...</a><br /></td></tr>
<tr class="separator:a599f5025b7e6b8bfead740a88e56d5bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classarm__compute_1_1_iterator.xhtml" title="Iterator updated by execute_window_loop for each window element.">Iterator</a> updated by <a class="el" href="namespacearm__compute.xhtml#a5002bf7ec46d52971f9526e94172cfee">execute_window_loop</a> for each window element. </p>
<p class="definition">Definition at line <a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml#l00318">318</a> of file <a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml">Helpers.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a45381773d6cba2ad9e9d2d04515fa40b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45381773d6cba2ad9e9d2d04515fa40b">&#9670;&nbsp;</a></span>Iterator() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr <a class="el" href="classarm__compute_1_1_iterator.xhtml">Iterator</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor to create an empty iterator. </p>
<p class="definition">Definition at line <a class="el" href="_helpers_8inl_source.xhtml#l00136">136</a> of file <a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a>.</p>
<div class="fragment"><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; : _ptr(<span class="keyword">nullptr</span>), _dims()</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;{</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a id="a92d6469b972ef1e52b55b1ad7da70b02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92d6469b972ef1e52b55b1ad7da70b02">&#9670;&nbsp;</a></span>Iterator() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_iterator.xhtml">Iterator</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> *&#160;</td>
<td class="paramname"><em>tensor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_window.xhtml">Window</a> &amp;&#160;</td>
<td class="paramname"><em>window</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a container iterator for the metadata and allocation contained in the <a class="el" href="classarm__compute_1_1_i_tensor.xhtml" title="Interface for NEON tensor.">ITensor</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">tensor</td><td>The tensor to associate to the iterator. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window which will be used to iterate over the tensor. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_helpers_8inl_source.xhtml#l00141">141</a> of file <a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a>.</p>
<div class="fragment"><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; : <a class="code" href="classarm__compute_1_1_iterator.xhtml#a45381773d6cba2ad9e9d2d04515fa40b">Iterator</a>()</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;{</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(tensor == <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(tensor-&gt;info() == <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keyword">const</span> ITensorInfo *<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a> = tensor-&gt;info();</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="keyword">const</span> Strides &amp;strides = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>-&gt;strides_in_bytes();</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; _ptr = tensor-&gt;buffer() + <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>-&gt;offset_first_element_in_bytes();</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; <span class="comment">//Initialize the stride for each dimension and calculate the position of the first element of the iteration:</span></div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n = 0; n &lt; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>-&gt;num_dimensions(); ++n)</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; {</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; _dims[n]._stride = win[n].step() * strides[n];</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; std::get&lt;0&gt;(_dims)._dim_start += strides[n] * win[n].start();</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; }</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="comment">//Copy the starting point to all the dimensions:</span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n = 1; n &lt; <a class="code" href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">Coordinates::num_max_dimensions</a>; ++n)</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; {</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; _dims[n]._dim_start = std::get&lt;0&gt;(_dims)._dim_start;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; }</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <a class="code" href="_validate_8h.xhtml#af5084ef537306d09b1ef82aed5d1f63f">ARM_COMPUTE_ERROR_ON_WINDOW_DIMENSIONS_GTE</a>(win, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>-&gt;num_dimensions());</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;}</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_iterator_xhtml_a45381773d6cba2ad9e9d2d04515fa40b"><div class="ttname"><a href="classarm__compute_1_1_iterator.xhtml#a45381773d6cba2ad9e9d2d04515fa40b">arm_compute::Iterator::Iterator</a></div><div class="ttdeci">constexpr Iterator()</div><div class="ttdoc">Default constructor to create an empty iterator.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00136">Helpers.inl:136</a></div></div>
<div class="ttc" id="_validate_8h_xhtml_af5084ef537306d09b1ef82aed5d1f63f"><div class="ttname"><a href="_validate_8h.xhtml#af5084ef537306d09b1ef82aed5d1f63f">ARM_COMPUTE_ERROR_ON_WINDOW_DIMENSIONS_GTE</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_WINDOW_DIMENSIONS_GTE(w, md)</div><div class="ttdef"><b>Definition:</b> <a href="_validate_8h_source.xhtml#l00263">Validate.h:263</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a4f4125dba5283887b34f889b1c615c0c"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">arm_compute::test::validation::info</a></div><div class="ttdeci">info</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_layer_8cpp_source.xhtml#l00182">ConvolutionLayer.cpp:182</a></div></div>
<div class="ttc" id="classarm__compute_1_1_dimensions_xhtml_a1b67d5b720119d50faa286c774579ecc"><div class="ttname"><a href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">arm_compute::Dimensions&lt; int &gt;::num_max_dimensions</a></div><div class="ttdeci">static constexpr size_t num_max_dimensions</div><div class="ttdoc">Number of dimensions the tensor has.</div><div class="ttdef"><b>Definition:</b> <a href="_dimensions_8h_source.xhtml#l00045">Dimensions.h:45</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00466">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_validate_8h_source.xhtml#l00263">ARM_COMPUTE_ERROR_ON_WINDOW_DIMENSIONS_GTE</a>, <a class="el" href="classarm__compute_1_1_i_tensor.xhtml#ab988210662dbd3bf32fd563c7dd1bdbf">ITensor::buffer()</a>, <a class="el" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">ITensor::info()</a>, <a class="el" href="_c_l_2_convolution_layer_8cpp_source.xhtml#l00182">arm_compute::test::validation::info</a>, and <a class="el" href="_dimensions_8h_source.xhtml#l00045">Dimensions&lt; int &gt;::num_max_dimensions</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a6e507a84d19ad08bb0f7fc1558ec429a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e507a84d19ad08bb0f7fc1558ec429a">&#9670;&nbsp;</a></span>increment()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void increment </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>dimension</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Increment the iterator along the specified dimension of the step value associated to the dimension. </p>
<dl class="section warning"><dt>Warning</dt><dd>It is the caller's responsibility to call increment(dimension+1) when reaching the end of a dimension, the iterator will not check for overflow.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>When incrementing a dimension 'n' the coordinates of all the dimensions in the range (0,n-1) are reset. For example if you iterate over a 2D image, everytime you change row (dimension 1), the iterator for the width (dimension 0) is reset to its start.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">dimension</td><td>Dimension to increment </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_helpers_8inl_source.xhtml#l00168">168</a> of file <a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a>.</p>
<div class="fragment"><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;{</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(dimension &gt;= <a class="code" href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">Coordinates::num_max_dimensions</a>);</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160;</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; _dims[dimension]._dim_start += _dims[dimension]._stride;</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n = 0; n &lt; dimension; ++n)</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; {</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; _dims[n]._dim_start = _dims[dimension]._dim_start;</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; }</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;}</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_dimensions_xhtml_a1b67d5b720119d50faa286c774579ecc"><div class="ttname"><a href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">arm_compute::Dimensions&lt; int &gt;::num_max_dimensions</a></div><div class="ttdeci">static constexpr size_t num_max_dimensions</div><div class="ttdoc">Number of dimensions the tensor has.</div><div class="ttdef"><b>Definition:</b> <a href="_dimensions_8h_source.xhtml#l00045">Dimensions.h:45</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00466">ARM_COMPUTE_ERROR_ON</a>, and <a class="el" href="_dimensions_8h_source.xhtml#l00045">Dimensions&lt; int &gt;::num_max_dimensions</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_gaussian_pyramid_kernel_8cpp_source.xhtml#l00208">NEGaussianPyramidVertKernel::run()</a>.</p>
</div>
</div>
<a id="a7d48061a9abb9959505f167fb02e53e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d48061a9abb9959505f167fb02e53e1">&#9670;&nbsp;</a></span>offset()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr int offset </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the offset in bytes from the first element to the current position of the iterator. </p>
<dl class="section return"><dt>Returns</dt><dd>The current position of the iterator in bytes relative to the first element. </dd></dl>
<p class="definition">Definition at line <a class="el" href="_helpers_8inl_source.xhtml#l00180">180</a> of file <a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a>.</p>
<div class="fragment"><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160;{</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <span class="keywordflow">return</span> _dims.at(0)._dim_start;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="_n_e_integral_image_kernel_8cpp_source.xhtml#l00074">NEIntegralImageKernel::run()</a>, <a class="el" href="_n_e_memset_kernel_8cpp_source.xhtml#l00051">NEMemsetKernel::run()</a>, <a class="el" href="_n_e_width_concatenate_layer_kernel_8cpp_source.xhtml#l00105">NEWidthConcatenateLayerKernel::run()</a>, <a class="el" href="_n_e_height_concatenate_layer_kernel_8cpp_source.xhtml#l00105">NEHeightConcatenateLayerKernel::run()</a>, <a class="el" href="_n_e_gaussian_pyramid_kernel_8cpp_source.xhtml#l00208">NEGaussianPyramidVertKernel::run()</a>, and <a class="el" href="_n_e_sobel5x5_kernel_8cpp_source.xhtml#l00265">NESobel5x5VertKernel::run()</a>.</p>
</div>
</div>
<a id="ab260e292b1df3944bc1d55a9b2301e41"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab260e292b1df3944bc1d55a9b2301e41">&#9670;&nbsp;</a></span>ptr()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr uint8_t * ptr </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return a pointer to the current pixel. </p>
<dl class="section warning"><dt>Warning</dt><dd>Only works if the iterator was created with an <a class="el" href="classarm__compute_1_1_i_tensor.xhtml" title="Interface for NEON tensor.">ITensor</a>.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>equivalent to buffer() + <a class="el" href="classarm__compute_1_1_iterator.xhtml#a7d48061a9abb9959505f167fb02e53e1" title="Return the offset in bytes from the first element to the current position of the iterator.">offset()</a> </dd></dl>
<p class="definition">Definition at line <a class="el" href="_helpers_8inl_source.xhtml#l00185">185</a> of file <a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a>.</p>
<div class="fragment"><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;{</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="keywordflow">return</span> _ptr + _dims.at(0)._dim_start;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00952">arm_compute::colorconvert_rgb_to_iyuv()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00909">arm_compute::colorconvert_rgb_to_nv12()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00321">arm_compute::colorconvert_rgb_to_rgbx()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00352">arm_compute::colorconvert_rgb_to_u8()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00996">arm_compute::colorconvert_rgb_to_yuv4()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00380">arm_compute::colorconvert_rgbx_to_rgb()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00732">arm_compute::colorconvert_yuyv_to_iyuv()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00580">arm_compute::colorconvert_yuyv_to_nv12()</a>, <a class="el" href="_n_e_color_convert_helper_8inl_source.xhtml#l00411">arm_compute::colorconvert_yuyv_to_rgb()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00795">arm_compute::utils::compare_tensor()</a>, <a class="el" href="_i_tensor_8cpp_source.xhtml#l00035">ITensor::copy_from()</a>, <a class="el" href="_image_loader_8h_source.xhtml#l00177">IImageLoader::fill_image()</a>, <a class="el" href="_image_loader_8h_source.xhtml#l00257">IImageLoader::fill_planar_tensor()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00728">arm_compute::utils::fill_random_tensor()</a>, <a class="el" href="_c_p_p_flip_weights_kernel_8cpp_source.xhtml#l00045">CPPFlipWeightsKernel::flip_weights()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00681">arm_compute::utils::load_trained_data()</a>, <a class="el" href="_c_l_min_max_layer_kernel_8cpp_source.xhtml#l00119">CLMinMaxLayerKernel::reset()</a>, <a class="el" href="_n_e_min_max_layer_kernel_8cpp_source.xhtml#l00192">NEMinMaxLayerKernel::reset()</a>, <a class="el" href="_n_e_integral_image_kernel_8cpp_source.xhtml#l00074">NEIntegralImageKernel::run()</a>, <a class="el" href="_n_e_median3x3_kernel_8cpp_source.xhtml#l00077">NEMedian3x3Kernel::run()</a>, <a class="el" href="_n_e_gaussian3x3_kernel_8cpp_source.xhtml#l00067">NEGaussian3x3Kernel::run()</a>, <a class="el" href="_n_e_gaussian5x5_kernel_8cpp_source.xhtml#l00076">NEGaussian5x5HorKernel::run()</a>, <a class="el" href="_n_e_accumulate_kernel_8cpp_source.xhtml#l00266">NEAccumulateKernel::run()</a>, <a class="el" href="_n_e_floor_kernel_8cpp_source.xhtml#l00101">NEFloorKernel::run()</a>, <a class="el" href="_n_e_gaussian_pyramid_kernel_8cpp_source.xhtml#l00108">NEGaussianPyramidHorKernel::run()</a>, <a class="el" href="_c_p_p_upsample_kernel_8cpp_source.xhtml#l00068">CPPUpsampleKernel::run()</a>, <a class="el" href="_n_e_g_e_m_m_matrix_accumulate_biases_kernel_8cpp_source.xhtml#l00108">NEGEMMMatrixAccumulateBiasesKernel::run()</a>, <a class="el" href="_n_e_non_maxima_suppression3x3_kernel_8cpp_source.xhtml#l00498">NENonMaximaSuppression3x3Kernel::run()</a>, <a class="el" href="_n_e_sobel5x5_kernel_8cpp_source.xhtml#l00093">NESobel5x5HorKernel::run()</a>, <a class="el" href="_n_e_sobel7x7_kernel_8cpp_source.xhtml#l00196">NESobel7x7HorKernel::run()</a>, <a class="el" href="_n_e_canny_edge_kernel_8cpp_source.xhtml#l00942">NEGradientKernel::run()</a>, <a class="el" href="_n_e_convert_quantized_signedness_kernel_8cpp_source.xhtml#l00095">NEConvertQuantizedSignednessKernel::run()</a>, <a class="el" href="_n_e_tile_kernel_8cpp_source.xhtml#l00090">NETileKernel::run()</a>, <a class="el" href="_n_e_copy_kernel_8cpp_source.xhtml#l00118">NECopyKernel::run()</a>, <a class="el" href="_n_e_depth_to_space_layer_kernel_8cpp_source.xhtml#l00098">NEDepthToSpaceLayerKernel::run()</a>, <a class="el" href="_n_e_space_to_depth_layer_kernel_8cpp_source.xhtml#l00099">NESpaceToDepthLayerKernel::run()</a>, <a class="el" href="_n_e_f_f_t_scale_kernel_8cpp_source.xhtml#l00118">NEFFTScaleKernel::run()</a>, <a class="el" href="_n_e_sobel3x3_kernel_8cpp_source.xhtml#l00091">NESobel3x3Kernel::run()</a>, <a class="el" href="_n_e_scharr3x3_kernel_8cpp_source.xhtml#l00138">NEScharr3x3Kernel::run()</a>, <a class="el" href="_n_e_reorg_layer_kernel_8cpp_source.xhtml#l00101">NEReorgLayerKernel::run()</a>, <a class="el" href="_n_e_gaussian5x5_kernel_8cpp_source.xhtml#l00144">NEGaussian5x5VertKernel::run()</a>, <a class="el" href="_n_e_min_max_layer_kernel_8cpp_source.xhtml#l00117">NEMinMaxLayerKernel::run()</a>, <a class="el" href="_n_e_f_f_t_radix_stage_kernel_8cpp_source.xhtml#l01040">NEFFTRadixStageKernel::run()</a>, <a class="el" href="_n_e_stack_layer_kernel_8cpp_source.xhtml#l00116">NEStackLayerKernel::run()</a>, <a class="el" href="_n_e_depth_convert_layer_kernel_8cpp_source.xhtml#l00143">NEDepthConvertLayerKernel::run()</a>, <a class="el" href="_n_e_accumulate_kernel_8cpp_source.xhtml#l00305">NEAccumulateWeightedKernel::run()</a>, <a class="el" href="_n_e_batch_to_space_layer_kernel_8cpp_source.xhtml#l00137">NEBatchToSpaceLayerKernel::run()</a>, <a class="el" href="_n_e_g_e_m_m_transpose1x_w_kernel_8cpp_source.xhtml#l00122">NEGEMMTranspose1xWKernel::run()</a>, <a class="el" href="_n_e_space_to_batch_layer_kernel_8cpp_source.xhtml#l00144">NESpaceToBatchLayerKernel::run()</a>, <a class="el" href="_n_e_gaussian_pyramid_kernel_8cpp_source.xhtml#l00208">NEGaussianPyramidVertKernel::run()</a>, <a class="el" href="_n_e_weights_reshape_kernel_8cpp_source.xhtml#l00127">NEWeightsReshapeKernel::run()</a>, <a class="el" href="_n_e_sobel5x5_kernel_8cpp_source.xhtml#l00265">NESobel5x5VertKernel::run()</a>, <a class="el" href="_n_e_sobel7x7_kernel_8cpp_source.xhtml#l00355">NESobel7x7VertKernel::run()</a>, <a class="el" href="_n_e_accumulate_kernel_8cpp_source.xhtml#l00348">NEAccumulateSquaredKernel::run()</a>, <a class="el" href="_n_e_reverse_kernel_8cpp_source.xhtml#l00099">arm_compute::run_reverse()</a>, and <a class="el" href="tests_2validation_2_n_e_o_n_2_u_n_i_t_2_runtime_context_8cpp_source.xhtml#l00099">arm_compute::test::validation::TEST_CASE()</a>.</p>
</div>
</div>
<a id="a599f5025b7e6b8bfead740a88e56d5bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a599f5025b7e6b8bfead740a88e56d5bc">&#9670;&nbsp;</a></span>reset()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void reset </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>dimension</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Move the iterator back to the beginning of the specified dimension. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">dimension</td><td>Dimension to reset </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_helpers_8inl_source.xhtml#l00190">190</a> of file <a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a>.</p>
<div class="fragment"><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;{</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(dimension &gt;= <a class="code" href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">Coordinates::num_max_dimensions</a> - 1);</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; _dims[dimension]._dim_start = _dims[dimension + 1]._dim_start;</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n = 0; n &lt; dimension; ++n)</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; {</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; _dims[n]._dim_start = _dims[dimension]._dim_start;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; }</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;}</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_dimensions_xhtml_a1b67d5b720119d50faa286c774579ecc"><div class="ttname"><a href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">arm_compute::Dimensions&lt; int &gt;::num_max_dimensions</a></div><div class="ttdeci">static constexpr size_t num_max_dimensions</div><div class="ttdoc">Number of dimensions the tensor has.</div><div class="ttdef"><b>Definition:</b> <a href="_dimensions_8h_source.xhtml#l00045">Dimensions.h:45</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00466">ARM_COMPUTE_ERROR_ON</a>, and <a class="el" href="_dimensions_8h_source.xhtml#l00045">Dimensions&lt; int &gt;::num_max_dimensions</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>arm_compute/core/<a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml">Helpers.h</a></li>
<li>arm_compute/core/<a class="el" href="_helpers_8inl_source.xhtml">Helpers.inl</a></li>
</ul>
</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="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1_iterator.xhtml">Iterator</a></li>
<li class="footer">Generated on Thu Mar 5 2020 16:07:14 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>