arm_compute v17.04
diff --git a/documentation/neon__scale_8cpp_source.xhtml b/documentation/neon__scale_8cpp_source.xhtml
index ca8f7a9..1fdbc14 100644
--- a/documentation/neon__scale_8cpp_source.xhtml
+++ b/documentation/neon__scale_8cpp_source.xhtml
@@ -40,7 +40,7 @@
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">ARM Compute Library
-  <span id="projectnumber">17.03.1</span>
+  <span id="projectnumber">17.04</span>
</div>
</td>
</tr>
@@ -116,25 +116,25 @@
<div class="title">neon_scale.cpp</div> </div>
</div><!--header-->
<div class="contents">
-<a href="neon__scale_8cpp.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2016, 2017 ARM Limited.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * of this software and associated documentation files (the "Software"), to</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * deal in the Software without restriction, including without limitation the</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include "<a class="code" href="_n_e_functions_8h.xhtml">arm_compute/runtime/NEON/NEFunctions.h</a>"</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include "<a class="code" href="_types_8h.xhtml">arm_compute/core/Types.h</a>"</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include "<a class="code" href="test__helpers_2_utils_8h.xhtml">test_helpers/Utils.h</a>"</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">using namespace </span><a class="code" href="namespacearm__compute.xhtml">arm_compute</a>;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">using namespace </span><a class="code" href="namespacetest__helpers.xhtml">test_helpers</a>;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="neon__scale_8cpp.xhtml#a8311a04cc09fb45ff5126dc74b6c6dcb"> 32</a></span> <span class="keywordtype">void</span> <a class="code" href="neon__scale_8cpp.xhtml#a8311a04cc09fb45ff5126dc74b6c6dcb">main_neon_scale</a>(<span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span> **argv)</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> {</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <a class="code" href="classtest__helpers_1_1_p_p_m_loader.xhtml">PPMLoader</a> ppm;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <a class="code" href="struct_image.xhtml">Image</a> src, dst;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keywordflow">if</span>(argc < 2)</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  {</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="comment">// Print help</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  std::cout << <span class="stringliteral">"Usage: ./build/neon_scale[input_image.ppm]\n\n"</span>;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  std::cout << <span class="stringliteral">"No input_image provided, creating a dummy 640x480 image\n"</span>;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="comment">// Create an empty grayscale 640x480 image</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  src.allocator()->init(<a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a>(640, 480, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">Format::U8</a>));</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  }</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  ppm.<a class="code" href="classtest__helpers_1_1_p_p_m_loader.xhtml#a36e58f3e64f3851ebac7a9556b4704ed">open</a>(argv[1]);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  ppm.<a class="code" href="classtest__helpers_1_1_p_p_m_loader.xhtml#a283b961e6ca7b117b106c8710c7cfe81">init_image</a>(src, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">Format::U8</a>);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  }</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  constexpr <span class="keywordtype">int</span> scale_factor = 2;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> dst_tensor_info(src.info()->dimension(0) / scale_factor, src.info()->dimension(1) / scale_factor, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">Format::U8</a>);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="comment">// Configure the destination image</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  dst.allocator()->init(dst_tensor_info);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="comment">// Create and initialize a Scale function object:</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <a class="code" href="classarm__compute_1_1_n_e_scale.xhtml">NEScale</a> scale;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  scale.<a class="code" href="classarm__compute_1_1_n_e_scale.xhtml#a22408eda7af5167b856ffc85d79a5940">configure</a>(&src, &dst, <a class="code" href="namespacearm__compute.xhtml#a966a9c417ce5e94dca08d9b5e745c0c9a7f5ccbc3d30c2cd3fd04d567946cbde2">InterpolationPolicy::NEAREST_NEIGHBOR</a>, <a class="code" href="namespacearm__compute.xhtml#a15a05537a472ee742404821851529327a0db45d2a4141101bdfe48e3314cfbca3">BorderMode::UNDEFINED</a>);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="comment">// Allocate all the images</span></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  src.allocator()->allocate();</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  dst.allocator()->allocate();</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="comment">// Fill the input image with the content of the PPM image if a filename was provided:</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">if</span>(ppm.<a class="code" href="classtest__helpers_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">is_open</a>())</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  {</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  ppm.<a class="code" href="classtest__helpers_1_1_p_p_m_loader.xhtml#a1672610b872bef30d0dc2333a0ffc402">fill_image</a>(src);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  }</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="comment">// Run the scale operation:</span></div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  scale.<a class="code" href="classarm__compute_1_1_i_n_e_simple_function.xhtml#ab5fd6e96c07aaaed2747c7e16ed5951e">run</a>();</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="comment">// Save the result to file:</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">if</span>(ppm.<a class="code" href="classtest__helpers_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">is_open</a>())</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  {</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keyword">const</span> std::string output_filename = std::string(argv[1]) + <span class="stringliteral">"_out.ppm"</span>;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <a class="code" href="namespacetest__helpers.xhtml#a5036a1b77bd7223a68954b5078c6545a">save_to_ppm</a>(dst, output_filename);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  }</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> }</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="neon__scale_8cpp.xhtml#a217dbf8b442f20279ea00b898af96f52"> 86</a></span> <span class="keywordtype">int</span> <a class="code" href="neon__scale_8cpp.xhtml#a217dbf8b442f20279ea00b898af96f52">main</a>(<span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span> **argv)</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> {</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordflow">return</span> <a class="code" href="namespacetest__helpers.xhtml#a4c9395db2c8b8d0c336656a7b58fca3e">test_helpers::run_example</a>(argc, argv, <a class="code" href="neon__scale_8cpp.xhtml#a8311a04cc09fb45ff5126dc74b6c6dcb">main_neon_scale</a>);</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span> }</div><div class="ttc" id="classtest__helpers_1_1_p_p_m_loader_xhtml_a2f57f54d8c03b615bb31eee091d8a88a"><div class="ttname"><a href="classtest__helpers_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">test_helpers::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="test__helpers_2_utils_8h_source.xhtml#l00114">Utils.h:114</a></div></div>
+<a href="neon__scale_8cpp.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2016, 2017 ARM Limited.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * of this software and associated documentation files (the "Software"), to</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * deal in the Software without restriction, including without limitation the</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include "<a class="code" href="_n_e_functions_8h.xhtml">arm_compute/runtime/NEON/NEFunctions.h</a>"</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor">#include "<a class="code" href="_types_8h.xhtml">arm_compute/core/Types.h</a>"</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include "<a class="code" href="test__helpers_2_utils_8h.xhtml">test_helpers/Utils.h</a>"</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">using namespace </span><a class="code" href="namespacearm__compute.xhtml">arm_compute</a>;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="keyword">using namespace </span><a class="code" href="namespacetest__helpers.xhtml">test_helpers</a>;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="neon__scale_8cpp.xhtml#a8311a04cc09fb45ff5126dc74b6c6dcb"> 32</a></span> <span class="keywordtype">void</span> <a class="code" href="neon__scale_8cpp.xhtml#a8311a04cc09fb45ff5126dc74b6c6dcb">main_neon_scale</a>(<span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span> **argv)</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> {</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <a class="code" href="classtest__helpers_1_1_p_p_m_loader.xhtml">PPMLoader</a> ppm;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <a class="code" href="struct_image.xhtml">Image</a> src, dst;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keywordflow">if</span>(argc < 2)</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  {</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="comment">// Print help</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  std::cout << <span class="stringliteral">"Usage: ./build/neon_scale[input_image.ppm]\n\n"</span>;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  std::cout << <span class="stringliteral">"No input_image provided, creating a dummy 640x480 image\n"</span>;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="comment">// Create an empty grayscale 640x480 image</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  src.allocator()->init(<a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a>(640, 480, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">Format::U8</a>));</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  }</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  ppm.<a class="code" href="classtest__helpers_1_1_p_p_m_loader.xhtml#a36e58f3e64f3851ebac7a9556b4704ed">open</a>(argv[1]);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  ppm.<a class="code" href="classtest__helpers_1_1_p_p_m_loader.xhtml#a283b961e6ca7b117b106c8710c7cfe81">init_image</a>(src, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">Format::U8</a>);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  }</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  constexpr <span class="keywordtype">int</span> scale_factor = 2;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> dst_tensor_info(src.info()->dimension(0) / scale_factor, src.info()->dimension(1) / scale_factor, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">Format::U8</a>);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="comment">// Configure the destination image</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  dst.allocator()->init(dst_tensor_info);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> </div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="comment">// Create and initialize a Scale function object:</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <a class="code" href="classarm__compute_1_1_n_e_scale.xhtml">NEScale</a> scale;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  scale.<a class="code" href="classarm__compute_1_1_n_e_scale.xhtml#a22408eda7af5167b856ffc85d79a5940">configure</a>(&src, &dst, <a class="code" href="namespacearm__compute.xhtml#a966a9c417ce5e94dca08d9b5e745c0c9a7f5ccbc3d30c2cd3fd04d567946cbde2">InterpolationPolicy::NEAREST_NEIGHBOR</a>, <a class="code" href="namespacearm__compute.xhtml#a15a05537a472ee742404821851529327a0db45d2a4141101bdfe48e3314cfbca3">BorderMode::UNDEFINED</a>);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> </div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="comment">// Allocate all the images</span></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  src.allocator()->allocate();</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  dst.allocator()->allocate();</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="comment">// Fill the input image with the content of the PPM image if a filename was provided:</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">if</span>(ppm.<a class="code" href="classtest__helpers_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">is_open</a>())</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  {</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  ppm.<a class="code" href="classtest__helpers_1_1_p_p_m_loader.xhtml#a1672610b872bef30d0dc2333a0ffc402">fill_image</a>(src);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  }</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="comment">// Run the scale operation:</span></div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  scale.<a class="code" href="classarm__compute_1_1_i_n_e_simple_function.xhtml#ab5fd6e96c07aaaed2747c7e16ed5951e">run</a>();</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="comment">// Save the result to file:</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">if</span>(ppm.<a class="code" href="classtest__helpers_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">is_open</a>())</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  {</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keyword">const</span> std::string output_filename = std::string(argv[1]) + <span class="stringliteral">"_out.ppm"</span>;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <a class="code" href="namespacetest__helpers.xhtml#a5036a1b77bd7223a68954b5078c6545a">save_to_ppm</a>(dst, output_filename);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  }</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> }</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="neon__scale_8cpp.xhtml#a217dbf8b442f20279ea00b898af96f52"> 87</a></span> <span class="keywordtype">int</span> <a class="code" href="neon__scale_8cpp.xhtml#a217dbf8b442f20279ea00b898af96f52">main</a>(<span class="keywordtype">int</span> argc, <span class="keyword">const</span> <span class="keywordtype">char</span> **argv)</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span> {</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keywordflow">return</span> <a class="code" href="namespacetest__helpers.xhtml#a4c9395db2c8b8d0c336656a7b58fca3e">test_helpers::run_example</a>(argc, argv, <a class="code" href="neon__scale_8cpp.xhtml#a8311a04cc09fb45ff5126dc74b6c6dcb">main_neon_scale</a>);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> }</div><div class="ttc" id="classtest__helpers_1_1_p_p_m_loader_xhtml_a2f57f54d8c03b615bb31eee091d8a88a"><div class="ttname"><a href="classtest__helpers_1_1_p_p_m_loader.xhtml#a2f57f54d8c03b615bb31eee091d8a88a">test_helpers::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="test__helpers_2_utils_8h_source.xhtml#l00114">Utils.h:114</a></div></div>
<div class="ttc" id="_types_8h_xhtml"><div class="ttname"><a href="_types_8h.xhtml">Types.h</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">Unknown image format. </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a966a9c417ce5e94dca08d9b5e745c0c9a7f5ccbc3d30c2cd3fd04d567946cbde2"><div class="ttname"><a href="namespacearm__compute.xhtml#a966a9c417ce5e94dca08d9b5e745c0c9a7f5ccbc3d30c2cd3fd04d567946cbde2">arm_compute::InterpolationPolicy::NEAREST_NEIGHBOR</a></div><div class="ttdoc">Output values are defined to match the source pixel whose center is nearest to the sample position...</div></div>
<div class="ttc" id="classtest__helpers_1_1_p_p_m_loader_xhtml_a1672610b872bef30d0dc2333a0ffc402"><div class="ttname"><a href="classtest__helpers_1_1_p_p_m_loader.xhtml#a1672610b872bef30d0dc2333a0ffc402">test_helpers::PPMLoader::fill_image</a></div><div class="ttdeci">void fill_image(T &image)</div><div class="ttdoc">Fill an image with the content of the currently open PPM file. </div><div class="ttdef"><b>Definition:</b> <a href="test__helpers_2_utils_8h_source.xhtml#l00142">Utils.h:142</a></div></div>
<div class="ttc" id="classarm__compute_1_1_n_e_scale_xhtml"><div class="ttname"><a href="classarm__compute_1_1_n_e_scale.xhtml">arm_compute::NEScale</a></div><div class="ttdoc">Basic function to run NEScaleKernel. </div><div class="ttdef"><b>Definition:</b> <a href="_n_e_scale_8h_source.xhtml#l00038">NEScale.h:38</a></div></div>
-<div class="ttc" id="neon__scale_8cpp_xhtml_a217dbf8b442f20279ea00b898af96f52"><div class="ttname"><a href="neon__scale_8cpp.xhtml#a217dbf8b442f20279ea00b898af96f52">main</a></div><div class="ttdeci">int main(int argc, const char **argv)</div><div class="ttdoc">Main program for convolution test. </div><div class="ttdef"><b>Definition:</b> <a href="neon__scale_8cpp_source.xhtml#l00086">neon_scale.cpp:86</a></div></div>
+<div class="ttc" id="neon__scale_8cpp_xhtml_a217dbf8b442f20279ea00b898af96f52"><div class="ttname"><a href="neon__scale_8cpp.xhtml#a217dbf8b442f20279ea00b898af96f52">main</a></div><div class="ttdeci">int main(int argc, const char **argv)</div><div class="ttdoc">Main program for convolution test. </div><div class="ttdef"><b>Definition:</b> <a href="neon__scale_8cpp_source.xhtml#l00087">neon_scale.cpp:87</a></div></div>
<div class="ttc" id="_n_e_functions_8h_xhtml"><div class="ttname"><a href="_n_e_functions_8h.xhtml">NEFunctions.h</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml"><div class="ttname"><a href="namespacearm__compute.xhtml">arm_compute</a></div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_8dox_source.xhtml#l00001">arm_compute.dox:1</a></div></div>
<div class="ttc" id="neon__scale_8cpp_xhtml_a8311a04cc09fb45ff5126dc74b6c6dcb"><div class="ttname"><a href="neon__scale_8cpp.xhtml#a8311a04cc09fb45ff5126dc74b6c6dcb">main_neon_scale</a></div><div class="ttdeci">void main_neon_scale(int argc, const char **argv)</div><div class="ttdef"><b>Definition:</b> <a href="neon__scale_8cpp_source.xhtml#l00032">neon_scale.cpp:32</a></div></div>
<div class="ttc" id="classarm__compute_1_1_n_e_scale_xhtml_a22408eda7af5167b856ffc85d79a5940"><div class="ttname"><a href="classarm__compute_1_1_n_e_scale.xhtml#a22408eda7af5167b856ffc85d79a5940">arm_compute::NEScale::configure</a></div><div class="ttdeci">void configure(ITensor *input, ITensor *output, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value=0)</div><div class="ttdoc">Initialize the function&#39;s source, destination, interpolation type and border_mode. </div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00095">helpers.h:95</a></div></div>
<div class="ttc" id="classtest__helpers_1_1_p_p_m_loader_xhtml_a36e58f3e64f3851ebac7a9556b4704ed"><div class="ttname"><a href="classtest__helpers_1_1_p_p_m_loader.xhtml#a36e58f3e64f3851ebac7a9556b4704ed">test_helpers::PPMLoader::open</a></div><div class="ttdeci">void open(const std::string &ppm_filename)</div><div class="ttdoc">Open a PPM file and reads its metadata (Width, height) </div><div class="ttdef"><b>Definition:</b> <a href="test__helpers_2_utils_8h_source.xhtml#l00094">Utils.h:94</a></div></div>
-<div class="ttc" id="namespacetest__helpers_xhtml_a4c9395db2c8b8d0c336656a7b58fca3e"><div class="ttname"><a href="namespacetest__helpers.xhtml#a4c9395db2c8b8d0c336656a7b58fca3e">test_helpers::run_example</a></div><div class="ttdeci">int run_example(int argc, const char **argv, example &func)</div><div class="ttdoc">Run an example and handle the potential exceptions it throws. </div><div class="ttdef"><b>Definition:</b> <a href="_utils_8cpp_source.xhtml#l00064">Utils.cpp:64</a></div></div>
+<div class="ttc" id="namespacetest__helpers_xhtml_a4c9395db2c8b8d0c336656a7b58fca3e"><div class="ttname"><a href="namespacetest__helpers.xhtml#a4c9395db2c8b8d0c336656a7b58fca3e">test_helpers::run_example</a></div><div class="ttdeci">int run_example(int argc, const char **argv, example &func)</div><div class="ttdoc">Run an example and handle the potential exceptions it throws. </div><div class="ttdef"><b>Definition:</b> <a href="_utils_8cpp_source.xhtml#l00065">Utils.cpp:65</a></div></div>
<div class="ttc" id="classtest__helpers_1_1_p_p_m_loader_xhtml"><div class="ttname"><a href="classtest__helpers_1_1_p_p_m_loader.xhtml">test_helpers::PPMLoader</a></div><div class="ttdoc">Class to load the content of a PPM file into an Image. </div><div class="ttdef"><b>Definition:</b> <a href="test__helpers_2_utils_8h_source.xhtml#l00083">Utils.h:83</a></div></div>
<div class="ttc" id="classtest__helpers_1_1_p_p_m_loader_xhtml_a283b961e6ca7b117b106c8710c7cfe81"><div class="ttname"><a href="classtest__helpers_1_1_p_p_m_loader.xhtml#a283b961e6ca7b117b106c8710c7cfe81">test_helpers::PPMLoader::init_image</a></div><div class="ttdeci">void init_image(T &image, Format format)</div><div class="ttdoc">Initialise an image&#39;s metadata with the dimensions of the PPM file currently open. </div><div class="ttdef"><b>Definition:</b> <a href="test__helpers_2_utils_8h_source.xhtml#l00125">Utils.h:125</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a15a05537a472ee742404821851529327a0db45d2a4141101bdfe48e3314cfbca3"><div class="ttname"><a href="namespacearm__compute.xhtml#a15a05537a472ee742404821851529327a0db45d2a4141101bdfe48e3314cfbca3">arm_compute::BorderMode::UNDEFINED</a></div><div class="ttdoc">Borders are left undefined. </div></div>
<div class="ttc" id="classarm__compute_1_1_i_n_e_simple_function_xhtml_ab5fd6e96c07aaaed2747c7e16ed5951e"><div class="ttname"><a href="classarm__compute_1_1_i_n_e_simple_function.xhtml#ab5fd6e96c07aaaed2747c7e16ed5951e">arm_compute::INESimpleFunction::run</a></div><div class="ttdeci">void run() overridefinal</div><div class="ttdoc">Run the kernels contained in the function. </div></div>
-<div class="ttc" id="namespacetest__helpers_xhtml_a5036a1b77bd7223a68954b5078c6545a"><div class="ttname"><a href="namespacetest__helpers.xhtml#a5036a1b77bd7223a68954b5078c6545a">test_helpers::save_to_ppm</a></div><div class="ttdeci">void save_to_ppm(T &tensor, const std::string &ppm_filename)</div><div class="ttdoc">Template helper function to save a tensor image to a PPM file. </div><div class="ttdef"><b>Definition:</b> <a href="test__helpers_2_utils_8h_source.xhtml#l00241">Utils.h:241</a></div></div>
+<div class="ttc" id="namespacetest__helpers_xhtml_a5036a1b77bd7223a68954b5078c6545a"><div class="ttname"><a href="namespacetest__helpers.xhtml#a5036a1b77bd7223a68954b5078c6545a">test_helpers::save_to_ppm</a></div><div class="ttdeci">void save_to_ppm(T &tensor, const std::string &ppm_filename)</div><div class="ttdoc">Template helper function to save a tensor image to a PPM file. </div><div class="ttdef"><b>Definition:</b> <a href="test__helpers_2_utils_8h_source.xhtml#l00245">Utils.h:245</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&#39;s metadata. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00040">TensorInfo.h:40</a></div></div>
<div class="ttc" id="test__helpers_2_utils_8h_xhtml"><div class="ttname"><a href="test__helpers_2_utils_8h.xhtml">Utils.h</a></div></div>
<div class="ttc" id="namespacetest__helpers_xhtml"><div class="ttname"><a href="namespacetest__helpers.xhtml">test_helpers</a></div><div class="ttdef"><b>Definition:</b> <a href="test__helpers_2_utils_8h_source.xhtml#l00045">Utils.h:45</a></div></div>
@@ -144,7 +144,7 @@
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d28a4824dc47e487b107a5db32ef43c4.xhtml">examples</a></li><li class="navelem"><a class="el" href="neon__scale_8cpp.xhtml">neon_scale.cpp</a></li>
- <li class="footer">Generated on Fri Mar 24 2017 17:23:49 for ARM Compute Library by
+ <li class="footer">Generated on Wed Apr 12 2017 14:26:05 for ARM 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>