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/_constant_layer_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/_constant_layer_8hpp_source.xhtml')
-rw-r--r-- | 23.02/_constant_layer_8hpp_source.xhtml | 118 |
1 files changed, 90 insertions, 28 deletions
diff --git a/23.02/_constant_layer_8hpp_source.xhtml b/23.02/_constant_layer_8hpp_source.xhtml index dcee18e9a1..3ae6edda46 100644 --- a/23.02/_constant_layer_8hpp_source.xhtml +++ b/23.02/_constant_layer_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/armnn/layers/ConstantLayer.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('_constant_layer_8hpp_source.xhtml','');}); +/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ +$(document).ready(function(){initNavTree('_constant_layer_8hpp_source.xhtml',''); initResizable(); }); +/* @license-end */ </script> <div id="doc-content"> <!-- window showing the filter options --> @@ -98,33 +101,92 @@ $(document).ready(function(){initNavTree('_constant_layer_8hpp_source.xhtml','') <div class="title">ConstantLayer.hpp</div> </div> </div><!--header--> <div class="contents"> -<a href="_constant_layer_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 © 2017 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="_layer_8hpp.xhtml">Layer.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"> 11</span> </div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="keyword">class </span>ScopedTensorHandle;</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"></span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">/// A layer that the constant data can be bound to.</span></div><div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="classarmnn_1_1_constant_layer.xhtml"> 15</a></span> <span class="comment"></span><span class="keyword">class </span><a class="code" href="classarmnn_1_1_constant_layer.xhtml">ConstantLayer</a> : <span class="keyword">public</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> {</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="keyword">public</span>:<span class="comment"></span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> /// Makes a workload for the Constant type.</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> /// @param [in] graph The graph where this layer can be found.</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> /// @param [in] factory The workload factory which will create the workload.</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> /// @return A pointer to the created workload, or nullptr if not created.</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"></span> <span class="keyword">virtual</span> std::unique_ptr<IWorkload> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#adfa912d0c4c6c00f1af2cbfa799572b7">CreateWorkload</a>(<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_i_workload_factory.xhtml">IWorkloadFactory</a>& factory) <span class="keyword">const override</span>;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"></span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> /// Creates a dynamically-allocated copy of this layer.</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> /// @param [in] graph The graph into which this layer is being cloned.</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"></span> <a class="code" href="classarmnn_1_1_constant_layer.xhtml">ConstantLayer</a>* <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a5340a3dbbc84afba95fe19d1c8b5fb04">Clone</a>(<a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a>& graph) <span class="keyword">const override</span>;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"></span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> /// Check if the input tensor shape(s)</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"> /// will lead to a valid configuration of @ref ConstantLayer</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> /// @param [in] shapeInferenceMethod Indicates if output shape shall be overwritten or just validated.</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a8c8f543d7e9729362c266d12ec169966">ValidateTensorShapesFromInputs</a>() <span class="keyword">override</span>;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment"></span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment"> /// By default returns inputShapes if the number of inputs are equal to number of outputs,</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment"> /// otherwise infers the output shapes from given input shapes and layer properties.</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment"> /// @param [in] inputShapes The input shapes layer has.</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment"> /// @return a vector to the inferred output shape.</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment"></span> std::vector<TensorShape> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a65ca562c882ad619684445a1402f415a">InferOutputShapes</a>(<span class="keyword">const</span> std::vector<TensorShape>& inputShapes) <span class="keyword">const override</span>;</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment"></span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment"> /// Free up the constant source data stored by the layer.</span></div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classarmnn_1_1_constant_layer.xhtml#a49a08bdbd40e6913a9a3e1418aa1f43a"> 40</a></span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a49a08bdbd40e6913a9a3e1418aa1f43a">ReleaseConstantData</a>()<span class="keyword"> override </span>{}</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordtype">void</span> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a46fc3fdd4b2a5dd6d184e57983cf20bc">ExecuteStrategy</a>(<a class="code" href="classarmnn_1_1_i_strategy.xhtml">IStrategy</a>& strategy) <span class="keyword">const override</span>;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classarmnn_1_1_constant_layer.xhtml#ad0c4b8ee0efd8f9336571cbeab8a53fe"> 44</a></span>  std::shared_ptr<ConstTensorHandle> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#ad0c4b8ee0efd8f9336571cbeab8a53fe">m_LayerOutput</a>;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">protected</span>:<span class="comment"></span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="comment"> /// Constructor to create a ConstantLayer.</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment"> /// @param [in] name Optional name for the layer.</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment"></span> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a13352cef234015ec4a2233f58cc764ae">ConstantLayer</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* name);</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment"></span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment"> /// Default destructor</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment"></span> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a19c5dac79ecae1c9fd71235462387311">~ConstantLayer</a>() = <span class="keywordflow">default</span>;</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"> /// Retrieve the handles to the constant values stored by the layer.</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment"></span> <span class="comment">// For API stability DO NOT ALTER order and add new members to the end of vector</span></div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classarmnn_1_1_constant_layer.xhtml#a8107df0f1cbbd67eaf174d9459f3669d"> 56</a></span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#af978f897fb7e115a901cb7ed95f8e532">ConstantTensors</a> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a8107df0f1cbbd67eaf174d9459f3669d">GetConstantTensorsByRef</a>()<span class="keyword"> override </span>{ <span class="keywordflow">return</span> {m_LayerOutput}; }</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> };</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> } <span class="comment">// namespace</span></div><div class="ttc" id="classarmnn_1_1_constant_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml">armnn::ConstantLayer</a></div><div class="ttdoc">A layer that the constant data can be bound to. </div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8hpp_source.xhtml#l00015">ConstantLayer.hpp:15</a></div></div> -<div class="ttc" id="classarmnn_1_1_constant_layer_xhtml_adfa912d0c4c6c00f1af2cbfa799572b7"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#adfa912d0c4c6c00f1af2cbfa799572b7">armnn::ConstantLayer::CreateWorkload</a></div><div class="ttdeci">virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override</div><div class="ttdoc">Makes a workload for the Constant type. </div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8cpp_source.xhtml#l00021">ConstantLayer.cpp:21</a></div></div> -<div class="ttc" id="classarmnn_1_1_i_workload_factory_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a></div><div class="ttdef"><b>Definition:</b> <a href="_workload_factory_8hpp_source.xhtml#l00022">WorkloadFactory.hpp:22</a></div></div> -<div class="ttc" id="classarmnn_1_1_constant_layer_xhtml_ad0c4b8ee0efd8f9336571cbeab8a53fe"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#ad0c4b8ee0efd8f9336571cbeab8a53fe">armnn::ConstantLayer::m_LayerOutput</a></div><div class="ttdeci">std::shared_ptr< ConstTensorHandle > m_LayerOutput</div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8hpp_source.xhtml#l00044">ConstantLayer.hpp:44</a></div></div> -<div class="ttc" id="classarmnn_1_1_constant_layer_xhtml_a8c8f543d7e9729362c266d12ec169966"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a8c8f543d7e9729362c266d12ec169966">armnn::ConstantLayer::ValidateTensorShapesFromInputs</a></div><div class="ttdeci">void ValidateTensorShapesFromInputs() override</div><div class="ttdoc">Check if the input tensor shape(s) will lead to a valid configuration of ConstantLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8cpp_source.xhtml#l00045">ConstantLayer.cpp:45</a></div></div> -<div class="ttc" id="classarmnn_1_1_constant_layer_xhtml_a46fc3fdd4b2a5dd6d184e57983cf20bc"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a46fc3fdd4b2a5dd6d184e57983cf20bc">armnn::ConstantLayer::ExecuteStrategy</a></div><div class="ttdeci">void ExecuteStrategy(IStrategy &strategy) const override</div><div class="ttdoc">Apply a visitor to this layer. </div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8cpp_source.xhtml#l00065">ConstantLayer.cpp:65</a></div></div> -<div class="ttc" id="classarmnn_1_1_constant_layer_xhtml_a65ca562c882ad619684445a1402f415a"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a65ca562c882ad619684445a1402f415a">armnn::ConstantLayer::InferOutputShapes</a></div><div class="ttdeci">std::vector< TensorShape > InferOutputShapes(const std::vector< TensorShape > &inputShapes) const override</div><div class="ttdoc">By default returns inputShapes if the number of inputs are equal to number of outputs, otherwise infers the output shapes from given input shapes and layer properties. </div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8cpp_source.xhtml#l00040">ConstantLayer.cpp:40</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_i_strategy_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_strategy.xhtml">armnn::IStrategy</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_strategy_8hpp_source.xhtml#l00016">IStrategy.hpp:16</a></div></div> -<div class="ttc" id="classarmnn_1_1_constant_layer_xhtml_a19c5dac79ecae1c9fd71235462387311"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a19c5dac79ecae1c9fd71235462387311">armnn::ConstantLayer::~ConstantLayer</a></div><div class="ttdeci">~ConstantLayer()=default</div><div class="ttdoc">Default destructor. </div></div> -<div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_af978f897fb7e115a901cb7ed95f8e532"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#af978f897fb7e115a901cb7ed95f8e532">armnn::IConnectableLayer::ConstantTensors</a></div><div class="ttdeci">std::vector< std::reference_wrapper< std::shared_ptr< ConstTensorHandle > >> ConstantTensors</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00124">INetwork.hpp:124</a></div></div> -<div class="ttc" id="classarmnn_1_1_constant_layer_xhtml_a5340a3dbbc84afba95fe19d1c8b5fb04"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a5340a3dbbc84afba95fe19d1c8b5fb04">armnn::ConstantLayer::Clone</a></div><div class="ttdeci">ConstantLayer * Clone(Graph &graph) const override</div><div class="ttdoc">Creates a dynamically-allocated copy of this layer. </div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8cpp_source.xhtml#l00030">ConstantLayer.cpp:30</a></div></div> -<div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00030">Graph.hpp:30</a></div></div> -<div class="ttc" id="_layer_8hpp_xhtml"><div class="ttname"><a href="_layer_8hpp.xhtml">Layer.hpp</a></div></div> -<div class="ttc" id="classarmnn_1_1_constant_layer_xhtml_a49a08bdbd40e6913a9a3e1418aa1f43a"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a49a08bdbd40e6913a9a3e1418aa1f43a">armnn::ConstantLayer::ReleaseConstantData</a></div><div class="ttdeci">void ReleaseConstantData() override</div><div class="ttdoc">Free up the constant source data stored by the layer. </div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8hpp_source.xhtml#l00040">ConstantLayer.hpp:40</a></div></div> -<div class="ttc" id="classarmnn_1_1_constant_layer_xhtml_a8107df0f1cbbd67eaf174d9459f3669d"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a8107df0f1cbbd67eaf174d9459f3669d">armnn::ConstantLayer::GetConstantTensorsByRef</a></div><div class="ttdeci">ConstantTensors GetConstantTensorsByRef() override</div><div class="ttdoc">Retrieve the handles to the constant values stored by the layer. </div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8hpp_source.xhtml#l00056">ConstantLayer.hpp:56</a></div></div> -<div class="ttc" id="classarmnn_1_1_constant_layer_xhtml_a13352cef234015ec4a2233f58cc764ae"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a13352cef234015ec4a2233f58cc764ae">armnn::ConstantLayer::ConstantLayer</a></div><div class="ttdeci">ConstantLayer(const char *name)</div><div class="ttdoc">Constructor to create a ConstantLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8cpp_source.xhtml#l00016">ConstantLayer.cpp:16</a></div></div> -<div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00217">Layer.hpp:217</a></div></div> +<a href="_constant_layer_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 © 2017 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="_layer_8hpp.xhtml">Layer.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"> 11</span>  </div> +<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="keyword">class </span>ScopedTensorHandle;</div> +<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"></span> </div> +<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment">/// A layer that the constant data can be bound to.</span></div> +<div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="classarmnn_1_1_constant_layer.xhtml"> 15</a></span> <span class="comment"></span><span class="keyword">class </span><a class="code" href="classarmnn_1_1_constant_layer.xhtml">ConstantLayer</a> : <span class="keyword">public</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a></div> +<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> {</div> +<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="keyword">public</span>:<span class="comment"></span></div> +<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> /// Makes a workload for the Constant type.</span></div> +<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> /// @param [in] graph The graph where this layer can be found.</span></div> +<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> /// @param [in] factory The workload factory which will create the workload.</span></div> +<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> /// @return A pointer to the created workload, or nullptr if not created.</span></div> +<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"></span> <span class="keyword">virtual</span> std::unique_ptr<IWorkload> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#adfa912d0c4c6c00f1af2cbfa799572b7">CreateWorkload</a>(<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_i_workload_factory.xhtml">IWorkloadFactory</a>& factory) <span class="keyword">const override</span>;</div> +<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"></span> </div> +<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> /// Creates a dynamically-allocated copy of this layer.</span></div> +<div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> /// @param [in] graph The graph into which this layer is being cloned.</span></div> +<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"></span> <a class="code" href="classarmnn_1_1_constant_layer.xhtml">ConstantLayer</a>* <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a5340a3dbbc84afba95fe19d1c8b5fb04">Clone</a>(<a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a>& graph) <span class="keyword">const override</span>;</div> +<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"></span> </div> +<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"> /// Check if the input tensor shape(s)</span></div> +<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"> /// will lead to a valid configuration of @ref ConstantLayer</span></div> +<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> /// @param [in] shapeInferenceMethod Indicates if output shape shall be overwritten or just validated.</span></div> +<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a8c8f543d7e9729362c266d12ec169966">ValidateTensorShapesFromInputs</a>() <span class="keyword">override</span>;</div> +<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment"></span> </div> +<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment"> /// By default returns inputShapes if the number of inputs are equal to number of outputs,</span></div> +<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment"> /// otherwise infers the output shapes from given input shapes and layer properties.</span></div> +<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment"> /// @param [in] inputShapes The input shapes layer has.</span></div> +<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment"> /// @return a vector to the inferred output shape.</span></div> +<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment"></span> std::vector<TensorShape> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a65ca562c882ad619684445a1402f415a">InferOutputShapes</a>(<span class="keyword">const</span> std::vector<TensorShape>& inputShapes) <span class="keyword">const override</span>;</div> +<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment"></span> </div> +<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment"> /// Free up the constant source data stored by the layer.</span></div> +<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classarmnn_1_1_constant_layer.xhtml#a49a08bdbd40e6913a9a3e1418aa1f43a"> 40</a></span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a49a08bdbd40e6913a9a3e1418aa1f43a">ReleaseConstantData</a>()<span class="keyword"> override </span>{}</div> +<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  </div> +<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordtype">void</span> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a46fc3fdd4b2a5dd6d184e57983cf20bc">ExecuteStrategy</a>(<a class="code" href="classarmnn_1_1_i_strategy.xhtml">IStrategy</a>& strategy) <span class="keyword">const override</span>;</div> +<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  </div> +<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classarmnn_1_1_constant_layer.xhtml#ad0c4b8ee0efd8f9336571cbeab8a53fe"> 44</a></span>  std::shared_ptr<ConstTensorHandle> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#ad0c4b8ee0efd8f9336571cbeab8a53fe">m_LayerOutput</a>;</div> +<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  </div> +<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="keyword">protected</span>:<span class="comment"></span></div> +<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="comment"> /// Constructor to create a ConstantLayer.</span></div> +<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment"> /// @param [in] name Optional name for the layer.</span></div> +<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment"></span> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a13352cef234015ec4a2233f58cc764ae">ConstantLayer</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* name);</div> +<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment"></span> </div> +<div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="comment"> /// Default destructor</span></div> +<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> <span class="comment"></span> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a19c5dac79ecae1c9fd71235462387311">~ConstantLayer</a>() = <span class="keywordflow">default</span>;</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"> /// Retrieve the handles to the constant values stored by the layer.</span></div> +<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment"></span> <span class="comment">// For API stability DO NOT ALTER order and add new members to the end of vector</span></div> +<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classarmnn_1_1_constant_layer.xhtml#a8107df0f1cbbd67eaf174d9459f3669d"> 56</a></span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#af978f897fb7e115a901cb7ed95f8e532">ConstantTensors</a> <a class="code" href="classarmnn_1_1_constant_layer.xhtml#a8107df0f1cbbd67eaf174d9459f3669d">GetConstantTensorsByRef</a>()<span class="keyword"> override </span>{ <span class="keywordflow">return</span> {<a class="code" href="classarmnn_1_1_constant_layer.xhtml#ad0c4b8ee0efd8f9336571cbeab8a53fe">m_LayerOutput</a>}; }</div> +<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> };</div> +<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  </div> +<div class="line"><a name="l00059"></a><span class="lineno"> 59</span> } <span class="comment">// namespace</span></div> </div><!-- fragment --></div><!-- contents --> </div><!-- doc-content --> +<div class="ttc" id="aclassarmnn_1_1_constant_layer_xhtml_a49a08bdbd40e6913a9a3e1418aa1f43a"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a49a08bdbd40e6913a9a3e1418aa1f43a">armnn::ConstantLayer::ReleaseConstantData</a></div><div class="ttdeci">void ReleaseConstantData() override</div><div class="ttdoc">Free up the constant source data stored by the layer.</div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8hpp_source.xhtml#l00040">ConstantLayer.hpp:40</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_constant_layer_xhtml_a8107df0f1cbbd67eaf174d9459f3669d"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a8107df0f1cbbd67eaf174d9459f3669d">armnn::ConstantLayer::GetConstantTensorsByRef</a></div><div class="ttdeci">ConstantTensors GetConstantTensorsByRef() override</div><div class="ttdoc">Retrieve the handles to the constant values stored by the layer.</div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8hpp_source.xhtml#l00056">ConstantLayer.hpp:56</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_constant_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml">armnn::ConstantLayer</a></div><div class="ttdoc">A layer that the constant data can be bound to.</div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8hpp_source.xhtml#l00015">ConstantLayer.hpp:15</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_constant_layer_xhtml_adfa912d0c4c6c00f1af2cbfa799572b7"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#adfa912d0c4c6c00f1af2cbfa799572b7">armnn::ConstantLayer::CreateWorkload</a></div><div class="ttdeci">virtual std::unique_ptr< IWorkload > CreateWorkload(const IWorkloadFactory &factory) const override</div><div class="ttdoc">Makes a workload for the Constant type.</div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8cpp_source.xhtml#l00021">ConstantLayer.cpp:21</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_constant_layer_xhtml_a65ca562c882ad619684445a1402f415a"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a65ca562c882ad619684445a1402f415a">armnn::ConstantLayer::InferOutputShapes</a></div><div class="ttdeci">std::vector< TensorShape > InferOutputShapes(const std::vector< TensorShape > &inputShapes) const override</div><div class="ttdoc">By default returns inputShapes if the number of inputs are equal to number of outputs,...</div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8cpp_source.xhtml#l00040">ConstantLayer.cpp:40</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00217">Layer.hpp:217</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_i_connectable_layer_xhtml_af978f897fb7e115a901cb7ed95f8e532"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#af978f897fb7e115a901cb7ed95f8e532">armnn::IConnectableLayer::ConstantTensors</a></div><div class="ttdeci">std::vector< std::reference_wrapper< std::shared_ptr< ConstTensorHandle > >> ConstantTensors</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00124">INetwork.hpp:124</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_i_workload_factory_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a></div><div class="ttdef"><b>Definition:</b> <a href="_workload_factory_8hpp_source.xhtml#l00022">WorkloadFactory.hpp:22</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_constant_layer_xhtml_a13352cef234015ec4a2233f58cc764ae"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a13352cef234015ec4a2233f58cc764ae">armnn::ConstantLayer::ConstantLayer</a></div><div class="ttdeci">ConstantLayer(const char *name)</div><div class="ttdoc">Constructor to create a ConstantLayer.</div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8cpp_source.xhtml#l00016">ConstantLayer.cpp:16</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="aclassarmnn_1_1_i_strategy_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_strategy.xhtml">armnn::IStrategy</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_strategy_8hpp_source.xhtml#l00016">IStrategy.hpp:16</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_constant_layer_xhtml_a46fc3fdd4b2a5dd6d184e57983cf20bc"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a46fc3fdd4b2a5dd6d184e57983cf20bc">armnn::ConstantLayer::ExecuteStrategy</a></div><div class="ttdeci">void ExecuteStrategy(IStrategy &strategy) const override</div><div class="ttdoc">Apply a visitor to this layer.</div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8cpp_source.xhtml#l00065">ConstantLayer.cpp:65</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_constant_layer_xhtml_a5340a3dbbc84afba95fe19d1c8b5fb04"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a5340a3dbbc84afba95fe19d1c8b5fb04">armnn::ConstantLayer::Clone</a></div><div class="ttdeci">ConstantLayer * Clone(Graph &graph) const override</div><div class="ttdoc">Creates a dynamically-allocated copy of this layer.</div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8cpp_source.xhtml#l00030">ConstantLayer.cpp:30</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_constant_layer_xhtml_a8c8f543d7e9729362c266d12ec169966"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a8c8f543d7e9729362c266d12ec169966">armnn::ConstantLayer::ValidateTensorShapesFromInputs</a></div><div class="ttdeci">void ValidateTensorShapesFromInputs() override</div><div class="ttdoc">Check if the input tensor shape(s) will lead to a valid configuration of ConstantLayer.</div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8cpp_source.xhtml#l00045">ConstantLayer.cpp:45</a></div></div> +<div class="ttc" id="a_layer_8hpp_xhtml"><div class="ttname"><a href="_layer_8hpp.xhtml">Layer.hpp</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_constant_layer_xhtml_ad0c4b8ee0efd8f9336571cbeab8a53fe"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#ad0c4b8ee0efd8f9336571cbeab8a53fe">armnn::ConstantLayer::m_LayerOutput</a></div><div class="ttdeci">std::shared_ptr< ConstTensorHandle > m_LayerOutput</div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8hpp_source.xhtml#l00044">ConstantLayer.hpp:44</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00030">Graph.hpp:30</a></div></div> +<div class="ttc" id="aclassarmnn_1_1_constant_layer_xhtml_a19c5dac79ecae1c9fd71235462387311"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml#a19c5dac79ecae1c9fd71235462387311">armnn::ConstantLayer::~ConstantLayer</a></div><div class="ttdeci">~ConstantLayer()=default</div><div class="ttdoc">Default destructor.</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_e0a84d05c80a2ef4231141dcbbeac5c8.xhtml">armnn</a></li><li class="navelem"><a class="el" href="dir_9da6642ce0fd5a8c83524f1b621275be.xhtml">layers</a></li><li class="navelem"><a class="el" href="_constant_layer_8hpp.xhtml">ConstantLayer.hpp</a></li> - <li class="footer">Generated on Fri Feb 24 2023 10:24:24 for ArmNN by + <li class="footer">Generated on Wed Mar 22 2023 15:52:59 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> |