arm_compute v18.05
[platform/upstream/armcl.git] / documentation / classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml
index c100fe1..4f7e7c1 100644 (file)
@@ -40,7 +40,7 @@
  <tr style="height: 56px;">
   <td style="padding-left: 0.5em;">
    <div id="projectname">Compute Library
-   &#160;<span id="projectnumber">17.12</span>
+   &#160;<span id="projectnumber">18.05</span>
    </div>
   </td>
  </tr>
@@ -159,7 +159,7 @@ Public Member Functions</h2></td></tr>
 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
 <div class="textblock"><p>Class to load the content of a PPM file into an <a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a>. </p>
 
-<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00237">237</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
+<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00259">259</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
 </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
 <a class="anchor" id="a49afa04c8a5fd9ead48e07440b37294c"></a>
 <div class="memitem">
@@ -182,8 +182,8 @@ Public Member Functions</h2></td></tr>
 </table>
 </div><div class="memdoc">
 
-<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00240">240</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
-<div class="fragment"><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;        : _fs(), _width(0), _height(0)</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    {</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    }</div></div><!-- fragment -->
+<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00262">262</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
+<div class="fragment"><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;        : _fs(), _width(0), _height(0)</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;    {</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    }</div></div><!-- fragment -->
 </div>
 </div>
 <h2 class="groupheader">Member Function Documentation</h2>
@@ -218,29 +218,27 @@ Public Member Functions</h2></td></tr>
   </dd>
 </dl>
 
-<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00296">296</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
+<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00318">318</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
 
-<p>References <a class="el" href="core_2_error_8h_source.xhtml#l00238">ARM_COMPUTE_ERROR</a>, <a class="el" href="core_2_error_8h_source.xhtml#l00306">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_validate_8h_source.xhtml#l00574">ARM_COMPUTE_ERROR_ON_FORMAT_NOT_IN</a>, <a class="el" href="core_2_error_8h_source.xhtml#l00297">ARM_COMPUTE_ERROR_ON_MSG</a>, <a class="el" href="core_2_error_8h_source.xhtml#l00147">ARM_COMPUTE_UNUSED</a>, <a class="el" href="_window_8h_source.xhtml#l00043">Window::DimX</a>, <a class="el" href="_window_8h_source.xhtml#l00045">Window::DimY</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00127">arm_compute::execute_window_loop()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00268">PPMLoader::is_open()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00158">arm_compute::utils::map()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00183">Iterator::ptr()</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::RGB888</a>, <a class="el" href="_window_8inl_source.xhtml#l00040">Window::set()</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>, and <a class="el" href="utils_2_utils_8h_source.xhtml#l00169">arm_compute::utils::unmap()</a>.</p>
-
-<p>Referenced by <a class="el" href="cl__convolution_8cpp_source.xhtml#l00056">main_cl_convolution()</a>, <a class="el" href="cl__events_8cpp_source.xhtml#l00036">main_cl_events()</a>, <a class="el" href="gc__absdiff_8cpp_source.xhtml#l00037">main_gc_absdiff()</a>, <a class="el" href="neon__cartoon__effect_8cpp_source.xhtml#l00033">main_neon_cartoon_effect()</a>, <a class="el" href="neon__convolution_8cpp_source.xhtml#l00052">main_neon_convolution()</a>, <a class="el" href="neon__scale_8cpp_source.xhtml#l00032">main_neon_scale()</a>, and <a class="el" href="neoncl__scale__median__gaussian_8cpp_source.xhtml#l00042">main_neoncl_scale_median_gaussian()</a>.</p>
-<div class="fragment"><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;    {</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;        <a class="code" href="core_2_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!<a class="code" href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">is_open</a>());</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        <a class="code" href="core_2_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(image.info()-&gt;dimension(0) != _width || image.info()-&gt;dimension(1) != _height);</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        <a class="code" href="_validate_8h.xhtml#a0d34a8aa07600727e4e5034c7cdad47d">ARM_COMPUTE_ERROR_ON_FORMAT_NOT_IN</a>(&amp;image, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a>, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::Format::RGB888</a>);</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;        <span class="keywordflow">try</span></div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;        {</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;            <span class="comment">// Map buffer if creating a CLTensor/GCTensor</span></div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;            <a class="code" href="namespacearm__compute_1_1utils.xhtml#a9c3303817ba653b5d1e78efb88d02bcf">map</a>(image, <span class="keyword">true</span>);</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;            <span class="comment">// Check if the file is large enough to fill the image</span></div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">size_t</span> current_position = _fs.tellg();</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;            _fs.seekg(0, std::ios_base::end);</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">size_t</span> end_position = _fs.tellg();</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;            _fs.seekg(current_position, std::ios_base::beg);</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;            <a class="code" href="core_2_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>((end_position - current_position) &lt; image.info()-&gt;tensor_shape().total_size() * image.info()-&gt;element_size(),</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;                                     <span class="stringliteral">&quot;Not enough data in file&quot;</span>);</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;            <a class="code" href="core_2_error_8h.xhtml#a4103adbb45806b2f2002d44b91d0d206">ARM_COMPUTE_UNUSED</a>(end_position);</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;            <span class="keywordflow">switch</span>(image.info()-&gt;format())</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;            {</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a>:</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;                {</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;                    <span class="comment">// We need to convert the data from RGB to grayscale:</span></div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;                    <span class="comment">// Iterate through every pixel of the image</span></div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;                    <a class="code" href="classarm__compute_1_1_window.xhtml">arm_compute::Window</a> window;</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;                    window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#aa96e81276ee4f87ab386cd05a5539a7d">arm_compute::Window::DimX</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, _width, 1));</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;                    window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#ad2d402364fa822b0b7775081291eeca9">arm_compute::Window::DimY</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, _height, 1));</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;                    <a class="code" href="classarm__compute_1_1_iterator.xhtml">arm_compute::Iterator</a> out(&amp;image, window);</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;                    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> red   = 0;</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;                    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> green = 0;</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;                    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> blue  = 0;</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;                    <a class="code" href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a>(window, [&amp;](<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_coordinates.xhtml">arm_compute::Coordinates</a> &amp; <span class="keywordtype">id</span>)</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;                    {</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;                        red   = _fs.get();</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;                        green = _fs.get();</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;                        blue  = _fs.get();</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;                        *out.ptr() = 0.2126f * red + 0.7152f * green + 0.0722f * blue;</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;                    },</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;                    out);</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;                    <span class="keywordflow">break</span>;</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;                }</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::Format::RGB888</a>:</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;                {</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;                    <span class="comment">// There is no format conversion needed: we can simply copy the content of the input file to the image one row at the time.</span></div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;                    <span class="comment">// Create a vertical window to iterate through the image&#39;s rows:</span></div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;                    <a class="code" href="classarm__compute_1_1_window.xhtml">arm_compute::Window</a> window;</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;                    window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#ad2d402364fa822b0b7775081291eeca9">arm_compute::Window::DimY</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, _height, 1));</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;                    <a class="code" href="classarm__compute_1_1_iterator.xhtml">arm_compute::Iterator</a> out(&amp;image, window);</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;                    <a class="code" href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a>(window, [&amp;](<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_coordinates.xhtml">arm_compute::Coordinates</a> &amp; <span class="keywordtype">id</span>)</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;                    {</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;                        <span class="comment">// Copy one row from the input file to the current row of the image:</span></div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;                        _fs.read(reinterpret_cast&lt;std::fstream::char_type *&gt;(out.ptr()), _width * image.info()-&gt;element_size());</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;                    },</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;                    out);</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;                    <span class="keywordflow">break</span>;</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;                }</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;                <span class="keywordflow">default</span>:</div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;                    <a class="code" href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Unsupported format&quot;</span>);</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;            }</div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;            <span class="comment">// Unmap buffer if creating a CLTensor/GCTensor</span></div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;            <a class="code" href="namespacearm__compute_1_1utils.xhtml#a4ff2134cb88cb5a27120cddb98b59774">unmap</a>(image);</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;        }</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;        <span class="keywordflow">catch</span>(<span class="keyword">const</span> std::ifstream::failure &amp;e)</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;        {</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;            <a class="code" href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Loading PPM file: %s&quot;</span>, e.what());</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;        }</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    }</div><div class="ttc" id="core_2_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="core_2_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="core_2_error_8h_source.xhtml#l00306">Error.h:306</a></div></div>
+<p>References <a class="el" href="_error_8h_source.xhtml#l00260">ARM_COMPUTE_ERROR</a>, <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_validate_8h_source.xhtml#l00707">ARM_COMPUTE_ERROR_ON_FORMAT_NOT_IN</a>, <a class="el" href="_error_8h_source.xhtml#l00319">ARM_COMPUTE_ERROR_ON_MSG</a>, <a class="el" href="_error_8h_source.xhtml#l00159">ARM_COMPUTE_UNUSED</a>, <a class="el" href="_window_8h_source.xhtml#l00043">Window::DimX</a>, <a class="el" href="_window_8h_source.xhtml#l00045">Window::DimY</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00122">arm_compute::execute_window_loop()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00180">arm_compute::utils::map()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00184">Iterator::ptr()</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::RGB888</a>, <a class="el" href="_window_8inl_source.xhtml#l00041">Window::set()</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>, and <a class="el" href="utils_2_utils_8h_source.xhtml#l00191">arm_compute::utils::unmap()</a>.</p>
+<div class="fragment"><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;    {</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;        <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!<a class="code" href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">is_open</a>());</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;        <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(image.info()-&gt;dimension(0) != _width || image.info()-&gt;dimension(1) != _height);</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;        <a class="code" href="_validate_8h.xhtml#a0d34a8aa07600727e4e5034c7cdad47d">ARM_COMPUTE_ERROR_ON_FORMAT_NOT_IN</a>(&amp;image, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a>, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::Format::RGB888</a>);</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;        <span class="keywordflow">try</span></div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;        {</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;            <span class="comment">// Map buffer if creating a CLTensor/GCTensor</span></div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;            <a class="code" href="namespacearm__compute_1_1utils.xhtml#a9c3303817ba653b5d1e78efb88d02bcf">map</a>(image, <span class="keyword">true</span>);</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;            <span class="comment">// Check if the file is large enough to fill the image</span></div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">size_t</span> current_position = _fs.tellg();</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;            _fs.seekg(0, std::ios_base::end);</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">size_t</span> end_position = _fs.tellg();</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;            _fs.seekg(current_position, std::ios_base::beg);</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;            <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>((end_position - current_position) &lt; image.info()-&gt;tensor_shape().total_size() * image.info()-&gt;element_size(),</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;                                     <span class="stringliteral">&quot;Not enough data in file&quot;</span>);</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;            <a class="code" href="_error_8h.xhtml#a6dc630a6ae9cc063b3924bcea8dee9d6">ARM_COMPUTE_UNUSED</a>(end_position);</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;            <span class="keywordflow">switch</span>(image.info()-&gt;format())</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;            {</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a>:</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;                {</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;                    <span class="comment">// We need to convert the data from RGB to grayscale:</span></div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;                    <span class="comment">// Iterate through every pixel of the image</span></div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;                    <a class="code" href="classarm__compute_1_1_window.xhtml">arm_compute::Window</a> window;</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;                    window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#aa96e81276ee4f87ab386cd05a5539a7d">arm_compute::Window::DimX</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, _width, 1));</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;                    window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#ad2d402364fa822b0b7775081291eeca9">arm_compute::Window::DimY</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, _height, 1));</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;                    <a class="code" href="classarm__compute_1_1_iterator.xhtml">arm_compute::Iterator</a> out(&amp;image, window);</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;                    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> red   = 0;</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;                    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> green = 0;</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;                    <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> blue  = 0;</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;                    <a class="code" href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a>(window, [&amp;](<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_coordinates.xhtml">arm_compute::Coordinates</a> &amp; <span class="keywordtype">id</span>)</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;                    {</div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;                        red   = _fs.get();</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;                        green = _fs.get();</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;                        blue  = _fs.get();</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;                        *out.ptr() = 0.2126f * red + 0.7152f * green + 0.0722f * blue;</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;                    },</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;                    out);</div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;                    <span class="keywordflow">break</span>;</div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;                }</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;                <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::Format::RGB888</a>:</div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;                {</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;                    <span class="comment">// There is no format conversion needed: we can simply copy the content of the input file to the image one row at the time.</span></div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;                    <span class="comment">// Create a vertical window to iterate through the image&#39;s rows:</span></div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;                    <a class="code" href="classarm__compute_1_1_window.xhtml">arm_compute::Window</a> window;</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;                    window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#ad2d402364fa822b0b7775081291eeca9">arm_compute::Window::DimY</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, _height, 1));</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;                    <a class="code" href="classarm__compute_1_1_iterator.xhtml">arm_compute::Iterator</a> out(&amp;image, window);</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;                    <a class="code" href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a>(window, [&amp;](<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_coordinates.xhtml">arm_compute::Coordinates</a> &amp; <span class="keywordtype">id</span>)</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;                    {</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;                        <span class="comment">// Copy one row from the input file to the current row of the image:</span></div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;                        _fs.read(reinterpret_cast&lt;std::fstream::char_type *&gt;(out.ptr()), _width * image.info()-&gt;element_size());</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;                    },</div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;                    out);</div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;</div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;                    <span class="keywordflow">break</span>;</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;                }</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;                <span class="keywordflow">default</span>:</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;                    <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Unsupported format&quot;</span>);</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;            }</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;            <span class="comment">// Unmap buffer if creating a CLTensor/GCTensor</span></div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;            <a class="code" href="namespacearm__compute_1_1utils.xhtml#a4ff2134cb88cb5a27120cddb98b59774">unmap</a>(image);</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;        }</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;        <span class="keywordflow">catch</span>(<span class="keyword">const</span> std::ifstream::failure &amp;e)</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;        {</div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;            <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Loading PPM file: %s&quot;</span>, e.what());</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;        }</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;    }</div><div class="ttc" id="_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00260">Error.h:260</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="_validate_8h_xhtml_a0d34a8aa07600727e4e5034c7cdad47d"><div class="ttname"><a href="_validate_8h.xhtml#a0d34a8aa07600727e4e5034c7cdad47d">ARM_COMPUTE_ERROR_ON_FORMAT_NOT_IN</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_FORMAT_NOT_IN(t,...)</div><div class="ttdef"><b>Definition:</b> <a href="_validate_8h_source.xhtml#l00574">Validate.h:574</a></div></div>
-<div class="ttc" id="core_2_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00238">Error.h:238</a></div></div>
+<div class="ttc" id="_validate_8h_xhtml_a0d34a8aa07600727e4e5034c7cdad47d"><div class="ttname"><a href="_validate_8h.xhtml#a0d34a8aa07600727e4e5034c7cdad47d">ARM_COMPUTE_ERROR_ON_FORMAT_NOT_IN</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_FORMAT_NOT_IN(t,...)</div><div class="ttdef"><b>Definition:</b> <a href="_validate_8h_source.xhtml#l00707">Validate.h:707</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#l00328">Error.h:328</a></div></div>
 <div class="ttc" id="classarm__compute_1_1_window_1_1_dimension_xhtml"><div class="ttname"><a href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a></div><div class="ttdoc">Describe one of the image&amp;#39;s dimensions with a start, end and step. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8h_source.xhtml#l00068">Window.h:68</a></div></div>
-<div class="ttc" id="core_2_error_8h_xhtml_a4103adbb45806b2f2002d44b91d0d206"><div class="ttname"><a href="core_2_error_8h.xhtml#a4103adbb45806b2f2002d44b91d0d206">ARM_COMPUTE_UNUSED</a></div><div class="ttdeci">#define ARM_COMPUTE_UNUSED(var)</div><div class="ttdoc">To avoid unused variables warnings. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00147">Error.h:147</a></div></div>
-<div class="ttc" id="namespacearm__compute_1_1utils_xhtml_a4ff2134cb88cb5a27120cddb98b59774"><div class="ttname"><a href="namespacearm__compute_1_1utils.xhtml#a4ff2134cb88cb5a27120cddb98b59774">arm_compute::utils::unmap</a></div><div class="ttdeci">void unmap(T &amp;tensor)</div><div class="ttdoc">Unmaps a tensor if needed. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00169">Utils.h:169</a></div></div>
+<div class="ttc" id="namespacearm__compute_1_1utils_xhtml_a4ff2134cb88cb5a27120cddb98b59774"><div class="ttname"><a href="namespacearm__compute_1_1utils.xhtml#a4ff2134cb88cb5a27120cddb98b59774">arm_compute::utils::unmap</a></div><div class="ttdeci">void unmap(T &amp;tensor)</div><div class="ttdoc">Unmaps a tensor if needed. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00191">Utils.h:191</a></div></div>
 <div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::Format::RGB888</a></div><div class="ttdoc">3 channels, 1 U8 per channel </div></div>
 <div class="ttc" id="classarm__compute_1_1_window_xhtml_aa96e81276ee4f87ab386cd05a5539a7d"><div class="ttname"><a href="classarm__compute_1_1_window.xhtml#aa96e81276ee4f87ab386cd05a5539a7d">arm_compute::Window::DimX</a></div><div class="ttdeci">static constexpr size_t DimX</div><div class="ttdoc">Alias for dimension 0 also known as X dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8h_source.xhtml#l00043">Window.h:43</a></div></div>
-<div class="ttc" id="namespacearm__compute_xhtml_a6c0dcc38187027dcb89cd9724bc5a823"><div class="ttname"><a href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a></div><div class="ttdeci">void execute_window_loop(const Window &amp;w, L &amp;&amp;lambda_function, Ts &amp;&amp;...iterators)</div><div class="ttdoc">Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00127">Helpers.inl:127</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#l00159">Error.h:159</a></div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_a6c0dcc38187027dcb89cd9724bc5a823"><div class="ttname"><a href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a></div><div class="ttdeci">void execute_window_loop(const Window &amp;w, L &amp;&amp;lambda_function, Ts &amp;&amp;...iterators)</div><div class="ttdoc">Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00122">Helpers.inl:122</a></div></div>
 <div class="ttc" id="classarm__compute_1_1_coordinates_xhtml"><div class="ttname"><a href="classarm__compute_1_1_coordinates.xhtml">arm_compute::Coordinates</a></div><div class="ttdoc">Coordinates of an item. </div><div class="ttdef"><b>Definition:</b> <a href="_coordinates_8h_source.xhtml#l00037">Coordinates.h:37</a></div></div>
-<div class="ttc" id="classarm__compute_1_1utils_1_1_p_p_m_loader_xhtml_a2f57f54d8c03b615bb31eee091d8a88a"><div class="ttname"><a href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">arm_compute::utils::PPMLoader::is_open</a></div><div class="ttdeci">bool is_open()</div><div class="ttdoc">Return true if a PPM file is currently open. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00268">Utils.h:268</a></div></div>
-<div class="ttc" id="classarm__compute_1_1_window_xhtml_acd3d2bba51cb84d34dd7656ad2375a6e"><div class="ttname"><a href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">arm_compute::Window::set</a></div><div class="ttdeci">void set(size_t dimension, const Dimension &amp;dim)</div><div class="ttdoc">Set the values of a given dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8inl_source.xhtml#l00040">Window.inl:40</a></div></div>
+<div class="ttc" id="classarm__compute_1_1utils_1_1_p_p_m_loader_xhtml_a2f57f54d8c03b615bb31eee091d8a88a"><div class="ttname"><a href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">arm_compute::utils::PPMLoader::is_open</a></div><div class="ttdeci">bool is_open()</div><div class="ttdoc">Return true if a PPM file is currently open. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00290">Utils.h:290</a></div></div>
+<div class="ttc" id="classarm__compute_1_1_window_xhtml_acd3d2bba51cb84d34dd7656ad2375a6e"><div class="ttname"><a href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">arm_compute::Window::set</a></div><div class="ttdeci">void set(size_t dimension, const Dimension &amp;dim)</div><div class="ttdoc">Set the values of a given dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8inl_source.xhtml#l00041">Window.inl:41</a></div></div>
 <div class="ttc" id="classarm__compute_1_1_window_xhtml_ad2d402364fa822b0b7775081291eeca9"><div class="ttname"><a href="classarm__compute_1_1_window.xhtml#ad2d402364fa822b0b7775081291eeca9">arm_compute::Window::DimY</a></div><div class="ttdeci">static constexpr size_t DimY</div><div class="ttdoc">Alias for dimension 1 also known as Y dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8h_source.xhtml#l00045">Window.h:45</a></div></div>
-<div class="ttc" id="namespacearm__compute_1_1utils_xhtml_a9c3303817ba653b5d1e78efb88d02bcf"><div class="ttname"><a href="namespacearm__compute_1_1utils.xhtml#a9c3303817ba653b5d1e78efb88d02bcf">arm_compute::utils::map</a></div><div class="ttdeci">void map(T &amp;tensor, bool blocking)</div><div class="ttdoc">Maps a tensor if needed. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00158">Utils.h:158</a></div></div>
-<div class="ttc" id="core_2_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="core_2_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00297">Error.h:297</a></div></div>
-<div class="ttc" id="classarm__compute_1_1_iterator_xhtml"><div class="ttname"><a href="classarm__compute_1_1_iterator.xhtml">arm_compute::Iterator</a></div><div class="ttdoc">Iterator updated by execute_window_loop for each window element. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_helpers_8h_source.xhtml#l00323">Helpers.h:323</a></div></div>
+<div class="ttc" id="namespacearm__compute_1_1utils_xhtml_a9c3303817ba653b5d1e78efb88d02bcf"><div class="ttname"><a href="namespacearm__compute_1_1utils.xhtml#a9c3303817ba653b5d1e78efb88d02bcf">arm_compute::utils::map</a></div><div class="ttdeci">void map(T &amp;tensor, bool blocking)</div><div class="ttdoc">Maps a tensor if needed. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00180">Utils.h:180</a></div></div>
+<div class="ttc" id="classarm__compute_1_1_iterator_xhtml"><div class="ttname"><a href="classarm__compute_1_1_iterator.xhtml">arm_compute::Iterator</a></div><div class="ttdoc">Iterator updated by execute_window_loop for each window element. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_helpers_8h_source.xhtml#l00284">Helpers.h:284</a></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="_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00319">Error.h:319</a></div></div>
 </div><!-- fragment -->
 </div>
 </div>
@@ -286,30 +284,36 @@ Public Member Functions</h2></td></tr>
   </dd>
 </dl>
 
-<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00383">383</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
+<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00405">405</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
 
-<p>References <a class="el" href="core_2_error_8h_source.xhtml#l00238">ARM_COMPUTE_ERROR</a>, <a class="el" href="core_2_error_8h_source.xhtml#l00306">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_validate_8h_source.xhtml#l00669">ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN</a>, <a class="el" href="core_2_error_8h_source.xhtml#l00297">ARM_COMPUTE_ERROR_ON_MSG</a>, <a class="el" href="core_2_error_8h_source.xhtml#l00147">ARM_COMPUTE_UNUSED</a>, <a class="el" href="_window_8h_source.xhtml#l00043">Window::DimX</a>, <a class="el" href="_window_8h_source.xhtml#l00045">Window::DimY</a>, <a class="el" href="_window_8h_source.xhtml#l00047">Window::DimZ</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00127">arm_compute::execute_window_loop()</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::F32</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00268">PPMLoader::is_open()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00158">arm_compute::utils::map()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00183">Iterator::ptr()</a>, <a class="el" href="_window_8inl_source.xhtml#l00040">Window::set()</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>, and <a class="el" href="utils_2_utils_8h_source.xhtml#l00169">arm_compute::utils::unmap()</a>.</p>
+<p>References <a class="el" href="_error_8h_source.xhtml#l00260">ARM_COMPUTE_ERROR</a>, <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_validate_8h_source.xhtml#l00802">ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN</a>, <a class="el" href="_error_8h_source.xhtml#l00319">ARM_COMPUTE_ERROR_ON_MSG</a>, <a class="el" href="_error_8h_source.xhtml#l00159">ARM_COMPUTE_UNUSED</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="_window_8h_source.xhtml#l00043">Window::DimX</a>, <a class="el" href="_window_8h_source.xhtml#l00045">Window::DimY</a>, <a class="el" href="_window_8h_source.xhtml#l00047">Window::DimZ</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00122">arm_compute::execute_window_loop()</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::F32</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00340">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00180">arm_compute::utils::map()</a>, <a class="el" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">arm_compute::NCHW</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00184">Iterator::ptr()</a>, <a class="el" href="_window_8inl_source.xhtml#l00041">Window::set()</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00191">arm_compute::utils::unmap()</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
 
-<p>Referenced by <a class="el" href="_graph_utils_8cpp_source.xhtml#l00088">PPMAccessor::access_tensor()</a>.</p>
-<div class="fragment"><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;    {</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;        <a class="code" href="core_2_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!<a class="code" href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">is_open</a>());</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;        <a class="code" href="_validate_8h.xhtml#aadf5c9cff86327b96d88d04649d9715e">ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN</a>(&amp;tensor, 1, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>);</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;        <a class="code" href="core_2_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(tensor.info()-&gt;dimension(0) != _width || tensor.info()-&gt;dimension(1) != _height || tensor.info()-&gt;dimension(2) != 3);</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;        <span class="keywordflow">try</span></div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;        {</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;            <span class="comment">// Map buffer if creating a CLTensor</span></div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;            <a class="code" href="namespacearm__compute_1_1utils.xhtml#a9c3303817ba653b5d1e78efb88d02bcf">map</a>(tensor, <span class="keyword">true</span>);</div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;            <span class="comment">// Check if the file is large enough to fill the image</span></div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">size_t</span> current_position = _fs.tellg();</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;            _fs.seekg(0, std::ios_base::end);</div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">size_t</span> end_position = _fs.tellg();</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;            _fs.seekg(current_position, std::ios_base::beg);</div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;</div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;            <a class="code" href="core_2_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>((end_position - current_position) &lt; tensor.info()-&gt;tensor_shape().total_size(),</div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;                                     <span class="stringliteral">&quot;Not enough data in file&quot;</span>);</div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;            <a class="code" href="core_2_error_8h.xhtml#a4103adbb45806b2f2002d44b91d0d206">ARM_COMPUTE_UNUSED</a>(end_position);</div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;</div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;            <span class="comment">// Iterate through every pixel of the image</span></div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;            <a class="code" href="classarm__compute_1_1_window.xhtml">arm_compute::Window</a> window;</div><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;            window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#aa96e81276ee4f87ab386cd05a5539a7d">arm_compute::Window::DimX</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, _width, 1));</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;            window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#ad2d402364fa822b0b7775081291eeca9">arm_compute::Window::DimY</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, _height, 1));</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;            window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#a893d17b56b9abc4423ce26e9a24ac5dc">arm_compute::Window::DimZ</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, 1, 1));</div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;</div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;            <a class="code" href="classarm__compute_1_1_iterator.xhtml">arm_compute::Iterator</a> out(&amp;tensor, window);</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;</div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> red   = 0;</div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> green = 0;</div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> blue  = 0;</div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;            <span class="keywordtype">size_t</span> stride_z = tensor.info()-&gt;strides_in_bytes()[2];</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;            <a class="code" href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a>(window, [&amp;](<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_coordinates.xhtml">arm_compute::Coordinates</a> &amp; <span class="keywordtype">id</span>)</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;            {</div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;                red   = _fs.get();</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;                green = _fs.get();</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;                blue  = _fs.get();</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;</div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;                <span class="keywordflow">switch</span>(tensor.info()-&gt;data_type())</div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;                {</div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;                    <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::DataType::U8</a>:</div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;                    {</div><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;                        *(out.ptr() + 0 * stride_z) = bgr ? blue : red;</div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;                        *(out.ptr() + 1 * stride_z) = green;</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;                        *(out.ptr() + 2 * stride_z) = bgr ? red : blue;</div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;                    }</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;                    <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::DataType::F32</a>:</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;                    {</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;                        *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">float</span> *<span class="keyword">&gt;</span>(out.ptr() + 0 * stride_z) = static_cast&lt;float&gt;(bgr ? blue : red);</div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;                        *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">float</span> *<span class="keyword">&gt;</span>(out.ptr() + 1 * stride_z) = static_cast&lt;float&gt;(green);</div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;                        *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">float</span> *<span class="keyword">&gt;</span>(out.ptr() + 2 * stride_z) = static_cast&lt;float&gt;(bgr ? red : blue);</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;                    }</div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;                    <span class="keywordflow">default</span>:</div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;                    {</div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;                        <a class="code" href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Unsupported data type&quot;</span>);</div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;                    }</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;                }</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;            },</div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;            out);</div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;</div><div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;            <span class="comment">// Unmap buffer if creating a CLTensor</span></div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;            <a class="code" href="namespacearm__compute_1_1utils.xhtml#a4ff2134cb88cb5a27120cddb98b59774">unmap</a>(tensor);</div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;        }</div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;        <span class="keywordflow">catch</span>(<span class="keyword">const</span> std::ifstream::failure &amp;e)</div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;        {</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;            <a class="code" href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Loading PPM file: %s&quot;</span>, e.what());</div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;        }</div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;    }</div><div class="ttc" id="core_2_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="core_2_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="core_2_error_8h_source.xhtml#l00306">Error.h:306</a></div></div>
+<p>Referenced by <a class="el" href="_graph_utils_8cpp_source.xhtml#l00176">PPMAccessor::access_tensor()</a>.</p>
+<div class="fragment"><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;    {</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;        <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!<a class="code" href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">is_open</a>());</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;        <a class="code" href="_validate_8h.xhtml#aadf5c9cff86327b96d88d04649d9715e">ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN</a>(&amp;tensor, 1, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>);</div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;</div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;        <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a>  data_layout  = tensor.info()-&gt;data_layout();</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;        <span class="keyword">const</span> TensorShape tensor_shape = tensor.info()-&gt;tensor_shape();</div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;</div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;        <a class="code" href="_error_8h.xhtml#a6dc630a6ae9cc063b3924bcea8dee9d6">ARM_COMPUTE_UNUSED</a>(tensor_shape);</div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;        <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(tensor_shape[<a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(data_layout, <a class="code" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">DataLayoutDimension::WIDTH</a>)] != _width);</div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;        <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(tensor_shape[<a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(data_layout, <a class="code" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">DataLayoutDimension::HEIGHT</a>)] != _height);</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;        <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(tensor_shape[<a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(data_layout, <a class="code" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">DataLayoutDimension::CHANNEL</a>)] != 3);</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;        <span class="keywordflow">try</span></div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;        {</div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;            <span class="comment">// Map buffer if creating a CLTensor</span></div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;            <a class="code" href="namespacearm__compute_1_1utils.xhtml#a9c3303817ba653b5d1e78efb88d02bcf">map</a>(tensor, <span class="keyword">true</span>);</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;            <span class="comment">// Check if the file is large enough to fill the image</span></div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">size_t</span> current_position = _fs.tellg();</div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;            _fs.seekg(0, std::ios_base::end);</div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;            <span class="keyword">const</span> <span class="keywordtype">size_t</span> end_position = _fs.tellg();</div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;            _fs.seekg(current_position, std::ios_base::beg);</div><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;</div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;            <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>((end_position - current_position) &lt; tensor.info()-&gt;tensor_shape().total_size(),</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;                                     <span class="stringliteral">&quot;Not enough data in file&quot;</span>);</div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;            <a class="code" href="_error_8h.xhtml#a6dc630a6ae9cc063b3924bcea8dee9d6">ARM_COMPUTE_UNUSED</a>(end_position);</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;            <span class="comment">// Stride across channels</span></div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;            <span class="keywordtype">size_t</span> stride_z = 0;</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;</div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;            <span class="comment">// Iterate through every pixel of the image</span></div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;            <a class="code" href="classarm__compute_1_1_window.xhtml">arm_compute::Window</a> window;</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;            <span class="keywordflow">if</span>(data_layout == <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">DataLayout::NCHW</a>)</div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;            {</div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;                window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#aa96e81276ee4f87ab386cd05a5539a7d">arm_compute::Window::DimX</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, _width, 1));</div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;                window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#ad2d402364fa822b0b7775081291eeca9">arm_compute::Window::DimY</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, _height, 1));</div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;                window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#a893d17b56b9abc4423ce26e9a24ac5dc">arm_compute::Window::DimZ</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, 1, 1));</div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;                stride_z = tensor.info()-&gt;strides_in_bytes()[2];</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;            }</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;            <span class="keywordflow">else</span></div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;            {</div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;                window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#aa96e81276ee4f87ab386cd05a5539a7d">arm_compute::Window::DimX</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, 1, 1));</div><div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;                window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#ad2d402364fa822b0b7775081291eeca9">arm_compute::Window::DimY</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, _width, 1));</div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;                window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#a893d17b56b9abc4423ce26e9a24ac5dc">arm_compute::Window::DimZ</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a>(0, _height, 1));</div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;                stride_z = tensor.info()-&gt;strides_in_bytes()[0];</div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;            }</div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;            <a class="code" href="classarm__compute_1_1_iterator.xhtml">arm_compute::Iterator</a> out(&amp;tensor, window);</div><div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;</div><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> red   = 0;</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> green = 0;</div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> blue  = 0;</div><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;</div><div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;            <a class="code" href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a>(window, [&amp;](<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_coordinates.xhtml">arm_compute::Coordinates</a> &amp; <span class="keywordtype">id</span>)</div><div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;            {</div><div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;                red   = _fs.get();</div><div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;                green = _fs.get();</div><div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;                blue  = _fs.get();</div><div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;</div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;                <span class="keywordflow">switch</span>(tensor.info()-&gt;data_type())</div><div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;                {</div><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;                    <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::DataType::U8</a>:</div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;                    {</div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;                        *(out.ptr() + 0 * stride_z) = bgr ? blue : red;</div><div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;                        *(out.ptr() + 1 * stride_z) = green;</div><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;                        *(out.ptr() + 2 * stride_z) = bgr ? red : blue;</div><div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;                    }</div><div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;                    <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::DataType::F32</a>:</div><div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;                    {</div><div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;                        *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">float</span> *<span class="keyword">&gt;</span>(out.ptr() + 0 * stride_z) = static_cast&lt;float&gt;(bgr ? blue : red);</div><div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;                        *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">float</span> *<span class="keyword">&gt;</span>(out.ptr() + 1 * stride_z) = static_cast&lt;float&gt;(green);</div><div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;                        *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">float</span> *<span class="keyword">&gt;</span>(out.ptr() + 2 * stride_z) = static_cast&lt;float&gt;(bgr ? red : blue);</div><div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;                        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;                    }</div><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;                    <span class="keywordflow">default</span>:</div><div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;                    {</div><div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;                        <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Unsupported data type&quot;</span>);</div><div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;                    }</div><div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;                }</div><div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;            },</div><div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;            out);</div><div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;</div><div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;            <span class="comment">// Unmap buffer if creating a CLTensor</span></div><div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;            <a class="code" href="namespacearm__compute_1_1utils.xhtml#a4ff2134cb88cb5a27120cddb98b59774">unmap</a>(tensor);</div><div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;        }</div><div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;        <span class="keywordflow">catch</span>(<span class="keyword">const</span> std::ifstream::failure &amp;e)</div><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;        {</div><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;            <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Loading PPM file: %s&quot;</span>, e.what());</div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;        }</div><div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;    }</div><div class="ttc" id="_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00260">Error.h:260</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="core_2_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00238">Error.h:238</a></div></div>
 <div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::Format::F32</a></div><div class="ttdoc">1 channel, 1 F32 per channel </div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6"><div class="ttname"><a href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::DataLayoutDimension::HEIGHT</a></div><div class="ttdoc">height </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#l00328">Error.h:328</a></div></div>
 <div class="ttc" id="classarm__compute_1_1_window_1_1_dimension_xhtml"><div class="ttname"><a href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a></div><div class="ttdoc">Describe one of the image&amp;#39;s dimensions with a start, end and step. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8h_source.xhtml#l00068">Window.h:68</a></div></div>
-<div class="ttc" id="core_2_error_8h_xhtml_a4103adbb45806b2f2002d44b91d0d206"><div class="ttname"><a href="core_2_error_8h.xhtml#a4103adbb45806b2f2002d44b91d0d206">ARM_COMPUTE_UNUSED</a></div><div class="ttdeci">#define ARM_COMPUTE_UNUSED(var)</div><div class="ttdoc">To avoid unused variables warnings. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00147">Error.h:147</a></div></div>
-<div class="ttc" id="namespacearm__compute_1_1utils_xhtml_a4ff2134cb88cb5a27120cddb98b59774"><div class="ttname"><a href="namespacearm__compute_1_1utils.xhtml#a4ff2134cb88cb5a27120cddb98b59774">arm_compute::utils::unmap</a></div><div class="ttdeci">void unmap(T &amp;tensor)</div><div class="ttdoc">Unmaps a tensor if needed. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00169">Utils.h:169</a></div></div>
+<div class="ttc" id="namespacearm__compute_1_1utils_xhtml_a4ff2134cb88cb5a27120cddb98b59774"><div class="ttname"><a href="namespacearm__compute_1_1utils.xhtml#a4ff2134cb88cb5a27120cddb98b59774">arm_compute::utils::unmap</a></div><div class="ttdeci">void unmap(T &amp;tensor)</div><div class="ttdoc">Unmaps a tensor if needed. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00191">Utils.h:191</a></div></div>
 <div class="ttc" id="classarm__compute_1_1_window_xhtml_aa96e81276ee4f87ab386cd05a5539a7d"><div class="ttname"><a href="classarm__compute_1_1_window.xhtml#aa96e81276ee4f87ab386cd05a5539a7d">arm_compute::Window::DimX</a></div><div class="ttdeci">static constexpr size_t DimX</div><div class="ttdoc">Alias for dimension 0 also known as X dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8h_source.xhtml#l00043">Window.h:43</a></div></div>
-<div class="ttc" id="namespacearm__compute_xhtml_a6c0dcc38187027dcb89cd9724bc5a823"><div class="ttname"><a href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a></div><div class="ttdeci">void execute_window_loop(const Window &amp;w, L &amp;&amp;lambda_function, Ts &amp;&amp;...iterators)</div><div class="ttdoc">Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00127">Helpers.inl:127</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#l00159">Error.h:159</a></div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_a6c0dcc38187027dcb89cd9724bc5a823"><div class="ttname"><a href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a></div><div class="ttdeci">void execute_window_loop(const Window &amp;w, L &amp;&amp;lambda_function, Ts &amp;&amp;...iterators)</div><div class="ttdoc">Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00122">Helpers.inl:122</a></div></div>
 <div class="ttc" id="classarm__compute_1_1_coordinates_xhtml"><div class="ttname"><a href="classarm__compute_1_1_coordinates.xhtml">arm_compute::Coordinates</a></div><div class="ttdoc">Coordinates of an item. </div><div class="ttdef"><b>Definition:</b> <a href="_coordinates_8h_source.xhtml#l00037">Coordinates.h:37</a></div></div>
-<div class="ttc" id="classarm__compute_1_1utils_1_1_p_p_m_loader_xhtml_a2f57f54d8c03b615bb31eee091d8a88a"><div class="ttname"><a href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">arm_compute::utils::PPMLoader::is_open</a></div><div class="ttdeci">bool is_open()</div><div class="ttdoc">Return true if a PPM file is currently open. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00268">Utils.h:268</a></div></div>
-<div class="ttc" id="classarm__compute_1_1_window_xhtml_acd3d2bba51cb84d34dd7656ad2375a6e"><div class="ttname"><a href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">arm_compute::Window::set</a></div><div class="ttdeci">void set(size_t dimension, const Dimension &amp;dim)</div><div class="ttdoc">Set the values of a given dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8inl_source.xhtml#l00040">Window.inl:40</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#l00669">Validate.h:669</a></div></div>
+<div class="ttc" id="classarm__compute_1_1utils_1_1_p_p_m_loader_xhtml_a2f57f54d8c03b615bb31eee091d8a88a"><div class="ttname"><a href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">arm_compute::utils::PPMLoader::is_open</a></div><div class="ttdeci">bool is_open()</div><div class="ttdoc">Return true if a PPM file is currently open. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00290">Utils.h:290</a></div></div>
+<div class="ttc" id="classarm__compute_1_1_window_xhtml_acd3d2bba51cb84d34dd7656ad2375a6e"><div class="ttname"><a href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">arm_compute::Window::set</a></div><div class="ttdeci">void set(size_t dimension, const Dimension &amp;dim)</div><div class="ttdoc">Set the values of a given dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8inl_source.xhtml#l00041">Window.inl:41</a></div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229"><div class="ttname"><a href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::DataLayoutDimension::CHANNEL</a></div><div class="ttdoc">channel </div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">arm_compute::DataLayout::NCHW</a></div><div class="ttdoc">Num samples, channels, height, width. </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#l00802">Validate.h:802</a></div></div>
 <div class="ttc" id="classarm__compute_1_1_window_xhtml_ad2d402364fa822b0b7775081291eeca9"><div class="ttname"><a href="classarm__compute_1_1_window.xhtml#ad2d402364fa822b0b7775081291eeca9">arm_compute::Window::DimY</a></div><div class="ttdeci">static constexpr size_t DimY</div><div class="ttdoc">Alias for dimension 1 also known as Y dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8h_source.xhtml#l00045">Window.h:45</a></div></div>
-<div class="ttc" id="namespacearm__compute_1_1utils_xhtml_a9c3303817ba653b5d1e78efb88d02bcf"><div class="ttname"><a href="namespacearm__compute_1_1utils.xhtml#a9c3303817ba653b5d1e78efb88d02bcf">arm_compute::utils::map</a></div><div class="ttdeci">void map(T &amp;tensor, bool blocking)</div><div class="ttdoc">Maps a tensor if needed. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00158">Utils.h:158</a></div></div>
+<div class="ttc" id="namespacearm__compute_1_1utils_xhtml_a9c3303817ba653b5d1e78efb88d02bcf"><div class="ttname"><a href="namespacearm__compute_1_1utils.xhtml#a9c3303817ba653b5d1e78efb88d02bcf">arm_compute::utils::map</a></div><div class="ttdeci">void map(T &amp;tensor, bool blocking)</div><div class="ttdoc">Maps a tensor if needed. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00180">Utils.h:180</a></div></div>
 <div class="ttc" id="classarm__compute_1_1_window_xhtml_a893d17b56b9abc4423ce26e9a24ac5dc"><div class="ttname"><a href="classarm__compute_1_1_window.xhtml#a893d17b56b9abc4423ce26e9a24ac5dc">arm_compute::Window::DimZ</a></div><div class="ttdeci">static constexpr size_t DimZ</div><div class="ttdoc">Alias for dimension 2 also known as Z dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8h_source.xhtml#l00047">Window.h:47</a></div></div>
-<div class="ttc" id="core_2_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="core_2_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00297">Error.h:297</a></div></div>
-<div class="ttc" id="classarm__compute_1_1_iterator_xhtml"><div class="ttname"><a href="classarm__compute_1_1_iterator.xhtml">arm_compute::Iterator</a></div><div class="ttdoc">Iterator updated by execute_window_loop for each window element. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_helpers_8h_source.xhtml#l00323">Helpers.h:323</a></div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195"><div class="ttname"><a href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::DataLayoutDimension::WIDTH</a></div><div class="ttdoc">width </div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00340">Helpers.inl:340</a></div></div>
+<div class="ttc" id="classarm__compute_1_1_iterator_xhtml"><div class="ttname"><a href="classarm__compute_1_1_iterator.xhtml">arm_compute::Iterator</a></div><div class="ttdoc">Iterator updated by execute_window_loop for each window element. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_helpers_8h_source.xhtml#l00284">Helpers.h:284</a></div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">arm_compute::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdoc">Supported tensor data layouts. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00110">Types.h:110</a></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="_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00319">Error.h:319</a></div></div>
 </div><!-- fragment -->
 </div>
 </div>
@@ -336,10 +340,10 @@ Public Member Functions</h2></td></tr>
 
 <p>Return the height of the currently open PPM file. </p>
 
-<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00466">466</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
+<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00507">507</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
 
-<p>Referenced by <a class="el" href="_graph_utils_8cpp_source.xhtml#l00088">PPMAccessor::access_tensor()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00720">arm_compute::utils::save_to_npy()</a>, and <a class="el" href="utils_2_utils_8h_source.xhtml#l00639">arm_compute::utils::save_to_ppm()</a>.</p>
-<div class="fragment"><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;    {</div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;        <span class="keywordflow">return</span> _height;</div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;    }</div></div><!-- fragment -->
+<p>Referenced by <a class="el" href="_graph_utils_8cpp_source.xhtml#l00176">PPMAccessor::access_tensor()</a>.</p>
+<div class="fragment"><div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;    {</div><div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;        <span class="keywordflow">return</span> _height;</div><div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;    }</div></div><!-- fragment -->
 </div>
 </div>
 <a class="anchor" id="a69f2a0e263d4f77d1e166de9cd2746f7"></a>
@@ -383,16 +387,14 @@ Public Member Functions</h2></td></tr>
   </dd>
 </dl>
 
-<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00279">279</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
-
-<p>References <a class="el" href="core_2_error_8h_source.xhtml#l00306">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00268">PPMLoader::is_open()</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::RGB888</a>, and <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>.</p>
+<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00301">301</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
 
-<p>Referenced by <a class="el" href="cl__convolution_8cpp_source.xhtml#l00056">main_cl_convolution()</a>, <a class="el" href="cl__events_8cpp_source.xhtml#l00036">main_cl_events()</a>, <a class="el" href="gc__absdiff_8cpp_source.xhtml#l00037">main_gc_absdiff()</a>, <a class="el" href="neon__cartoon__effect_8cpp_source.xhtml#l00033">main_neon_cartoon_effect()</a>, <a class="el" href="neon__convolution_8cpp_source.xhtml#l00052">main_neon_convolution()</a>, <a class="el" href="neon__scale_8cpp_source.xhtml#l00032">main_neon_scale()</a>, and <a class="el" href="neoncl__scale__median__gaussian_8cpp_source.xhtml#l00042">main_neoncl_scale_median_gaussian()</a>.</p>
-<div class="fragment"><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;    {</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;        <a class="code" href="core_2_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!<a class="code" href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">is_open</a>());</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        <a class="code" href="core_2_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(format != <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::Format::RGB888</a> &amp;&amp; format != <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a>);</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        <span class="comment">// Use the size of the input PPM image</span></div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;        <a class="code" href="classarm__compute_1_1_tensor_info.xhtml">arm_compute::TensorInfo</a> image_info(_width, _height, format);</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;        image.allocator()-&gt;init(image_info);</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    }</div><div class="ttc" id="core_2_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="core_2_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="core_2_error_8h_source.xhtml#l00306">Error.h:306</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>
+<p>References <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::RGB888</a>, and <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>.</p>
+<div class="fragment"><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    {</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;        <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!<a class="code" href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">is_open</a>());</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;        <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(format != <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::Format::RGB888</a> &amp;&amp; format != <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a>);</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;        <span class="comment">// Use the size of the input PPM image</span></div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;        <a class="code" href="classarm__compute_1_1_tensor_info.xhtml">arm_compute::TensorInfo</a> image_info(_width, _height, format);</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;        image.allocator()-&gt;init(image_info);</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    }</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="_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#l00328">Error.h:328</a></div></div>
 <div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::Format::RGB888</a></div><div class="ttdoc">3 channels, 1 U8 per channel </div></div>
-<div class="ttc" id="classarm__compute_1_1utils_1_1_p_p_m_loader_xhtml_a2f57f54d8c03b615bb31eee091d8a88a"><div class="ttname"><a href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">arm_compute::utils::PPMLoader::is_open</a></div><div class="ttdeci">bool is_open()</div><div class="ttdoc">Return true if a PPM file is currently open. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00268">Utils.h:268</a></div></div>
-<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml">arm_compute::TensorInfo</a></div><div class="ttdoc">Store the tensor&amp;#39;s metadata. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00044">TensorInfo.h:44</a></div></div>
+<div class="ttc" id="classarm__compute_1_1utils_1_1_p_p_m_loader_xhtml_a2f57f54d8c03b615bb31eee091d8a88a"><div class="ttname"><a href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">arm_compute::utils::PPMLoader::is_open</a></div><div class="ttdeci">bool is_open()</div><div class="ttdoc">Return true if a PPM file is currently open. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00290">Utils.h:290</a></div></div>
+<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml">arm_compute::TensorInfo</a></div><div class="ttdoc">Store the tensor&amp;#39;s metadata. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00045">TensorInfo.h:45</a></div></div>
 </div><!-- fragment -->
 </div>
 </div>
@@ -419,10 +421,8 @@ Public Member Functions</h2></td></tr>
 
 <p>Return true if a PPM file is currently open. </p>
 
-<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00268">268</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
-
-<p>Referenced by <a class="el" href="utils_2_utils_8h_source.xhtml#l00296">PPMLoader::fill_image()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00383">PPMLoader::fill_planar_tensor()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00545">NPYLoader::fill_tensor()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00279">PPMLoader::init_image()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00521">NPYLoader::init_tensor()</a>, <a class="el" href="cl__convolution_8cpp_source.xhtml#l00056">main_cl_convolution()</a>, <a class="el" href="cl__events_8cpp_source.xhtml#l00036">main_cl_events()</a>, <a class="el" href="gc__absdiff_8cpp_source.xhtml#l00037">main_gc_absdiff()</a>, <a class="el" href="neon__cartoon__effect_8cpp_source.xhtml#l00033">main_neon_cartoon_effect()</a>, <a class="el" href="neon__convolution_8cpp_source.xhtml#l00052">main_neon_convolution()</a>, <a class="el" href="neon__scale_8cpp_source.xhtml#l00032">main_neon_scale()</a>, <a class="el" href="neoncl__scale__median__gaussian_8cpp_source.xhtml#l00042">main_neoncl_scale_median_gaussian()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00248">PPMLoader::open()</a>, and <a class="el" href="utils_2_utils_8h_source.xhtml#l00488">NPYLoader::open()</a>.</p>
-<div class="fragment"><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    {</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        <span class="keywordflow">return</span> _fs.is_open();</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;    }</div></div><!-- fragment -->
+<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00290">290</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
+<div class="fragment"><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    {</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;        <span class="keywordflow">return</span> _fs.is_open();</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    }</div></div><!-- fragment -->
 </div>
 </div>
 <a class="anchor" id="a36e58f3e64f3851ebac7a9556b4704ed"></a>
@@ -455,16 +455,16 @@ Public Member Functions</h2></td></tr>
   </dd>
 </dl>
 
-<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00248">248</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
+<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00270">270</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
 
-<p>References <a class="el" href="core_2_error_8h_source.xhtml#l00238">ARM_COMPUTE_ERROR</a>, <a class="el" href="core_2_error_8h_source.xhtml#l00306">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="core_2_error_8h_source.xhtml#l00297">ARM_COMPUTE_ERROR_ON_MSG</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00268">PPMLoader::is_open()</a>, and <a class="el" href="utils_2_utils_8cpp_source.xhtml#l00140">arm_compute::utils::parse_ppm_header()</a>.</p>
+<p>References <a class="el" href="_error_8h_source.xhtml#l00260">ARM_COMPUTE_ERROR</a>, <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_error_8h_source.xhtml#l00319">ARM_COMPUTE_ERROR_ON_MSG</a>, and <a class="el" href="utils_2_utils_8cpp_source.xhtml#l00144">arm_compute::utils::parse_ppm_header()</a>.</p>
 
-<p>Referenced by <a class="el" href="_graph_utils_8cpp_source.xhtml#l00088">PPMAccessor::access_tensor()</a>, <a class="el" href="cl__convolution_8cpp_source.xhtml#l00056">main_cl_convolution()</a>, <a class="el" href="cl__events_8cpp_source.xhtml#l00036">main_cl_events()</a>, <a class="el" href="gc__absdiff_8cpp_source.xhtml#l00037">main_gc_absdiff()</a>, <a class="el" href="neon__cartoon__effect_8cpp_source.xhtml#l00033">main_neon_cartoon_effect()</a>, <a class="el" href="neon__convolution_8cpp_source.xhtml#l00052">main_neon_convolution()</a>, <a class="el" href="neon__scale_8cpp_source.xhtml#l00032">main_neon_scale()</a>, and <a class="el" href="neoncl__scale__median__gaussian_8cpp_source.xhtml#l00042">main_neoncl_scale_median_gaussian()</a>.</p>
-<div class="fragment"><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    {</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;        <a class="code" href="core_2_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(<a class="code" href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">is_open</a>());</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;        <span class="keywordflow">try</span></div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;        {</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;            _fs.exceptions(std::ifstream::failbit | std::ifstream::badbit);</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;            _fs.open(ppm_filename, std::ios::in | std::ios::binary);</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> max_val = 0;</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;            std::tie(_width, _height, max_val) = <a class="code" href="namespacearm__compute_1_1utils.xhtml#a3aa8f5f1b94f88fdf5b43a53e29379cf">parse_ppm_header</a>(_fs);</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;            <a class="code" href="core_2_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(max_val &gt;= 256, <span class="stringliteral">&quot;2 bytes per colour channel not supported in file %s&quot;</span>, ppm_filename.c_str());</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;        }</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;        <span class="keywordflow">catch</span>(<span class="keyword">const</span> std::ifstream::failure &amp;e)</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        {</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;            <a class="code" href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Accessing %s: %s&quot;</span>, ppm_filename.c_str(), e.what());</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;        }</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    }</div><div class="ttc" id="core_2_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="core_2_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="core_2_error_8h_source.xhtml#l00306">Error.h:306</a></div></div>
-<div class="ttc" id="core_2_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00238">Error.h:238</a></div></div>
-<div class="ttc" id="classarm__compute_1_1utils_1_1_p_p_m_loader_xhtml_a2f57f54d8c03b615bb31eee091d8a88a"><div class="ttname"><a href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">arm_compute::utils::PPMLoader::is_open</a></div><div class="ttdeci">bool is_open()</div><div class="ttdoc">Return true if a PPM file is currently open. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00268">Utils.h:268</a></div></div>
-<div class="ttc" id="core_2_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="core_2_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="core_2_error_8h_source.xhtml#l00297">Error.h:297</a></div></div>
-<div class="ttc" id="namespacearm__compute_1_1utils_xhtml_a3aa8f5f1b94f88fdf5b43a53e29379cf"><div class="ttname"><a href="namespacearm__compute_1_1utils.xhtml#a3aa8f5f1b94f88fdf5b43a53e29379cf">arm_compute::utils::parse_ppm_header</a></div><div class="ttdeci">std::tuple&lt; unsigned int, unsigned int, int &gt; parse_ppm_header(std::ifstream &amp;fs)</div><div class="ttdoc">Parse the ppm header from an input file stream. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8cpp_source.xhtml#l00140">Utils.cpp:140</a></div></div>
+<p>Referenced by <a class="el" href="_graph_utils_8cpp_source.xhtml#l00176">PPMAccessor::access_tensor()</a>.</p>
+<div class="fragment"><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;    {</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(<a class="code" href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">is_open</a>());</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        <span class="keywordflow">try</span></div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        {</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;            _fs.exceptions(std::ifstream::failbit | std::ifstream::badbit);</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;            _fs.open(ppm_filename, std::ios::in | std::ios::binary);</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;            <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> max_val = 0;</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;            std::tie(_width, _height, max_val) = <a class="code" href="namespacearm__compute_1_1utils.xhtml#a3aa8f5f1b94f88fdf5b43a53e29379cf">parse_ppm_header</a>(_fs);</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;            <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(max_val &gt;= 256, <span class="stringliteral">&quot;2 bytes per colour channel not supported in file %s&quot;</span>, ppm_filename.c_str());</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        }</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;        <span class="keywordflow">catch</span>(std::runtime_error &amp;e)</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        {</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;            <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Accessing %s: %s&quot;</span>, ppm_filename.c_str(), e.what());</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;        }</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    }</div><div class="ttc" id="_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00260">Error.h:260</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#l00328">Error.h:328</a></div></div>
+<div class="ttc" id="classarm__compute_1_1utils_1_1_p_p_m_loader_xhtml_a2f57f54d8c03b615bb31eee091d8a88a"><div class="ttname"><a href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">arm_compute::utils::PPMLoader::is_open</a></div><div class="ttdeci">bool is_open()</div><div class="ttdoc">Return true if a PPM file is currently open. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8h_source.xhtml#l00290">Utils.h:290</a></div></div>
+<div class="ttc" id="namespacearm__compute_1_1utils_xhtml_a3aa8f5f1b94f88fdf5b43a53e29379cf"><div class="ttname"><a href="namespacearm__compute_1_1utils.xhtml#a3aa8f5f1b94f88fdf5b43a53e29379cf">arm_compute::utils::parse_ppm_header</a></div><div class="ttdeci">std::tuple&lt; unsigned int, unsigned int, int &gt; parse_ppm_header(std::ifstream &amp;fs)</div><div class="ttdoc">Parse the ppm header from an input file stream. </div><div class="ttdef"><b>Definition:</b> <a href="utils_2_utils_8cpp_source.xhtml#l00144">Utils.cpp:144</a></div></div>
+<div class="ttc" id="_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00319">Error.h:319</a></div></div>
 </div><!-- fragment -->
 </div>
 </div>
@@ -491,10 +491,10 @@ Public Member Functions</h2></td></tr>
 
 <p>Return the width of the currently open PPM file. </p>
 
-<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00459">459</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
+<p>Definition at line <a class="el" href="utils_2_utils_8h_source.xhtml#l00500">500</a> of file <a class="el" href="utils_2_utils_8h_source.xhtml">Utils.h</a>.</p>
 
-<p>Referenced by <a class="el" href="_graph_utils_8cpp_source.xhtml#l00088">PPMAccessor::access_tensor()</a>, <a class="el" href="utils_2_utils_8h_source.xhtml#l00720">arm_compute::utils::save_to_npy()</a>, and <a class="el" href="utils_2_utils_8h_source.xhtml#l00639">arm_compute::utils::save_to_ppm()</a>.</p>
-<div class="fragment"><div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;    {</div><div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;        <span class="keywordflow">return</span> _width;</div><div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;    }</div></div><!-- fragment -->
+<p>Referenced by <a class="el" href="_graph_utils_8cpp_source.xhtml#l00176">PPMAccessor::access_tensor()</a>.</p>
+<div class="fragment"><div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;    {</div><div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;        <span class="keywordflow">return</span> _width;</div><div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;    }</div></div><!-- fragment -->
 </div>
 </div>
 <hr/>The documentation for this class was generated from the following file:<ul>
@@ -506,7 +506,7 @@ Public Member Functions</h2></td></tr>
 <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="namespacearm__compute_1_1utils.xhtml">utils</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1utils_1_1_p_p_m_loader.xhtml">PPMLoader</a></li>
-    <li class="footer">Generated on Thu Dec 14 2017 23:48:39 for Compute Library by
+    <li class="footer">Generated on Wed May 23 2018 11:36:45 for Compute Library by
     <a href="http://www.doxygen.org/index.html">
     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
   </ul>