diff options
author | David Monahan <david.monahan@arm.com> | 2023-03-22 16:48:58 +0000 |
---|---|---|
committer | David Monahan <david.monahan@arm.com> | 2023-03-22 16:48:58 +0000 |
commit | ae050524109f1ce827962665436ef7430f2ac479 (patch) | |
tree | a087fe0c77570971dd7979f2757426c24e91afc7 /23.02/_memory_manager_8hpp_source.xhtml | |
parent | 8d2ca734165a068478df7cffa46185680b05cd20 (diff) | |
download | armnn-ae050524109f1ce827962665436ef7430f2ac479.tar.gz |
IVGCVSW-7255 Update Doxygen Documentation and publish on GitHub.
* Updating Doxygen documentation for 23.02 release.
Signed-off-by: David Monahan <david.monahan@arm.com>
Change-Id: I545574ff7664b4595d2fe6a91a3c35d2ad55df82
Diffstat (limited to '23.02/_memory_manager_8hpp_source.xhtml')
-rw-r--r-- | 23.02/_memory_manager_8hpp_source.xhtml | 111 |
1 files changed, 91 insertions, 20 deletions
diff --git a/23.02/_memory_manager_8hpp_source.xhtml b/23.02/_memory_manager_8hpp_source.xhtml index 4265cd7316..24a29670b3 100644 --- a/23.02/_memory_manager_8hpp_source.xhtml +++ b/23.02/_memory_manager_8hpp_source.xhtml @@ -8,7 +8,7 @@ <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="generator" content="Doxygen 1.8.17"/> <meta name="robots" content="NOINDEX, NOFOLLOW" /> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>ArmNN: src/backends/backendsCommon/MemoryManager.hpp Source File</title> @@ -19,9 +19,6 @@ <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> @@ -30,7 +27,8 @@ extensions: ["tex2jax.js"], jax: ["input/TeX","output/HTML-CSS"], }); -</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> +</script> +<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="stylesheet.css" rel="stylesheet" type="text/css"/> </head> @@ -51,18 +49,21 @@ </table> </div> <!-- end header part --> -<!-- Generated by Doxygen 1.8.13 --> +<!-- Generated by Doxygen 1.8.17 --> <script type="text/javascript"> +/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); +/* @license-end */ </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> +/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); -</script> +/* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> @@ -76,7 +77,9 @@ $(function() { </div> </div> <script type="text/javascript"> -$(document).ready(function(){initNavTree('_memory_manager_8hpp_source.xhtml','');}); +/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ +$(document).ready(function(){initNavTree('_memory_manager_8hpp_source.xhtml',''); initResizable(); }); +/* @license-end */ </script> <div id="doc-content"> <!-- window showing the filter options --> @@ -98,25 +101,93 @@ $(document).ready(function(){initNavTree('_memory_manager_8hpp_source.xhtml','') <div class="title">MemoryManager.hpp</div> </div> </div><!--header--> <div class="contents"> -<a href="_memory_manager_8hpp.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 © 2021 Arm Ltd and Contributors. All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> </div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include <<a class="code" href="_i_custom_allocator_8hpp.xhtml">armnn/backends/ICustomAllocator.hpp</a>></span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> </div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="keyword">namespace </span><a class="code" href="namespacearmnn.xhtml">armnn</a></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> {</div><div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="structarmnn_1_1_allocator.xhtml"> 11</a></span> <span class="keyword">struct </span><a class="code" href="structarmnn_1_1_allocator.xhtml">Allocator</a></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"> /// Pointer to @ICustomAllocator.</span></div><div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="structarmnn_1_1_allocator.xhtml#a454dc02f777e9e66b9e798d4f4a647b5"> 14</a></span> <span class="comment"></span> std::shared_ptr<ICustomAllocator> <a class="code" href="structarmnn_1_1_allocator.xhtml#a454dc02f777e9e66b9e798d4f4a647b5">m_CustomAllocator</a>{};<span class="comment"></span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> /// Value which the size of each buffer (actual data size + padding) has to be a multiple of.</span></div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="structarmnn_1_1_allocator.xhtml#a84b04a7eb9cb29c23dac4fe55eb1d78c"> 16</a></span> <span class="comment"></span> <span class="keywordtype">size_t</span> <a class="code" href="structarmnn_1_1_allocator.xhtml#a84b04a7eb9cb29c23dac4fe55eb1d78c">m_Alignment</a> = 0 ;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> };</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="structarmnn_1_1_tensor_memory.xhtml"> 19</a></span> <span class="keyword">struct </span><a class="code" href="structarmnn_1_1_tensor_memory.xhtml">TensorMemory</a></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> {<span class="comment"></span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> /// Number of bytes the value is away from the @BufferStorage.m_Buffer.</span></div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="structarmnn_1_1_tensor_memory.xhtml#a7fa2df31ffac52484e0612a31fd4256d"> 22</a></span> <span class="comment"></span> <span class="keywordtype">size_t</span> m_Offset{};<span class="comment"></span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> /// Identifier to be used by the @LoadedNetwork to order the tensors.</span></div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="structarmnn_1_1_tensor_memory.xhtml#a0948ebfd3dcfd15456e3306d13d69b95"> 24</a></span> <span class="comment"></span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_OutputSlotId{};<span class="comment"></span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> /// Pointer to the tensor value.</span></div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="structarmnn_1_1_tensor_memory.xhtml#ad2b382076f26f48cd44783cfca2e3642"> 26</a></span> <span class="comment"></span> <span class="keywordtype">void</span>* m_Data = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</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"><a class="line" href="structarmnn_1_1_buffer_storage.xhtml"> 29</a></span> <span class="keyword">struct </span><a class="code" href="structarmnn_1_1_buffer_storage.xhtml">BufferStorage</a></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> {<span class="comment"></span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"> /// Vector of pointer to @TensorMemory.</span></div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="structarmnn_1_1_buffer_storage.xhtml#a0d6a6b862d9630effce75d8ca18254ba"> 32</a></span> <span class="comment"></span> std::vector<std::shared_ptr<TensorMemory>> <a class="code" href="structarmnn_1_1_buffer_storage.xhtml#a0d6a6b862d9630effce75d8ca18254ba">m_TensorMemoryVector</a>;<span class="comment"></span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment"> /// Total size of the buffer.</span></div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="structarmnn_1_1_buffer_storage.xhtml#afcd55b6ce066b6a3ddfcbbc1c483213f"> 34</a></span> <span class="comment"></span> <span class="keywordtype">size_t</span> <a class="code" href="structarmnn_1_1_buffer_storage.xhtml#afcd55b6ce066b6a3ddfcbbc1c483213f">m_BufferSize</a>;<span class="comment"></span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment"> /// Pointer to the first element of the buffer.</span></div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="structarmnn_1_1_buffer_storage.xhtml#a9cf5acb7d9fb6392c16b6d642b869143"> 36</a></span> <span class="comment"></span> <span class="keywordtype">void</span>* m_Buffer = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> };</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classarmnn_1_1_memory_manager.xhtml"> 39</a></span> <span class="keyword">class </span><a class="code" href="classarmnn_1_1_memory_manager.xhtml">MemoryManager</a></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> {</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">public</span>:<span class="comment"></span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="comment"> /// Initialization method to store in m_AllocatorBufferStoragePairVector all information needed.</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment"> /// @param[in] bufferStorageVector - Vector of BufferStorage.</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment"> /// @param[in] customAllocator - Pointer to ICustomAllocator.</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment"> /// @param[in] typeAlignment - Optional parameter. Value of which the size of each value has to be multiple of.</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="comment"></span> <span class="keywordtype">void</span> StoreMemToAllocate(std::vector<BufferStorage> bufferStorageVector,</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  std::shared_ptr<ICustomAllocator> customAllocator,</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keywordtype">size_t</span> typeAlignment = 0);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment"></span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment"> /// Allocate the amount of memory indicated by m_BufferSize, and</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment"> /// point each m_Data to each correspondent Tensor so that they are m_Offset bytes separated.</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment"></span> <span class="keywordtype">void</span> Allocate();</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="comment"></span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment"> /// Deallocate memory</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment"></span> <span class="keywordtype">void</span> Deallocate();</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  std::vector<std::pair<Allocator, std::vector<BufferStorage>>> m_AllocatorBufferStoragePairVector;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> };</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> } <span class="comment">// namespace armnn</span></div><div class="ttc" id="structarmnn_1_1_buffer_storage_xhtml_a0d6a6b862d9630effce75d8ca18254ba"><div class="ttname"><a href="structarmnn_1_1_buffer_storage.xhtml#a0d6a6b862d9630effce75d8ca18254ba">armnn::BufferStorage::m_TensorMemoryVector</a></div><div class="ttdeci">std::vector< std::shared_ptr< TensorMemory > > m_TensorMemoryVector</div><div class="ttdoc">Vector of pointer to . </div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00032">MemoryManager.hpp:32</a></div></div> -<div class="ttc" id="classarmnn_1_1_memory_manager_xhtml"><div class="ttname"><a href="classarmnn_1_1_memory_manager.xhtml">armnn::MemoryManager</a></div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00039">MemoryManager.hpp:39</a></div></div> -<div class="ttc" id="structarmnn_1_1_tensor_memory_xhtml"><div class="ttname"><a href="structarmnn_1_1_tensor_memory.xhtml">armnn::TensorMemory</a></div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00019">MemoryManager.hpp:19</a></div></div> -<div class="ttc" id="structarmnn_1_1_buffer_storage_xhtml_afcd55b6ce066b6a3ddfcbbc1c483213f"><div class="ttname"><a href="structarmnn_1_1_buffer_storage.xhtml#afcd55b6ce066b6a3ddfcbbc1c483213f">armnn::BufferStorage::m_BufferSize</a></div><div class="ttdeci">size_t m_BufferSize</div><div class="ttdoc">Total size of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00034">MemoryManager.hpp:34</a></div></div> -<div class="ttc" id="structarmnn_1_1_allocator_xhtml_a84b04a7eb9cb29c23dac4fe55eb1d78c"><div class="ttname"><a href="structarmnn_1_1_allocator.xhtml#a84b04a7eb9cb29c23dac4fe55eb1d78c">armnn::Allocator::m_Alignment</a></div><div class="ttdeci">size_t m_Alignment</div><div class="ttdoc">Value which the size of each buffer (actual data size + padding) has to be a multiple of...</div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00016">MemoryManager.hpp:16</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="structarmnn_1_1_allocator_xhtml_a454dc02f777e9e66b9e798d4f4a647b5"><div class="ttname"><a href="structarmnn_1_1_allocator.xhtml#a454dc02f777e9e66b9e798d4f4a647b5">armnn::Allocator::m_CustomAllocator</a></div><div class="ttdeci">std::shared_ptr< ICustomAllocator > m_CustomAllocator</div><div class="ttdoc">Pointer to . </div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00014">MemoryManager.hpp:14</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="structarmnn_1_1_allocator_xhtml"><div class="ttname"><a href="structarmnn_1_1_allocator.xhtml">armnn::Allocator</a></div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00011">MemoryManager.hpp:11</a></div></div> -<div class="ttc" id="structarmnn_1_1_buffer_storage_xhtml"><div class="ttname"><a href="structarmnn_1_1_buffer_storage.xhtml">armnn::BufferStorage</a></div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00029">MemoryManager.hpp:29</a></div></div> +<a href="_memory_manager_8hpp.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 © 2021 Arm Ltd and Contributors. All rights reserved.</span></div> +<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">// SPDX-License-Identifier: MIT</span></div> +<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment">//</span></div> +<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#pragma once</span></div> +<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>  </div> +<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include <<a class="code" href="_i_custom_allocator_8hpp.xhtml">armnn/backends/ICustomAllocator.hpp</a>></span></div> +<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>  </div> +<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="keyword">namespace </span><a class="code" href="namespacearmnn.xhtml">armnn</a></div> +<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> {</div> +<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="structarmnn_1_1_allocator.xhtml"> 11</a></span> <span class="keyword">struct </span><a class="code" href="structarmnn_1_1_allocator.xhtml">Allocator</a></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"> /// Pointer to @ICustomAllocator.</span></div> +<div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="structarmnn_1_1_allocator.xhtml#a454dc02f777e9e66b9e798d4f4a647b5"> 14</a></span> <span class="comment"></span> std::shared_ptr<ICustomAllocator> <a class="code" href="structarmnn_1_1_allocator.xhtml#a454dc02f777e9e66b9e798d4f4a647b5">m_CustomAllocator</a>{};<span class="comment"></span></div> +<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> /// Value which the size of each buffer (actual data size + padding) has to be a multiple of.</span></div> +<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="structarmnn_1_1_allocator.xhtml#a84b04a7eb9cb29c23dac4fe55eb1d78c"> 16</a></span> <span class="comment"></span> <span class="keywordtype">size_t</span> <a class="code" href="structarmnn_1_1_allocator.xhtml#a84b04a7eb9cb29c23dac4fe55eb1d78c">m_Alignment</a> = 0 ;</div> +<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> };</div> +<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  </div> +<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="structarmnn_1_1_tensor_memory.xhtml"> 19</a></span> <span class="keyword">struct </span><a class="code" href="structarmnn_1_1_tensor_memory.xhtml">TensorMemory</a></div> +<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> {<span class="comment"></span></div> +<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> /// Number of bytes the value is away from the @BufferStorage.m_Buffer.</span></div> +<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="structarmnn_1_1_tensor_memory.xhtml#a7fa2df31ffac52484e0612a31fd4256d"> 22</a></span> <span class="comment"></span> <span class="keywordtype">size_t</span> <a class="code" href="structarmnn_1_1_tensor_memory.xhtml#a7fa2df31ffac52484e0612a31fd4256d">m_Offset</a>{};<span class="comment"></span></div> +<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> /// Identifier to be used by the @LoadedNetwork to order the tensors.</span></div> +<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="structarmnn_1_1_tensor_memory.xhtml#a0948ebfd3dcfd15456e3306d13d69b95"> 24</a></span> <span class="comment"></span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structarmnn_1_1_tensor_memory.xhtml#a0948ebfd3dcfd15456e3306d13d69b95">m_OutputSlotId</a>{};<span class="comment"></span></div> +<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> /// Pointer to the tensor value.</span></div> +<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="structarmnn_1_1_tensor_memory.xhtml#ad2b382076f26f48cd44783cfca2e3642"> 26</a></span> <span class="comment"></span> <span class="keywordtype">void</span>* <a class="code" href="structarmnn_1_1_tensor_memory.xhtml#ad2b382076f26f48cd44783cfca2e3642">m_Data</a> = <span class="keyword">nullptr</span>;</div> +<div class="line"><a name="l00027"></a><span class="lineno"> 27</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"><a class="line" href="structarmnn_1_1_buffer_storage.xhtml"> 29</a></span> <span class="keyword">struct </span><a class="code" href="structarmnn_1_1_buffer_storage.xhtml">BufferStorage</a></div> +<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> {<span class="comment"></span></div> +<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"> /// Vector of pointer to @TensorMemory.</span></div> +<div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="structarmnn_1_1_buffer_storage.xhtml#a0d6a6b862d9630effce75d8ca18254ba"> 32</a></span> <span class="comment"></span> std::vector<std::shared_ptr<TensorMemory>> <a class="code" href="structarmnn_1_1_buffer_storage.xhtml#a0d6a6b862d9630effce75d8ca18254ba">m_TensorMemoryVector</a>;<span class="comment"></span></div> +<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment"> /// Total size of the buffer.</span></div> +<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="structarmnn_1_1_buffer_storage.xhtml#afcd55b6ce066b6a3ddfcbbc1c483213f"> 34</a></span> <span class="comment"></span> <span class="keywordtype">size_t</span> <a class="code" href="structarmnn_1_1_buffer_storage.xhtml#afcd55b6ce066b6a3ddfcbbc1c483213f">m_BufferSize</a>;<span class="comment"></span></div> +<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment"> /// Pointer to the first element of the buffer.</span></div> +<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="structarmnn_1_1_buffer_storage.xhtml#a9cf5acb7d9fb6392c16b6d642b869143"> 36</a></span> <span class="comment"></span> <span class="keywordtype">void</span>* <a class="code" href="structarmnn_1_1_buffer_storage.xhtml#a9cf5acb7d9fb6392c16b6d642b869143">m_Buffer</a> = <span class="keyword">nullptr</span>;</div> +<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> };</div> +<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  </div> +<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classarmnn_1_1_memory_manager.xhtml"> 39</a></span> <span class="keyword">class </span><a class="code" href="classarmnn_1_1_memory_manager.xhtml">MemoryManager</a></div> +<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> {</div> +<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">public</span>:<span class="comment"></span></div> +<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="comment"> /// Initialization method to store in m_AllocatorBufferStoragePairVector all information needed.</span></div> +<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment"> /// @param[in] bufferStorageVector - Vector of BufferStorage.</span></div> +<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment"> /// @param[in] customAllocator - Pointer to ICustomAllocator.</span></div> +<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment"> /// @param[in] typeAlignment - Optional parameter. Value of which the size of each value has to be multiple of.</span></div> +<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classarmnn_1_1_memory_manager.xhtml#a07bc28679b487cc58281a168c3a1c18b">StoreMemToAllocate</a>(std::vector<BufferStorage> bufferStorageVector,</div> +<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  std::shared_ptr<ICustomAllocator> customAllocator,</div> +<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keywordtype">size_t</span> typeAlignment = 0);</div> +<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment"></span> </div> +<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment"> /// Allocate the amount of memory indicated by m_BufferSize, and</span></div> +<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment"> /// point each m_Data to each correspondent Tensor so that they are m_Offset bytes separated.</span></div> +<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classarmnn_1_1_memory_manager.xhtml#a36571ba095c5f84e8dbaee44d9068af8">Allocate</a>();</div> +<div class="line"><a name="l00053"></a><span class="lineno"> 53</span> <span class="comment"></span> </div> +<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="comment"> /// Deallocate memory</span></div> +<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classarmnn_1_1_memory_manager.xhtml#afaf63777ab6c7323a7b4eceecdfee3df">Deallocate</a>();</div> +<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  </div> +<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="keyword">private</span>:</div> +<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  std::vector<std::pair<Allocator, std::vector<BufferStorage>>> m_AllocatorBufferStoragePairVector;</div> +<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> };</div> +<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  </div> +<div class="line"><a name="l00061"></a><span class="lineno"> 61</span> } <span class="comment">// namespace armnn</span></div> </div><!-- fragment --></div><!-- contents --> </div><!-- doc-content --> +<div class="ttc" id="astructarmnn_1_1_allocator_xhtml"><div class="ttname"><a href="structarmnn_1_1_allocator.xhtml">armnn::Allocator</a></div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00011">MemoryManager.hpp:11</a></div></div> +<div class="ttc" id="astructarmnn_1_1_allocator_xhtml_a454dc02f777e9e66b9e798d4f4a647b5"><div class="ttname"><a href="structarmnn_1_1_allocator.xhtml#a454dc02f777e9e66b9e798d4f4a647b5">armnn::Allocator::m_CustomAllocator</a></div><div class="ttdeci">std::shared_ptr< ICustomAllocator > m_CustomAllocator</div><div class="ttdoc">Pointer to @ICustomAllocator.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00014">MemoryManager.hpp:14</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_memory_manager_xhtml_afaf63777ab6c7323a7b4eceecdfee3df"><div class="ttname"><a href="classarmnn_1_1_memory_manager.xhtml#afaf63777ab6c7323a7b4eceecdfee3df">armnn::MemoryManager::Deallocate</a></div><div class="ttdeci">void Deallocate()</div><div class="ttdoc">Deallocate memory.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8cpp_source.xhtml#l00041">MemoryManager.cpp:41</a></div></div> +<div class="ttc" id="anamespacearmnn_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="astructarmnn_1_1_buffer_storage_xhtml_afcd55b6ce066b6a3ddfcbbc1c483213f"><div class="ttname"><a href="structarmnn_1_1_buffer_storage.xhtml#afcd55b6ce066b6a3ddfcbbc1c483213f">armnn::BufferStorage::m_BufferSize</a></div><div class="ttdeci">size_t m_BufferSize</div><div class="ttdoc">Total size of the buffer.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00034">MemoryManager.hpp:34</a></div></div> +<div class="ttc" id="astructarmnn_1_1_tensor_memory_xhtml_a7fa2df31ffac52484e0612a31fd4256d"><div class="ttname"><a href="structarmnn_1_1_tensor_memory.xhtml#a7fa2df31ffac52484e0612a31fd4256d">armnn::TensorMemory::m_Offset</a></div><div class="ttdeci">size_t m_Offset</div><div class="ttdoc">Number of bytes the value is away from the @BufferStorage.m_Buffer.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00022">MemoryManager.hpp:22</a></div></div> +<div class="ttc" id="astructarmnn_1_1_buffer_storage_xhtml"><div class="ttname"><a href="structarmnn_1_1_buffer_storage.xhtml">armnn::BufferStorage</a></div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00029">MemoryManager.hpp:29</a></div></div> +<div class="ttc" id="astructarmnn_1_1_tensor_memory_xhtml"><div class="ttname"><a href="structarmnn_1_1_tensor_memory.xhtml">armnn::TensorMemory</a></div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00019">MemoryManager.hpp:19</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_memory_manager_xhtml"><div class="ttname"><a href="classarmnn_1_1_memory_manager.xhtml">armnn::MemoryManager</a></div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00039">MemoryManager.hpp:39</a></div></div> +<div class="ttc" id="astructarmnn_1_1_tensor_memory_xhtml_a0948ebfd3dcfd15456e3306d13d69b95"><div class="ttname"><a href="structarmnn_1_1_tensor_memory.xhtml#a0948ebfd3dcfd15456e3306d13d69b95">armnn::TensorMemory::m_OutputSlotId</a></div><div class="ttdeci">unsigned int m_OutputSlotId</div><div class="ttdoc">Identifier to be used by the @LoadedNetwork to order the tensors.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00024">MemoryManager.hpp:24</a></div></div> +<div class="ttc" id="a_i_custom_allocator_8hpp_xhtml"><div class="ttname"><a href="_i_custom_allocator_8hpp.xhtml">ICustomAllocator.hpp</a></div></div> +<div class="ttc" id="astructarmnn_1_1_buffer_storage_xhtml_a0d6a6b862d9630effce75d8ca18254ba"><div class="ttname"><a href="structarmnn_1_1_buffer_storage.xhtml#a0d6a6b862d9630effce75d8ca18254ba">armnn::BufferStorage::m_TensorMemoryVector</a></div><div class="ttdeci">std::vector< std::shared_ptr< TensorMemory > > m_TensorMemoryVector</div><div class="ttdoc">Vector of pointer to @TensorMemory.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00032">MemoryManager.hpp:32</a></div></div> +<div class="ttc" id="astructarmnn_1_1_allocator_xhtml_a84b04a7eb9cb29c23dac4fe55eb1d78c"><div class="ttname"><a href="structarmnn_1_1_allocator.xhtml#a84b04a7eb9cb29c23dac4fe55eb1d78c">armnn::Allocator::m_Alignment</a></div><div class="ttdeci">size_t m_Alignment</div><div class="ttdoc">Value which the size of each buffer (actual data size + padding) has to be a multiple of.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00016">MemoryManager.hpp:16</a></div></div> +<div class="ttc" id="astructarmnn_1_1_tensor_memory_xhtml_ad2b382076f26f48cd44783cfca2e3642"><div class="ttname"><a href="structarmnn_1_1_tensor_memory.xhtml#ad2b382076f26f48cd44783cfca2e3642">armnn::TensorMemory::m_Data</a></div><div class="ttdeci">void * m_Data</div><div class="ttdoc">Pointer to the tensor value.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00026">MemoryManager.hpp:26</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_memory_manager_xhtml_a07bc28679b487cc58281a168c3a1c18b"><div class="ttname"><a href="classarmnn_1_1_memory_manager.xhtml#a07bc28679b487cc58281a168c3a1c18b">armnn::MemoryManager::StoreMemToAllocate</a></div><div class="ttdeci">void StoreMemToAllocate(std::vector< BufferStorage > bufferStorageVector, std::shared_ptr< ICustomAllocator > customAllocator, size_t typeAlignment=0)</div><div class="ttdoc">Initialization method to store in m_AllocatorBufferStoragePairVector all information needed.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8cpp_source.xhtml#l00013">MemoryManager.cpp:13</a></div></div> +<div class="ttc" id="astructarmnn_1_1_buffer_storage_xhtml_a9cf5acb7d9fb6392c16b6d642b869143"><div class="ttname"><a href="structarmnn_1_1_buffer_storage.xhtml#a9cf5acb7d9fb6392c16b6d642b869143">armnn::BufferStorage::m_Buffer</a></div><div class="ttdeci">void * m_Buffer</div><div class="ttdoc">Pointer to the first element of the buffer.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8hpp_source.xhtml#l00036">MemoryManager.hpp:36</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_memory_manager_xhtml_a36571ba095c5f84e8dbaee44d9068af8"><div class="ttname"><a href="classarmnn_1_1_memory_manager.xhtml#a36571ba095c5f84e8dbaee44d9068af8">armnn::MemoryManager::Allocate</a></div><div class="ttdeci">void Allocate()</div><div class="ttdoc">Allocate the amount of memory indicated by m_BufferSize, and point each m_Data to each correspondent ...</div><div class="ttdef"><b>Definition:</b> <a href="_memory_manager_8cpp_source.xhtml#l00023">MemoryManager.cpp:23</a></div></div> <!-- 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_797a213d7d01b98ef12d53b0820ea64e.xhtml">backendsCommon</a></li><li class="navelem"><a class="el" href="_memory_manager_8hpp.xhtml">MemoryManager.hpp</a></li> - <li class="footer">Generated on Fri Feb 24 2023 10:24:25 for ArmNN by + <li class="footer">Generated on Wed Mar 22 2023 15:53:01 for ArmNN by <a href="http://www.doxygen.org/index.html"> - <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> + <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li> </ul> </div> </body> |