Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 6 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 7 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 8 | <title>ArmNN: DynamicBackend Class Reference</title> |
| 9 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 10 | <script type="text/javascript" src="jquery.js"></script> |
| 11 | <script type="text/javascript" src="dynsections.js"></script> |
| 12 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 13 | <script type="text/javascript" src="resize.js"></script> |
| 14 | <script type="text/javascript" src="navtreedata.js"></script> |
| 15 | <script type="text/javascript" src="navtree.js"></script> |
| 16 | <script type="text/javascript"> |
| 17 | $(document).ready(initResizable); |
| 18 | </script> |
| 19 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 20 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 21 | <script type="text/javascript" src="search/search.js"></script> |
| 22 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 23 | </head> |
| 24 | <body> |
| 25 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 26 | <div id="titlearea"> |
| 27 | <table cellspacing="0" cellpadding="0"> |
| 28 | <tbody> |
| 29 | <tr style="height: 56px;"> |
| 30 | <td id="projectalign" style="padding-left: 0.5em;"> |
| 31 | <div id="projectname">ArmNN |
| 32 |  <span id="projectnumber">NotReleased</span> |
| 33 | </div> |
| 34 | </td> |
| 35 | </tr> |
| 36 | </tbody> |
| 37 | </table> |
| 38 | </div> |
| 39 | <!-- end header part --> |
| 40 | <!-- Generated by Doxygen 1.8.13 --> |
| 41 | <script type="text/javascript"> |
| 42 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 43 | </script> |
| 44 | <script type="text/javascript" src="menudata.js"></script> |
| 45 | <script type="text/javascript" src="menu.js"></script> |
| 46 | <script type="text/javascript"> |
| 47 | $(function() { |
| 48 | initMenu('',true,false,'search.php','Search'); |
| 49 | $(document).ready(function() { init_search(); }); |
| 50 | }); |
| 51 | </script> |
| 52 | <div id="main-nav"></div> |
| 53 | </div><!-- top --> |
| 54 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 55 | <div id="nav-tree"> |
| 56 | <div id="nav-tree-contents"> |
| 57 | <div id="nav-sync" class="sync"></div> |
| 58 | </div> |
| 59 | </div> |
| 60 | <div id="splitbar" style="-moz-user-select:none;" |
| 61 | class="ui-resizable-handle"> |
| 62 | </div> |
| 63 | </div> |
| 64 | <script type="text/javascript"> |
| 65 | $(document).ready(function(){initNavTree('classarmnn_1_1_dynamic_backend.html','');}); |
| 66 | </script> |
| 67 | <div id="doc-content"> |
| 68 | <!-- window showing the filter options --> |
| 69 | <div id="MSearchSelectWindow" |
| 70 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 71 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 72 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 73 | </div> |
| 74 | |
| 75 | <!-- iframe showing the search results (closed by default) --> |
| 76 | <div id="MSearchResultsWindow"> |
| 77 | <iframe src="javascript:void(0)" frameborder="0" |
| 78 | name="MSearchResults" id="MSearchResults"> |
| 79 | </iframe> |
| 80 | </div> |
| 81 | |
| 82 | <div class="header"> |
| 83 | <div class="summary"> |
| 84 | <a href="#pub-types">Public Types</a> | |
| 85 | <a href="#pub-methods">Public Member Functions</a> | |
| 86 | <a href="classarmnn_1_1_dynamic_backend-members.html">List of all members</a> </div> |
| 87 | <div class="headertitle"> |
| 88 | <div class="title">DynamicBackend Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div> |
| 89 | </div><!--header--> |
| 90 | <div class="contents"> |
| 91 | |
| 92 | <p><code>#include <<a class="el" href="include_2armnn_2backends_2_dynamic_backend_8hpp_source.html">DynamicBackend.hpp</a>></code></p> |
| 93 | <table class="memberdecls"> |
| 94 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a> |
| 95 | Public Types</h2></td></tr> |
| 96 | <tr class="memitem:afc391d6dc3d75baff0e86b70ae710a50"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_dynamic_backend.html#afc391d6dc3d75baff0e86b70ae710a50">HandleCloser</a> = std::function< void(const void *)></td></tr> |
| 97 | <tr class="separator:afc391d6dc3d75baff0e86b70ae710a50"><td class="memSeparator" colspan="2"> </td></tr> |
| 98 | <tr class="memitem:a8bdc460894ec6fe25c7754d0d5d10866"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_dynamic_backend.html#a8bdc460894ec6fe25c7754d0d5d10866">HandlePtr</a> = std::unique_ptr< void, <a class="el" href="classarmnn_1_1_dynamic_backend.html#afc391d6dc3d75baff0e86b70ae710a50">HandleCloser</a> ></td></tr> |
| 99 | <tr class="separator:a8bdc460894ec6fe25c7754d0d5d10866"><td class="memSeparator" colspan="2"> </td></tr> |
| 100 | </table><table class="memberdecls"> |
| 101 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| 102 | Public Member Functions</h2></td></tr> |
| 103 | <tr class="memitem:a1c1454fae6258415712b5e720023fbd1"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_dynamic_backend.html#a1c1454fae6258415712b5e720023fbd1">DynamicBackend</a> (const void *sharedObjectHandle)</td></tr> |
| 104 | <tr class="separator:a1c1454fae6258415712b5e720023fbd1"><td class="memSeparator" colspan="2"> </td></tr> |
| 105 | <tr class="memitem:a6deb5373920ee59a800eca6b01085654"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_backend_id.html">BackendId</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_dynamic_backend.html#a6deb5373920ee59a800eca6b01085654">GetBackendId</a> ()</td></tr> |
| 106 | <tr class="memdesc:a6deb5373920ee59a800eca6b01085654"><td class="mdescLeft"> </td><td class="mdescRight">Public dynamic backend functions. <a href="#a6deb5373920ee59a800eca6b01085654">More...</a><br /></td></tr> |
| 107 | <tr class="separator:a6deb5373920ee59a800eca6b01085654"><td class="memSeparator" colspan="2"> </td></tr> |
| 108 | <tr class="memitem:a74db049ad0000a58b9a58a6cd6d88feb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structarmnn_1_1_backend_version.html">BackendVersion</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_dynamic_backend.html#a74db049ad0000a58b9a58a6cd6d88feb">GetBackendVersion</a> ()</td></tr> |
| 109 | <tr class="separator:a74db049ad0000a58b9a58a6cd6d88feb"><td class="memSeparator" colspan="2"> </td></tr> |
| 110 | <tr class="memitem:a9d10388a851fc1a748c3e385f484b52a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearmnn.html#ade0af9dacaa52cafdd701bef2e901c77">IBackendInternalUniquePtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_dynamic_backend.html#a9d10388a851fc1a748c3e385f484b52a">GetBackend</a> ()</td></tr> |
| 111 | <tr class="separator:a9d10388a851fc1a748c3e385f484b52a"><td class="memSeparator" colspan="2"> </td></tr> |
| 112 | <tr class="memitem:a4c24f07cb0b4bff43655dfdbd5eac539"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_backend_registry.html#aa33ac375677ee8436456a585dd6f68d9">BackendRegistry::FactoryFunction</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_dynamic_backend.html#a4c24f07cb0b4bff43655dfdbd5eac539">GetFactoryFunction</a> ()</td></tr> |
| 113 | <tr class="separator:a4c24f07cb0b4bff43655dfdbd5eac539"><td class="memSeparator" colspan="2"> </td></tr> |
| 114 | </table> |
| 115 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 116 | <div class="textblock"> |
| 117 | <p class="definition">Definition at line <a class="el" href="include_2armnn_2backends_2_dynamic_backend_8hpp_source.html#l00018">18</a> of file <a class="el" href="include_2armnn_2backends_2_dynamic_backend_8hpp_source.html">DynamicBackend.hpp</a>.</p> |
| 118 | </div><h2 class="groupheader">Member Typedef Documentation</h2> |
| 119 | <a id="afc391d6dc3d75baff0e86b70ae710a50"></a> |
| 120 | <h2 class="memtitle"><span class="permalink"><a href="#afc391d6dc3d75baff0e86b70ae710a50">◆ </a></span>HandleCloser</h2> |
| 121 | |
| 122 | <div class="memitem"> |
| 123 | <div class="memproto"> |
| 124 | <table class="memname"> |
| 125 | <tr> |
| 126 | <td class="memname">using <a class="el" href="classarmnn_1_1_dynamic_backend.html#afc391d6dc3d75baff0e86b70ae710a50">HandleCloser</a> = std::function<void(const void*)></td> |
| 127 | </tr> |
| 128 | </table> |
| 129 | </div><div class="memdoc"> |
| 130 | |
| 131 | <p class="definition">Definition at line <a class="el" href="include_2armnn_2backends_2_dynamic_backend_8hpp_source.html#l00021">21</a> of file <a class="el" href="include_2armnn_2backends_2_dynamic_backend_8hpp_source.html">DynamicBackend.hpp</a>.</p> |
| 132 | |
| 133 | </div> |
| 134 | </div> |
| 135 | <a id="a8bdc460894ec6fe25c7754d0d5d10866"></a> |
| 136 | <h2 class="memtitle"><span class="permalink"><a href="#a8bdc460894ec6fe25c7754d0d5d10866">◆ </a></span>HandlePtr</h2> |
| 137 | |
| 138 | <div class="memitem"> |
| 139 | <div class="memproto"> |
| 140 | <table class="memname"> |
| 141 | <tr> |
| 142 | <td class="memname">using <a class="el" href="classarmnn_1_1_dynamic_backend.html#a8bdc460894ec6fe25c7754d0d5d10866">HandlePtr</a> = std::unique_ptr<void, <a class="el" href="classarmnn_1_1_dynamic_backend.html#afc391d6dc3d75baff0e86b70ae710a50">HandleCloser</a>></td> |
| 143 | </tr> |
| 144 | </table> |
| 145 | </div><div class="memdoc"> |
| 146 | |
| 147 | <p class="definition">Definition at line <a class="el" href="include_2armnn_2backends_2_dynamic_backend_8hpp_source.html#l00022">22</a> of file <a class="el" href="include_2armnn_2backends_2_dynamic_backend_8hpp_source.html">DynamicBackend.hpp</a>.</p> |
| 148 | |
| 149 | </div> |
| 150 | </div> |
| 151 | <h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 152 | <a id="a1c1454fae6258415712b5e720023fbd1"></a> |
| 153 | <h2 class="memtitle"><span class="permalink"><a href="#a1c1454fae6258415712b5e720023fbd1">◆ </a></span>DynamicBackend()</h2> |
| 154 | |
| 155 | <div class="memitem"> |
| 156 | <div class="memproto"> |
| 157 | <table class="mlabels"> |
| 158 | <tr> |
| 159 | <td class="mlabels-left"> |
| 160 | <table class="memname"> |
| 161 | <tr> |
| 162 | <td class="memname"><a class="el" href="classarmnn_1_1_dynamic_backend.html">DynamicBackend</a> </td> |
| 163 | <td>(</td> |
| 164 | <td class="paramtype">const void * </td> |
| 165 | <td class="paramname"><em>sharedObjectHandle</em></td><td>)</td> |
| 166 | <td></td> |
| 167 | </tr> |
| 168 | </table> |
| 169 | </td> |
| 170 | <td class="mlabels-right"> |
| 171 | <span class="mlabels"><span class="mlabel">explicit</span></span> </td> |
| 172 | </tr> |
| 173 | </table> |
| 174 | </div><div class="memdoc"> |
| 175 | |
| 176 | <p class="definition">Definition at line <a class="el" href="_dynamic_backend_8cpp_source.html#l00012">12</a> of file <a class="el" href="_dynamic_backend_8cpp_source.html">DynamicBackend.cpp</a>.</p> |
| 177 | |
| 178 | <p class="reference">References <a class="el" href="include_2armnn_2backends_2_i_backend_internal_8hpp_source.html#l00149">IBackendInternal::GetApiVersion()</a>, <a class="el" href="_dynamic_backend_8cpp_source.html#l00041">DynamicBackend::GetBackendId()</a>, <a class="el" href="_dynamic_backend_8cpp_source.html#l00057">DynamicBackend::GetBackendVersion()</a>, and <a class="el" href="_dynamic_backend_utils_8cpp_source.html#l00051">DynamicBackendUtils::IsBackendCompatible()</a>.</p> |
| 179 | <div class="fragment"><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  : m_BackendIdFunction(<span class="keyword">nullptr</span>)</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  , m_BackendVersionFunction(<span class="keyword">nullptr</span>)</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  , m_BackendFactoryFunction(<span class="keyword">nullptr</span>)</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  , m_Handle(const_cast<void*>(sharedObjectHandle), &<a class="code" href="classarmnn_1_1_dynamic_backend_utils.html#aebd30d283660a07b4123fdb0245e8426">DynamicBackendUtils::CloseHandle</a>)</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>  <span class="keywordflow">if</span> (m_Handle == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  {</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  <span class="keywordflow">throw</span> InvalidArgumentException(<span class="stringliteral">"Cannot create a DynamicBackend object from an invalid shared object handle"</span>);</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  }</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <span class="comment">// These calls will throw in case of error</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  m_BackendIdFunction = SetFunctionPointer<IdFunctionType>(<span class="stringliteral">"GetBackendId"</span>);</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  m_BackendVersionFunction = SetFunctionPointer<VersionFunctionType>(<span class="stringliteral">"GetVersion"</span>);</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  m_BackendFactoryFunction = SetFunctionPointer<FactoryFunctionType>(<span class="stringliteral">"BackendFactory"</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>  <span class="comment">// Check that the backend is compatible with the current Backend API</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  BackendId backendId = <a class="code" href="classarmnn_1_1_dynamic_backend.html#a6deb5373920ee59a800eca6b01085654">GetBackendId</a>();</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  BackendVersion backendVersion = <a class="code" href="classarmnn_1_1_dynamic_backend.html#a74db049ad0000a58b9a58a6cd6d88feb">GetBackendVersion</a>();</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keywordflow">if</span> (!<a class="code" href="classarmnn_1_1_dynamic_backend_utils.html#a6789076aa25c6a10faeff1043359bda8">DynamicBackendUtils::IsBackendCompatible</a>(backendVersion))</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  {</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordflow">throw</span> RuntimeException(boost::str(boost::format(<span class="stringliteral">"The dynamic backend %1% (version %2%) is not compatible"</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="stringliteral">"with the current Backend API (vesion %3%)"</span>)</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  % backendId</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  % backendVersion</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  % <a class="code" href="classarmnn_1_1_i_backend_internal.html#a878b8f50d8a2f92ed624803e9f6968ae">IBackendInternal::GetApiVersion</a>()));</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  }</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> }</div><div class="ttc" id="classarmnn_1_1_dynamic_backend_html_a74db049ad0000a58b9a58a6cd6d88feb"><div class="ttname"><a href="classarmnn_1_1_dynamic_backend.html#a74db049ad0000a58b9a58a6cd6d88feb">armnn::DynamicBackend::GetBackendVersion</a></div><div class="ttdeci">BackendVersion GetBackendVersion()</div><div class="ttdef"><b>Definition:</b> <a href="_dynamic_backend_8cpp_source.html#l00057">DynamicBackend.cpp:57</a></div></div> |
| 180 | <div class="ttc" id="classarmnn_1_1_dynamic_backend_html_a6deb5373920ee59a800eca6b01085654"><div class="ttname"><a href="classarmnn_1_1_dynamic_backend.html#a6deb5373920ee59a800eca6b01085654">armnn::DynamicBackend::GetBackendId</a></div><div class="ttdeci">BackendId GetBackendId()</div><div class="ttdoc">Public dynamic backend functions. </div><div class="ttdef"><b>Definition:</b> <a href="_dynamic_backend_8cpp_source.html#l00041">DynamicBackend.cpp:41</a></div></div> |
| 181 | <div class="ttc" id="classarmnn_1_1_dynamic_backend_utils_html_aebd30d283660a07b4123fdb0245e8426"><div class="ttname"><a href="classarmnn_1_1_dynamic_backend_utils.html#aebd30d283660a07b4123fdb0245e8426">armnn::DynamicBackendUtils::CloseHandle</a></div><div class="ttdeci">static void CloseHandle(const void *sharedObjectHandle)</div><div class="ttdef"><b>Definition:</b> <a href="_dynamic_backend_utils_8cpp_source.html#l00037">DynamicBackendUtils.cpp:37</a></div></div> |
| 182 | <div class="ttc" id="classarmnn_1_1_i_backend_internal_html_a878b8f50d8a2f92ed624803e9f6968ae"><div class="ttname"><a href="classarmnn_1_1_i_backend_internal.html#a878b8f50d8a2f92ed624803e9f6968ae">armnn::IBackendInternal::GetApiVersion</a></div><div class="ttdeci">static constexpr BackendVersion GetApiVersion()</div><div class="ttdoc">Returns the version of the Backend API. </div><div class="ttdef"><b>Definition:</b> <a href="include_2armnn_2backends_2_i_backend_internal_8hpp_source.html#l00149">IBackendInternal.hpp:149</a></div></div> |
| 183 | <div class="ttc" id="classarmnn_1_1_dynamic_backend_utils_html_a6789076aa25c6a10faeff1043359bda8"><div class="ttname"><a href="classarmnn_1_1_dynamic_backend_utils.html#a6789076aa25c6a10faeff1043359bda8">armnn::DynamicBackendUtils::IsBackendCompatible</a></div><div class="ttdeci">static bool IsBackendCompatible(const BackendVersion &backendVersion)</div><div class="ttdef"><b>Definition:</b> <a href="_dynamic_backend_utils_8cpp_source.html#l00051">DynamicBackendUtils.cpp:51</a></div></div> |
| 184 | </div><!-- fragment --> |
| 185 | </div> |
| 186 | </div> |
| 187 | <h2 class="groupheader">Member Function Documentation</h2> |
| 188 | <a id="a9d10388a851fc1a748c3e385f484b52a"></a> |
| 189 | <h2 class="memtitle"><span class="permalink"><a href="#a9d10388a851fc1a748c3e385f484b52a">◆ </a></span>GetBackend()</h2> |
| 190 | |
| 191 | <div class="memitem"> |
| 192 | <div class="memproto"> |
| 193 | <table class="memname"> |
| 194 | <tr> |
| 195 | <td class="memname"><a class="el" href="namespacearmnn.html#ade0af9dacaa52cafdd701bef2e901c77">IBackendInternalUniquePtr</a> GetBackend </td> |
| 196 | <td>(</td> |
| 197 | <td class="paramname"></td><td>)</td> |
| 198 | <td></td> |
| 199 | </tr> |
| 200 | </table> |
| 201 | </div><div class="memdoc"> |
| 202 | |
| 203 | <p class="definition">Definition at line <a class="el" href="_dynamic_backend_8cpp_source.html#l00071">71</a> of file <a class="el" href="_dynamic_backend_8cpp_source.html">DynamicBackend.cpp</a>.</p> |
| 204 | <div class="fragment"><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> {</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="comment">// This call throws in case of error</span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="keywordflow">return</span> CreateBackend();</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> }</div></div><!-- fragment --> |
| 205 | </div> |
| 206 | </div> |
| 207 | <a id="a6deb5373920ee59a800eca6b01085654"></a> |
| 208 | <h2 class="memtitle"><span class="permalink"><a href="#a6deb5373920ee59a800eca6b01085654">◆ </a></span>GetBackendId()</h2> |
| 209 | |
| 210 | <div class="memitem"> |
| 211 | <div class="memproto"> |
| 212 | <table class="memname"> |
| 213 | <tr> |
| 214 | <td class="memname"><a class="el" href="classarmnn_1_1_backend_id.html">BackendId</a> GetBackendId </td> |
| 215 | <td>(</td> |
| 216 | <td class="paramname"></td><td>)</td> |
| 217 | <td></td> |
| 218 | </tr> |
| 219 | </table> |
| 220 | </div><div class="memdoc"> |
| 221 | |
| 222 | <p>Public dynamic backend functions. </p> |
| 223 | |
| 224 | <p class="definition">Definition at line <a class="el" href="_dynamic_backend_8cpp_source.html#l00041">41</a> of file <a class="el" href="_dynamic_backend_8cpp_source.html">DynamicBackend.cpp</a>.</p> |
| 225 | |
| 226 | <p class="reference">Referenced by <a class="el" href="_dynamic_backend_8cpp_source.html#l00012">DynamicBackend::DynamicBackend()</a>.</p> |
| 227 | <div class="fragment"><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> {</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordflow">if</span> (m_BackendIdFunction == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  {</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordflow">throw</span> RuntimeException(<span class="stringliteral">"GetBackendId error: invalid function pointer"</span>);</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  }</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> </div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keyword">const</span> <span class="keywordtype">char</span>* backendId = m_BackendIdFunction();</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordflow">if</span> (backendId == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  {</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordflow">throw</span> RuntimeException(<span class="stringliteral">"GetBackendId error: invalid backend id"</span>);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  }</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> </div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="keywordflow">return</span> BackendId(backendId);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> }</div></div><!-- fragment --> |
| 228 | </div> |
| 229 | </div> |
| 230 | <a id="a74db049ad0000a58b9a58a6cd6d88feb"></a> |
| 231 | <h2 class="memtitle"><span class="permalink"><a href="#a74db049ad0000a58b9a58a6cd6d88feb">◆ </a></span>GetBackendVersion()</h2> |
| 232 | |
| 233 | <div class="memitem"> |
| 234 | <div class="memproto"> |
| 235 | <table class="memname"> |
| 236 | <tr> |
| 237 | <td class="memname"><a class="el" href="structarmnn_1_1_backend_version.html">BackendVersion</a> GetBackendVersion </td> |
| 238 | <td>(</td> |
| 239 | <td class="paramname"></td><td>)</td> |
| 240 | <td></td> |
| 241 | </tr> |
| 242 | </table> |
| 243 | </div><div class="memdoc"> |
| 244 | |
| 245 | <p class="definition">Definition at line <a class="el" href="_dynamic_backend_8cpp_source.html#l00057">57</a> of file <a class="el" href="_dynamic_backend_8cpp_source.html">DynamicBackend.cpp</a>.</p> |
| 246 | |
| 247 | <p class="reference">Referenced by <a class="el" href="_dynamic_backend_8cpp_source.html#l00012">DynamicBackend::DynamicBackend()</a>.</p> |
| 248 | <div class="fragment"><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="keywordflow">if</span> (m_BackendVersionFunction == <span class="keyword">nullptr</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="keywordflow">throw</span> RuntimeException(<span class="stringliteral">"GetBackendVersion error: invalid function pointer"</span>);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  }</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  uint32_t major = 0;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  uint32_t minor = 0;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  m_BackendVersionFunction(&major, &minor);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">return</span> BackendVersion{ major, minor };</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> }</div></div><!-- fragment --> |
| 249 | </div> |
| 250 | </div> |
| 251 | <a id="a4c24f07cb0b4bff43655dfdbd5eac539"></a> |
| 252 | <h2 class="memtitle"><span class="permalink"><a href="#a4c24f07cb0b4bff43655dfdbd5eac539">◆ </a></span>GetFactoryFunction()</h2> |
| 253 | |
| 254 | <div class="memitem"> |
| 255 | <div class="memproto"> |
| 256 | <table class="memname"> |
| 257 | <tr> |
| 258 | <td class="memname"><a class="el" href="classarmnn_1_1_backend_registry.html#aa33ac375677ee8436456a585dd6f68d9">BackendRegistry::FactoryFunction</a> GetFactoryFunction </td> |
| 259 | <td>(</td> |
| 260 | <td class="paramname"></td><td>)</td> |
| 261 | <td></td> |
| 262 | </tr> |
| 263 | </table> |
| 264 | </div><div class="memdoc"> |
| 265 | |
| 266 | <p class="definition">Definition at line <a class="el" href="_dynamic_backend_8cpp_source.html#l00077">77</a> of file <a class="el" href="_dynamic_backend_8cpp_source.html">DynamicBackend.cpp</a>.</p> |
| 267 | <div class="fragment"><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> {</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keywordflow">if</span> (m_BackendFactoryFunction == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  {</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keywordflow">throw</span> RuntimeException(<span class="stringliteral">"GetFactoryFunction error: invalid function pointer"</span>);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  }</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">return</span> [<span class="keyword">this</span>]() -> <a class="code" href="namespacearmnn.html#ade0af9dacaa52cafdd701bef2e901c77">IBackendInternalUniquePtr</a></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  {</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="comment">// This call throws in case of error</span></div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordflow">return</span> CreateBackend();</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  };</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span> }</div><div class="ttc" id="namespacearmnn_html_ade0af9dacaa52cafdd701bef2e901c77"><div class="ttname"><a href="namespacearmnn.html#ade0af9dacaa52cafdd701bef2e901c77">armnn::IBackendInternalUniquePtr</a></div><div class="ttdeci">std::unique_ptr< IBackendInternal > IBackendInternalUniquePtr</div><div class="ttdef"><b>Definition:</b> <a href="_backend_registry_8hpp_source.html#l00018">BackendRegistry.hpp:18</a></div></div> |
| 268 | </div><!-- fragment --> |
| 269 | </div> |
| 270 | </div> |
| 271 | <hr/>The documentation for this class was generated from the following files:<ul> |
| 272 | <li>include/armnn/backends/<a class="el" href="include_2armnn_2backends_2_dynamic_backend_8hpp_source.html">DynamicBackend.hpp</a></li> |
| 273 | <li>src/backends/backendsCommon/<a class="el" href="_dynamic_backend_8cpp_source.html">DynamicBackend.cpp</a></li> |
| 274 | </ul> |
| 275 | </div><!-- contents --> |
| 276 | </div><!-- doc-content --> |
| 277 | <!-- start footer part --> |
| 278 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 279 | <ul> |
| 280 | <li class="navelem"><a class="el" href="namespacearmnn.html">armnn</a></li><li class="navelem"><a class="el" href="classarmnn_1_1_dynamic_backend.html">DynamicBackend</a></li> |
| 281 | <li class="footer">Generated on Fri Mar 13 2020 16:07:03 for ArmNN by |
| 282 | <a href="http://www.doxygen.org/index.html"> |
| 283 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 284 | </ul> |
| 285 | </div> |
| 286 | </body> |
| 287 | </html> |