aboutsummaryrefslogtreecommitdiff
path: root/22.02/_cl_custom_allocator_tests_8cpp_source.xhtml
diff options
context:
space:
mode:
authorNikhil Raj <nikhil.raj@arm.com>2022-03-08 20:01:38 +0000
committerNikhil Raj <nikhil.raj@arm.com>2022-03-09 12:26:14 +0000
commitf4019872c1134c6fcc1d6993e5746f55c1e79208 (patch)
treeb07ea8bdd70d696adfa3814344e210ea67be1e8c /22.02/_cl_custom_allocator_tests_8cpp_source.xhtml
parent0d75c02b21b919b81035205f3914ee273b93b30c (diff)
downloadarmnn-f4019872c1134c6fcc1d6993e5746f55c1e79208.tar.gz
IVGCVSW-6819 Fix the directory structure and broken link to latest docu
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: I05b559d15faf92c76ff536719693b361316be4f3
Diffstat (limited to '22.02/_cl_custom_allocator_tests_8cpp_source.xhtml')
-rw-r--r--22.02/_cl_custom_allocator_tests_8cpp_source.xhtml163
1 files changed, 163 insertions, 0 deletions
diff --git a/22.02/_cl_custom_allocator_tests_8cpp_source.xhtml b/22.02/_cl_custom_allocator_tests_8cpp_source.xhtml
new file mode 100644
index 0000000000..ad51f72879
--- /dev/null
+++ b/22.02/_cl_custom_allocator_tests_8cpp_source.xhtml
@@ -0,0 +1,163 @@
+<!-- Copyright (c) 2020 ARM Limited. -->
+<!-- -->
+<!-- SPDX-License-Identifier: MIT -->
+<!-- -->
+<!-- HTML header for doxygen 1.8.13-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen 1.8.13"/>
+<meta name="robots" content="NOINDEX, NOFOLLOW" />
+<meta name="viewport" content="width=device-width, initial-scale=1"/>
+<title>ArmNN: src/backends/cl/test/ClCustomAllocatorTests.cpp Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="jquery.js"></script>
+<script type="text/javascript" src="dynsections.js"></script>
+<link href="navtree.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="resize.js"></script>
+<script type="text/javascript" src="navtreedata.js"></script>
+<script type="text/javascript" src="navtree.js"></script>
+<script type="text/javascript">
+ $(document).ready(initResizable);
+</script>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="search/searchdata.js"></script>
+<script type="text/javascript" src="search/search.js"></script>
+<script type="text/x-mathjax-config">
+ MathJax.Hub.Config({
+ extensions: ["tex2jax.js"],
+ jax: ["input/TeX","output/HTML-CSS"],
+});
+</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css" />
+<link href="stylesheet.css" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+<div id="titlearea">
+<table cellspacing="0" cellpadding="0">
+ <tbody>
+ <tr style="height: 56px;">
+ <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 10rem; margin-top: .5rem; margin-left 10px"/>
+ <td style="padding-left: 0.5em;">
+ <div id="projectname">
+ &#160;<span id="projectnumber">22.02</span>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<!-- end header part -->
+<!-- Generated by Doxygen 1.8.13 -->
+<script type="text/javascript">
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+</script>
+<script type="text/javascript" src="menudata.js"></script>
+<script type="text/javascript" src="menu.js"></script>
+<script type="text/javascript">
+$(function() {
+ initMenu('',true,false,'search.php','Search');
+ $(document).ready(function() { init_search(); });
+});
+</script>
+<div id="main-nav"></div>
+</div><!-- top -->
+<div id="side-nav" class="ui-resizable side-nav-resizable">
+ <div id="nav-tree">
+ <div id="nav-tree-contents">
+ <div id="nav-sync" class="sync"></div>
+ </div>
+ </div>
+ <div id="splitbar" style="-moz-user-select:none;"
+ class="ui-resizable-handle">
+ </div>
+</div>
+<script type="text/javascript">
+$(document).ready(function(){initNavTree('_cl_custom_allocator_tests_8cpp_source.xhtml','');});
+</script>
+<div id="doc-content">
+<!-- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+</div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="javascript:void(0)" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<div class="header">
+ <div class="headertitle">
+<div class="title">ClCustomAllocatorTests.cpp</div> </div>
+</div><!--header-->
+<div class="contents">
+<a href="_cl_custom_allocator_tests_8cpp.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">// SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;</div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_i_custom_allocator_8hpp.xhtml">armnn/backends/ICustomAllocator.hpp</a>&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_descriptors_8hpp.xhtml">armnn/Descriptors.hpp</a>&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_exceptions_8hpp.xhtml">armnn/Exceptions.hpp</a>&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_i_network_8hpp.xhtml">armnn/INetwork.hpp</a>&gt;</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_i_runtime_8hpp.xhtml">armnn/IRuntime.hpp</a>&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_utils_8hpp.xhtml">armnn/Utils.hpp</a>&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_backend_registry_8hpp.xhtml">armnn/BackendRegistry.hpp</a>&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_cl_backend_8hpp.xhtml">cl/ClBackend.hpp</a>&gt;</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#if defined(ARMCOMPUTENEON_ENABLED)</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_neon_backend_8hpp.xhtml">neon/NeonBackend.hpp</a>&gt;</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#include &lt;doctest/doctest.h&gt;</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_ignore_unused_8hpp.xhtml">armnn/utility/IgnoreUnused.hpp</a>&gt;</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">// Contains the OpenCl interfaces for mapping memory in the Gpu Page Tables</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">// Requires the OpenCl backend to be included (GpuAcc)</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;arm_compute/core/CL/CLKernelLibrary.h&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;CL/cl_ext.h&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;arm_compute/runtime/CL/CLScheduler.h&gt;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment">/** Sample implementation of ICustomAllocator for use with the ClBackend.</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment"> * Note: any memory allocated must be host accessible with write access to allow for weights and biases</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="comment"> * to be passed in. Read access is not required.. */</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="keyword">class </span>SampleClBackendCustomAllocator : <span class="keyword">public</span> <a class="code" href="classarmnn_1_1_i_custom_allocator.xhtml">armnn::ICustomAllocator</a></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;{</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; SampleClBackendCustomAllocator() = <span class="keywordflow">default</span>;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keywordtype">void</span>* <a class="code" href="classarmnn_1_1_i_custom_allocator.xhtml#a6ce9dda753afa9abb498f3d6b673e595">allocate</a>(<span class="keywordtype">size_t</span> size, <span class="keywordtype">size_t</span> alignment)<span class="keyword"> override</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="keyword"> </span>{</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="comment">// If alignment is 0 just use the CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE for alignment</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keywordflow">if</span> (alignment == 0)</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; {</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; alignment = arm_compute::CLKernelLibrary::get().get_device().getInfo&lt;CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE&gt;();</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; }</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="keywordtype">size_t</span> space = size + alignment + alignment;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keyword">auto</span> allocatedMemPtr = std::malloc(space * <span class="keyword">sizeof</span>(<span class="keywordtype">size_t</span>));</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <span class="keywordflow">if</span> (std::align(alignment, size, allocatedMemPtr, space) == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; {</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_exception.xhtml">armnn::Exception</a>(<span class="stringliteral">&quot;SampleClBackendCustomAllocator::Alignment failed&quot;</span>);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; }</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="keywordflow">return</span> allocatedMemPtr;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; }</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="comment"> /** Interface to be implemented by the child class to free the allocated tensor */</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="keywordtype">void</span> <a class="code" href="classarmnn_1_1_i_custom_allocator.xhtml#a7dbeba9295a3f52ea54698c31e555dff">free</a>(<span class="keywordtype">void</span>* ptr)<span class="keyword"> override</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="keyword"> </span>{</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; std::free(ptr);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; }</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <a class="code" href="namespacearmnn.xhtml#a14fcd7f88d11cea0a018269dca5f9277">armnn::MemorySource</a> <a class="code" href="classarmnn_1_1_i_custom_allocator.xhtml#abf02353c52af045a9af48bb40f857ad2">GetMemorySourceType</a>()<span class="keyword"> override</span></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="keyword"> </span>{</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearmnn.xhtml#a14fcd7f88d11cea0a018269dca5f9277a1131a914388fac73e5f07b0ba0aad523">armnn::MemorySource::Malloc</a>;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; }</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;};</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="_cl_custom_allocator_tests_8cpp.xhtml#a15610ca027aa31bdc7f39133cd79359a"> 63</a></span>&#160;<a class="code" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">armnn::INetworkPtr</a> <a class="code" href="_cl_custom_allocator_tests_8cpp.xhtml#a15610ca027aa31bdc7f39133cd79359a">CreateTestNetwork</a>(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a>&amp; inputTensorInfo)</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;{</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keyword">using namespace </span><a class="code" href="namespacearmnn.xhtml">armnn</a>;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <a class="code" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">INetworkPtr</a> myNetwork = INetwork::Create();</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <a class="code" href="structarmnn_1_1_fully_connected_descriptor.xhtml">armnn::FullyConnectedDescriptor</a> fullyConnectedDesc;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keywordtype">float</span> weightsData[] = {1.0f}; <span class="comment">// Identity</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> weightsInfo(<a class="code" href="classarmnn_1_1_tensor_shape.xhtml">TensorShape</a>({1, 1}), DataType::Float32, 0.0f, 0, <span class="keyword">true</span>);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; weightsInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8ffca1e21bdfa7f945617acd606aac91">SetConstant</a>(<span class="keyword">true</span>);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <a class="code" href="classarmnn_1_1_const_tensor.xhtml">armnn::ConstTensor</a> weights(weightsInfo, weightsData);</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <a class="code" href="_deprecated_8hpp.xhtml#ab66a241a0ed3ee89c866e777b035d0ed">ARMNN_NO_DEPRECATE_WARN_BEGIN</a></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">IConnectableLayer</a>* fullyConnected = myNetwork-&gt;AddFullyConnectedLayer(fullyConnectedDesc,</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; weights,</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <a class="code" href="structarmnn_1_1_empty_optional.xhtml">EmptyOptional</a>(),</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="stringliteral">&quot;fully connected&quot;</span>);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <a class="code" href="_deprecated_8hpp.xhtml#ad762b11b48e5c1d1c1743f529485728a">ARMNN_NO_DEPRECATE_WARN_END</a></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">IConnectableLayer</a>* <a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a> = myNetwork-&gt;AddInputLayer(0);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">IConnectableLayer</a>* <a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a> = myNetwork-&gt;AddOutputLayer(0);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; InputLayer-&gt;<a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(fullyConnected-&gt;GetInputSlot(0));</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; fullyConnected-&gt;GetOutputSlot(0).Connect(OutputLayer-&gt;<a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(0));</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="comment">//Set the tensors in the network.</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; InputLayer-&gt;GetOutputSlot(0).SetTensorInfo(inputTensorInfo);</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> outputTensorInfo(<a class="code" href="classarmnn_1_1_tensor_shape.xhtml">TensorShape</a>({1, 1}), DataType::Float32);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; fullyConnected-&gt;GetOutputSlot(0).SetTensorInfo(outputTensorInfo);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keywordflow">return</span> myNetwork;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;}</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="_cl_custom_allocator_tests_8cpp.xhtml#ad241f98f164a12dbbd596032431f8372"> 95</a></span>&#160;<a class="code" href="_cl_custom_allocator_tests_8cpp.xhtml#ad241f98f164a12dbbd596032431f8372">TEST_SUITE</a>(<span class="stringliteral">&quot;ClCustomAllocatorTests&quot;</span>)</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;{</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;<span class="comment">// This is a copy of the SimpleSample app modified to use a custom</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;<span class="comment">// allocator for the clbackend. It creates a FullyConnected network with a single layer</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;<span class="comment">// taking a single number as an input</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;TEST_CASE(<span class="stringliteral">&quot;ClCustomAllocatorTest&quot;</span>)</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;{</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keyword">using namespace </span><a class="code" href="namespacearmnn.xhtml">armnn</a>;</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="keywordtype">float</span> number = 3;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; <span class="comment">// Construct ArmNN network</span></div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <a class="code" href="namespacearmnn.xhtml#a0d8160388a127c1a23b37bc88dc6e2ec">armnn::NetworkId</a> networkIdentifier;</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> inputTensorInfo(<a class="code" href="classarmnn_1_1_tensor_shape.xhtml">TensorShape</a>({1, 1}), DataType::Float32);</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <a class="code" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">INetworkPtr</a> myNetwork = <a class="code" href="_cl_custom_allocator_tests_8cpp.xhtml#a15610ca027aa31bdc7f39133cd79359a">CreateTestNetwork</a>(inputTensorInfo);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="comment">// Create ArmNN runtime</span></div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml">IRuntime::CreationOptions</a> options; <span class="comment">// default options</span></div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="keyword">auto</span> customAllocator = std::make_shared&lt;SampleClBackendCustomAllocator&gt;();</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a939528f239e70c85f833c87c5fe41d83">m_CustomAllocatorMap</a> = {{<span class="stringliteral">&quot;GpuAcc&quot;</span>, std::move(customAllocator)}};</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <a class="code" href="namespacearmnn.xhtml#a150468a02bd7b2d2d061c4aaaee939f0">IRuntimePtr</a> run = IRuntime::Create(options);</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="comment">// Optimise ArmNN network</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <a class="code" href="structarmnn_1_1_optimizer_options.xhtml">OptimizerOptions</a> optOptions;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; optOptions.<a class="code" href="structarmnn_1_1_optimizer_options.xhtml#a05c1bba6ba3ecc1339d4c4c10c0d8890">m_ImportEnabled</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <a class="code" href="namespacearmnn.xhtml#a674efcf6cbdb9e831d653ff0e821fb38">armnn::IOptimizedNetworkPtr</a> optNet = <a class="code" href="namespacearmnn.xhtml#a82e98ef05fd67036d1195ba17174d685">Optimize</a>(*myNetwork, {<span class="stringliteral">&quot;GpuAcc&quot;</span>}, run-&gt;GetDeviceSpec(), optOptions);</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; CHECK(optNet);</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="comment">// Load graph into runtime</span></div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; std::string ignoredErrorMessage;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <a class="code" href="structarmnn_1_1_i_network_properties.xhtml">INetworkProperties</a> networkProperties(<span class="keyword">false</span>, MemorySource::Malloc, MemorySource::Malloc);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; run-&gt;LoadNetwork(networkIdentifier, std::move(optNet), ignoredErrorMessage, networkProperties);</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="comment">// Creates structures for input &amp; output</span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numElements = inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8846406ac37fbd2204f0be16ee05d5b7">GetNumElements</a>();</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="keywordtype">size_t</span> totalBytes = numElements * <span class="keyword">sizeof</span>(float);</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> alignment =</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; arm_compute::CLKernelLibrary::get().get_device().getInfo&lt;CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE&gt;();</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keywordtype">void</span>* alignedInputPtr = options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a939528f239e70c85f833c87c5fe41d83">m_CustomAllocatorMap</a>[<span class="stringliteral">&quot;GpuAcc&quot;</span>]-&gt;allocate(totalBytes, alignment);</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="comment">// Input with negative values</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="keyword">auto</span>* inputPtr = <span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">float</span>*<span class="keyword">&gt;</span>(alignedInputPtr);</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; std::fill_n(inputPtr, numElements, number);</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="keywordtype">void</span>* alignedOutputPtr = options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a939528f239e70c85f833c87c5fe41d83">m_CustomAllocatorMap</a>[<span class="stringliteral">&quot;GpuAcc&quot;</span>]-&gt;allocate(totalBytes, alignment);</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <span class="keyword">auto</span>* outputPtr = <span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">float</span>*<span class="keyword">&gt;</span>(alignedOutputPtr);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; std::fill_n(outputPtr, numElements, -10.0f);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> inputTensorInfo2 = run-&gt;GetInputTensorInfo(networkIdentifier, 0);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; inputTensorInfo2.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8ffca1e21bdfa7f945617acd606aac91">SetConstant</a>(<span class="keyword">true</span>);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <a class="code" href="namespacearmnn.xhtml#aa01bce88f89975a5a031db4cc8861527">armnn::InputTensors</a> inputTensors</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; {</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; {0, <a class="code" href="classarmnn_1_1_const_tensor.xhtml">armnn::ConstTensor</a>(inputTensorInfo2, alignedInputPtr)},</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; };</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <a class="code" href="namespacearmnn.xhtml#a8f091a512915d1cb29a4ebf13dfc53ea">armnn::OutputTensors</a> outputTensors</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; {</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; {0, <a class="code" href="classarmnn_1_1_tensor.xhtml">armnn::Tensor</a>(run-&gt;GetOutputTensorInfo(networkIdentifier, 0), alignedOutputPtr)}</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; };</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="comment">// Execute network</span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; run-&gt;EnqueueWorkload(networkIdentifier, inputTensors, outputTensors);</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; run-&gt;UnloadNetwork(networkIdentifier);</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="comment">// Tell the CLBackend to sync memory so we can read the output.</span></div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; arm_compute::CLScheduler::get().sync();</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <span class="keyword">auto</span>* outputResult = <span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">float</span>*<span class="keyword">&gt;</span>(alignedOutputPtr);</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; run-&gt;UnloadNetwork(networkIdentifier);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; CHECK(outputResult[0] == number);</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="keyword">auto</span>&amp; backendRegistry = <a class="code" href="namespacearmnn.xhtml#ac2807505b850738bc8a1991ce669dd47">armnn::BackendRegistryInstance</a>();</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; backendRegistry.DeregisterAllocator(ClBackend::GetIdStatic());</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160;}</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;<span class="comment">// Only run this test if NEON is enabled</span></div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160;<span class="preprocessor">#if defined(ARMCOMPUTENEON_ENABLED)</span></div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;TEST_CASE(<span class="stringliteral">&quot;ClCustomAllocatorCpuAccNegativeTest&quot;</span>)</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;{</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; <span class="keyword">using namespace </span><a class="code" href="namespacearmnn.xhtml">armnn</a>;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="comment">// Create ArmNN runtime</span></div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml">IRuntime::CreationOptions</a> options; <span class="comment">// default options</span></div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <span class="keyword">auto</span> customAllocator = std::make_shared&lt;SampleClBackendCustomAllocator&gt;();</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a939528f239e70c85f833c87c5fe41d83">m_CustomAllocatorMap</a> = {{<span class="stringliteral">&quot;CpuAcc&quot;</span>, std::move(customAllocator)}};</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <a class="code" href="namespacearmnn.xhtml#a150468a02bd7b2d2d061c4aaaee939f0">IRuntimePtr</a> run = IRuntime::Create(options);</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> inputTensorInfo(<a class="code" href="classarmnn_1_1_tensor_shape.xhtml">TensorShape</a>({1, 1}), DataType::Float32);</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <a class="code" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">INetworkPtr</a> myNetwork = <a class="code" href="_cl_custom_allocator_tests_8cpp.xhtml#a15610ca027aa31bdc7f39133cd79359a">CreateTestNetwork</a>(inputTensorInfo);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="comment">// Optimise ArmNN network</span></div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <a class="code" href="structarmnn_1_1_optimizer_options.xhtml">OptimizerOptions</a> optOptions;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; optOptions.<a class="code" href="structarmnn_1_1_optimizer_options.xhtml#a05c1bba6ba3ecc1339d4c4c10c0d8890">m_ImportEnabled</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <a class="code" href="namespacearmnn.xhtml#a674efcf6cbdb9e831d653ff0e821fb38">IOptimizedNetworkPtr</a> optNet(<span class="keyword">nullptr</span>, <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; std::vector&lt;std::string&gt; errMessages;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160;</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; CHECK_THROWS_AS_MESSAGE(<a class="code" href="namespacearmnn.xhtml#a82e98ef05fd67036d1195ba17174d685">Optimize</a>(*myNetwork, {<span class="stringliteral">&quot;CpuAcc&quot;</span>}, run-&gt;GetDeviceSpec(), optOptions, errMessages),</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <a class="code" href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a>,</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; <span class="stringliteral">&quot;Expected an exception as GetAvailablePreferredBackends() should be empty in Optimize().&quot;</span>);</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <span class="keyword">auto</span>&amp; backendRegistry = <a class="code" href="namespacearmnn.xhtml#ac2807505b850738bc8a1991ce669dd47">armnn::BackendRegistryInstance</a>();</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; backendRegistry.DeregisterAllocator(NeonBackend::GetIdStatic());</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160;}</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;TEST_CASE(<span class="stringliteral">&quot;ClCustomAllocatorGpuAccNullptrTest&quot;</span>)</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;{</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <span class="keyword">using namespace </span><a class="code" href="namespacearmnn.xhtml">armnn</a>;</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <span class="comment">// Create ArmNN runtime</span></div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; <a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml">IRuntime::CreationOptions</a> options; <span class="comment">// default options</span></div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; <span class="keyword">auto</span> customAllocator = std::make_shared&lt;SampleClBackendCustomAllocator&gt;();</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; options.<a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a939528f239e70c85f833c87c5fe41d83">m_CustomAllocatorMap</a> = {{<span class="stringliteral">&quot;GpuAcc&quot;</span>, <span class="keyword">nullptr</span>}};</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160;</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; CHECK_THROWS_AS_MESSAGE(<a class="code" href="namespacearmnn.xhtml#a150468a02bd7b2d2d061c4aaaee939f0">IRuntimePtr</a> run = IRuntime::Create(options),</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; <a class="code" href="classarmnn_1_1_exception.xhtml">armnn::Exception</a>,</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <span class="stringliteral">&quot;Expected exception in RuntimeImpl::RuntimeImpl() as allocator was nullptr.&quot;</span>);</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160;}</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160;} <span class="comment">// test suite ClCustomAllocatorTests</span></div><div class="ttc" id="classarmnn_1_1_i_custom_allocator_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_custom_allocator.xhtml">armnn::ICustomAllocator</a></div><div class="ttdoc">Custom Allocator interface. </div><div class="ttdef"><b>Definition:</b> <a href="_i_custom_allocator_8hpp_source.xhtml#l00016">ICustomAllocator.hpp:16</a></div></div>
+<div class="ttc" id="_ignore_unused_8hpp_xhtml"><div class="ttname"><a href="_ignore_unused_8hpp.xhtml">IgnoreUnused.hpp</a></div></div>
+<div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00066">INetwork.hpp:66</a></div></div>
+<div class="ttc" id="_neon_backend_8hpp_xhtml"><div class="ttname"><a href="_neon_backend_8hpp.xhtml">NeonBackend.hpp</a></div></div>
+<div class="ttc" id="_utils_8hpp_xhtml"><div class="ttname"><a href="_utils_8hpp.xhtml">Utils.hpp</a></div></div>
+<div class="ttc" id="classarmnn_1_1_i_custom_allocator_xhtml_a7dbeba9295a3f52ea54698c31e555dff"><div class="ttname"><a href="classarmnn_1_1_i_custom_allocator.xhtml#a7dbeba9295a3f52ea54698c31e555dff">armnn::ICustomAllocator::free</a></div><div class="ttdeci">virtual void free(void *ptr)=0</div><div class="ttdoc">Interface to be implemented by the child class to free the allocated bytes. </div></div>
+<div class="ttc" id="_deprecated_8hpp_xhtml_ab66a241a0ed3ee89c866e777b035d0ed"><div class="ttname"><a href="_deprecated_8hpp.xhtml#ab66a241a0ed3ee89c866e777b035d0ed">ARMNN_NO_DEPRECATE_WARN_BEGIN</a></div><div class="ttdeci">#define ARMNN_NO_DEPRECATE_WARN_BEGIN</div><div class="ttdef"><b>Definition:</b> <a href="_deprecated_8hpp_source.xhtml#l00033">Deprecated.hpp:33</a></div></div>
+<div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00152">Tensor.hpp:152</a></div></div>
+<div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00086">Layer.cpp:86</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_a150468a02bd7b2d2d061c4aaaee939f0"><div class="ttname"><a href="namespacearmnn.xhtml#a150468a02bd7b2d2d061c4aaaee939f0">armnn::IRuntimePtr</a></div><div class="ttdeci">std::unique_ptr&lt; IRuntime, void(*)(IRuntime *runtime)&gt; IRuntimePtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00031">IRuntime.hpp:31</a></div></div>
+<div class="ttc" id="_i_runtime_8hpp_xhtml"><div class="ttname"><a href="_i_runtime_8hpp.xhtml">IRuntime.hpp</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_ac2807505b850738bc8a1991ce669dd47"><div class="ttname"><a href="namespacearmnn.xhtml#ac2807505b850738bc8a1991ce669dd47">armnn::BackendRegistryInstance</a></div><div class="ttdeci">BackendRegistry &amp; BackendRegistryInstance()</div><div class="ttdef"><b>Definition:</b> <a href="_backend_registry_8cpp_source.xhtml#l00013">BackendRegistry.cpp:13</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_aa01bce88f89975a5a031db4cc8861527"><div class="ttname"><a href="namespacearmnn.xhtml#aa01bce88f89975a5a031db4cc8861527">armnn::InputTensors</a></div><div class="ttdeci">std::vector&lt; std::pair&lt; LayerBindingId, class ConstTensor &gt; &gt; InputTensors</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00392">Tensor.hpp:392</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml"><div class="ttname"><a href="namespacearmnn.xhtml">armnn</a></div><div class="ttdoc">Copyright (c) 2021 ARM Limited and Contributors. </div><div class="ttdef"><b>Definition:</b> <a href="01__00__quick__start_8dox_source.xhtml#l00006">01_00_quick_start.dox:6</a></div></div>
+<div class="ttc" id="classarmnn_1_1_tensor_shape_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00020">Tensor.hpp:20</a></div></div>
+<div class="ttc" id="_cl_backend_8hpp_xhtml"><div class="ttname"><a href="_cl_backend_8hpp.xhtml">ClBackend.hpp</a></div></div>
+<div class="ttc" id="_cl_custom_allocator_tests_8cpp_xhtml_ad241f98f164a12dbbd596032431f8372"><div class="ttname"><a href="_cl_custom_allocator_tests_8cpp.xhtml#ad241f98f164a12dbbd596032431f8372">TEST_SUITE</a></div><div class="ttdeci">TEST_SUITE(&quot;ClCustomAllocatorTests&quot;)</div><div class="ttdef"><b>Definition:</b> <a href="_cl_custom_allocator_tests_8cpp_source.xhtml#l00095">ClCustomAllocatorTests.cpp:95</a></div></div>
+<div class="ttc" id="_backend_registry_8hpp_xhtml"><div class="ttname"><a href="_backend_registry_8hpp.xhtml">BackendRegistry.hpp</a></div></div>
+<div class="ttc" id="structarmnn_1_1_i_network_properties_xhtml"><div class="ttname"><a href="structarmnn_1_1_i_network_properties.xhtml">armnn::INetworkProperties</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00033">IRuntime.hpp:33</a></div></div>
+<div class="ttc" id="classarmnn_1_1_tensor_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor.xhtml">armnn::Tensor</a></div><div class="ttdoc">A tensor defined by a TensorInfo (shape and data type) and a mutable backing store. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00319">Tensor.hpp:319</a></div></div>
+<div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div>
+<div class="ttc" id="_deprecated_8hpp_xhtml_ad762b11b48e5c1d1c1743f529485728a"><div class="ttname"><a href="_deprecated_8hpp.xhtml#ad762b11b48e5c1d1c1743f529485728a">ARMNN_NO_DEPRECATE_WARN_END</a></div><div class="ttdeci">#define ARMNN_NO_DEPRECATE_WARN_END</div><div class="ttdef"><b>Definition:</b> <a href="_deprecated_8hpp_source.xhtml#l00034">Deprecated.hpp:34</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_a82e98ef05fd67036d1195ba17174d685"><div class="ttname"><a href="namespacearmnn.xhtml#a82e98ef05fd67036d1195ba17174d685">armnn::Optimize</a></div><div class="ttdeci">IOptimizedNetworkPtr Optimize(const INetwork &amp;network, const std::vector&lt; BackendId &gt; &amp;backendPreferences, const IDeviceSpec &amp;deviceSpec, const OptimizerOptions &amp;options=OptimizerOptions(), Optional&lt; std::vector&lt; std::string &gt; &amp;&gt; messages=EmptyOptional())</div><div class="ttdoc">Create an optimized version of the network. </div><div class="ttdef"><b>Definition:</b> <a href="_network_8cpp_source.xhtml#l01680">Network.cpp:1680</a></div></div>
+<div class="ttc" id="structarmnn_1_1_fully_connected_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_fully_connected_descriptor.xhtml">armnn::FullyConnectedDescriptor</a></div><div class="ttdoc">A FullyConnectedDescriptor for the FullyConnectedLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00468">Descriptors.hpp:468</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_a0d8160388a127c1a23b37bc88dc6e2ec"><div class="ttname"><a href="namespacearmnn.xhtml#a0d8160388a127c1a23b37bc88dc6e2ec">armnn::NetworkId</a></div><div class="ttdeci">int NetworkId</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00025">IRuntime.hpp:25</a></div></div>
+<div class="ttc" id="classarmnn_1_1_const_tensor_xhtml"><div class="ttname"><a href="classarmnn_1_1_const_tensor.xhtml">armnn::ConstTensor</a></div><div class="ttdoc">A tensor defined by a TensorInfo (shape and data type) and an immutable backing store. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00327">Tensor.hpp:327</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_a8f091a512915d1cb29a4ebf13dfc53ea"><div class="ttname"><a href="namespacearmnn.xhtml#a8f091a512915d1cb29a4ebf13dfc53ea">armnn::OutputTensors</a></div><div class="ttdeci">std::vector&lt; std::pair&lt; LayerBindingId, class Tensor &gt; &gt; OutputTensors</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00393">Tensor.hpp:393</a></div></div>
+<div class="ttc" id="classarmnn_1_1_i_custom_allocator_xhtml_abf02353c52af045a9af48bb40f857ad2"><div class="ttname"><a href="classarmnn_1_1_i_custom_allocator.xhtml#abf02353c52af045a9af48bb40f857ad2">armnn::ICustomAllocator::GetMemorySourceType</a></div><div class="ttdeci">virtual armnn::MemorySource GetMemorySourceType()=0</div><div class="ttdoc">Used to specify what type of memory is being allocated by this allocator. </div></div>
+<div class="ttc" id="namespacearmnn_xhtml_a674efcf6cbdb9e831d653ff0e821fb38"><div class="ttname"><a href="namespacearmnn.xhtml#a674efcf6cbdb9e831d653ff0e821fb38">armnn::IOptimizedNetworkPtr</a></div><div class="ttdeci">std::unique_ptr&lt; IOptimizedNetwork, void(*)(IOptimizedNetwork *network)&gt; IOptimizedNetworkPtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00242">INetwork.hpp:242</a></div></div>
+<div class="ttc" id="structarmnn_1_1_i_runtime_1_1_creation_options_xhtml_a939528f239e70c85f833c87c5fe41d83"><div class="ttname"><a href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml#a939528f239e70c85f833c87c5fe41d83">armnn::IRuntime::CreationOptions::m_CustomAllocatorMap</a></div><div class="ttdeci">std::map&lt; BackendId, std::shared_ptr&lt; ICustomAllocator &gt; &gt; m_CustomAllocatorMap</div><div class="ttdoc">A map to define a custom memory allocator for specific backend Ids. </div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00112">IRuntime.hpp:112</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_a14fcd7f88d11cea0a018269dca5f9277a1131a914388fac73e5f07b0ba0aad523"><div class="ttname"><a href="namespacearmnn.xhtml#a14fcd7f88d11cea0a018269dca5f9277a1131a914388fac73e5f07b0ba0aad523">armnn::MemorySource::Malloc</a></div></div>
+<div class="ttc" id="structarmnn_1_1_optimizer_options_xhtml"><div class="ttname"><a href="structarmnn_1_1_optimizer_options.xhtml">armnn::OptimizerOptions</a></div><div class="ttdoc">ArmNN performs an optimization on each model/network before it gets loaded for execution. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00137">INetwork.hpp:137</a></div></div>
+<div class="ttc" id="classarmnn_1_1_invalid_argument_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00080">Exceptions.hpp:80</a></div></div>
+<div class="ttc" id="_i_network_8hpp_xhtml"><div class="ttname"><a href="_i_network_8hpp.xhtml">INetwork.hpp</a></div></div>
+<div class="ttc" id="structarmnn_1_1_optimizer_options_xhtml_a05c1bba6ba3ecc1339d4c4c10c0d8890"><div class="ttname"><a href="structarmnn_1_1_optimizer_options.xhtml#a05c1bba6ba3ecc1339d4c4c10c0d8890">armnn::OptimizerOptions::m_ImportEnabled</a></div><div class="ttdeci">bool m_ImportEnabled</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00230">INetwork.hpp:230</a></div></div>
+<div class="ttc" id="structarmnn_1_1_i_runtime_1_1_creation_options_xhtml"><div class="ttname"><a href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml">armnn::IRuntime::CreationOptions</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00075">IRuntime.hpp:75</a></div></div>
+<div class="ttc" id="structarmnn_1_1_empty_optional_xhtml"><div class="ttname"><a href="structarmnn_1_1_empty_optional.xhtml">armnn::EmptyOptional</a></div><div class="ttdoc">EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...</div><div class="ttdef"><b>Definition:</b> <a href="_optional_8hpp_source.xhtml#l00032">Optional.hpp:32</a></div></div>
+<div class="ttc" id="_i_custom_allocator_8hpp_xhtml"><div class="ttname"><a href="_i_custom_allocator_8hpp.xhtml">ICustomAllocator.hpp</a></div></div>
+<div class="ttc" id="classarmnn_1_1_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_exception.xhtml">armnn::Exception</a></div><div class="ttdoc">Base class for all ArmNN exceptions so that users can filter to just those. </div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00046">Exceptions.hpp:46</a></div></div>
+<div class="ttc" id="_descriptors_8hpp_xhtml"><div class="ttname"><a href="_descriptors_8hpp.xhtml">Descriptors.hpp</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_a14fcd7f88d11cea0a018269dca5f9277"><div class="ttname"><a href="namespacearmnn.xhtml#a14fcd7f88d11cea0a018269dca5f9277">armnn::MemorySource</a></div><div class="ttdeci">MemorySource</div><div class="ttdoc">Define the Memory Source to reduce copies. </div><div class="ttdef"><b>Definition:</b> <a href="_types_8hpp_source.xhtml#l00217">Types.hpp:217</a></div></div>
+<div class="ttc" id="_exceptions_8hpp_xhtml"><div class="ttname"><a href="_exceptions_8hpp.xhtml">Exceptions.hpp</a></div></div>
+<div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div>
+<div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a6ec9e0eb66d7d6a01240492a0b18104c"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">armnn::IConnectableLayer::GetInputSlot</a></div><div class="ttdeci">virtual const IInputSlot &amp; GetInputSlot(unsigned int index) const =0</div><div class="ttdoc">Get a const input slot handle by slot index. </div></div>
+<div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a8ffca1e21bdfa7f945617acd606aac91"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a8ffca1e21bdfa7f945617acd606aac91">armnn::TensorInfo::SetConstant</a></div><div class="ttdeci">void SetConstant(const bool IsConstant=true)</div><div class="ttdoc">Marks the data corresponding to this tensor info as constant. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8cpp_source.xhtml#l00516">Tensor.cpp:516</a></div></div>
+<div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00323">Layer.hpp:323</a></div></div>
+<div class="ttc" id="_cl_custom_allocator_tests_8cpp_xhtml_a15610ca027aa31bdc7f39133cd79359a"><div class="ttname"><a href="_cl_custom_allocator_tests_8cpp.xhtml#a15610ca027aa31bdc7f39133cd79359a">CreateTestNetwork</a></div><div class="ttdeci">armnn::INetworkPtr CreateTestNetwork(armnn::TensorInfo &amp;inputTensorInfo)</div><div class="ttdef"><b>Definition:</b> <a href="_cl_custom_allocator_tests_8cpp_source.xhtml#l00063">ClCustomAllocatorTests.cpp:63</a></div></div>
+<div class="ttc" id="namespacearmnn_xhtml_ace74f6f9feb95a964a49d79458232703"><div class="ttname"><a href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">armnn::INetworkPtr</a></div><div class="ttdeci">std::unique_ptr&lt; INetwork, void(*)(INetwork *network)&gt; INetworkPtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00241">INetwork.hpp:241</a></div></div>
+<div class="ttc" id="classarmnn_1_1_i_custom_allocator_xhtml_a6ce9dda753afa9abb498f3d6b673e595"><div class="ttname"><a href="classarmnn_1_1_i_custom_allocator.xhtml#a6ce9dda753afa9abb498f3d6b673e595">armnn::ICustomAllocator::allocate</a></div><div class="ttdeci">virtual void * allocate(size_t size, size_t alignment)=0</div><div class="ttdoc">Interface to be implemented by the child class to allocate bytes. </div></div>
+<div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a8846406ac37fbd2204f0be16ee05d5b7"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a8846406ac37fbd2204f0be16ee05d5b7">armnn::TensorInfo::GetNumElements</a></div><div class="ttdeci">unsigned int GetNumElements() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00196">Tensor.hpp:196</a></div></div>
+</div><!-- fragment --></div><!-- contents -->
+</div><!-- doc-content -->
+<!-- start footer part -->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+ <ul>
+ <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_0f3cdec46afbc61a1ded8e1687c9c9a0.xhtml">backends</a></li><li class="navelem"><a class="el" href="dir_1ad86c6d39ab715a831555571b9e98a5.xhtml">cl</a></li><li class="navelem"><a class="el" href="dir_02bab2737bbb2fb3882a0be567244fbf.xhtml">test</a></li><li class="navelem"><a class="el" href="_cl_custom_allocator_tests_8cpp.xhtml">ClCustomAllocatorTests.cpp</a></li>
+ <li class="footer">Generated on Wed Mar 9 2022 12:00:58 for ArmNN by
+ <a href="http://www.doxygen.org/index.html">
+ <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
+ </ul>
+</div>
+</body>
+</html>