Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!-- Copyright (c) 2020 ARM Limited. --> |
| 2 | <!-- --> |
| 3 | <!-- SPDX-License-Identifier: MIT --> |
| 4 | <!-- --> |
| 5 | <!-- HTML header for doxygen 1.8.13--> |
| 6 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 7 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 8 | <head> |
| 9 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 10 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 11 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 12 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> |
| 13 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 14 | <title>ArmNN: src/backends/backendsCommon/test/CompatibilityTests.cpp File Reference</title> |
| 15 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 16 | <script type="text/javascript" src="jquery.js"></script> |
| 17 | <script type="text/javascript" src="dynsections.js"></script> |
| 18 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 19 | <script type="text/javascript" src="resize.js"></script> |
| 20 | <script type="text/javascript" src="navtreedata.js"></script> |
| 21 | <script type="text/javascript" src="navtree.js"></script> |
| 22 | <script type="text/javascript"> |
| 23 | $(document).ready(initResizable); |
| 24 | </script> |
| 25 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 26 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 27 | <script type="text/javascript" src="search/search.js"></script> |
| 28 | <script type="text/x-mathjax-config"> |
| 29 | MathJax.Hub.Config({ |
| 30 | extensions: ["tex2jax.js"], |
| 31 | jax: ["input/TeX","output/HTML-CSS"], |
| 32 | }); |
| 33 | </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
| 34 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 35 | <link href="stylesheet.css" rel="stylesheet" type="text/css"/> |
| 36 | </head> |
| 37 | <body> |
| 38 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 39 | <div id="titlearea"> |
| 40 | <table cellspacing="0" cellpadding="0"> |
| 41 | <tbody> |
| 42 | <tr style="height: 56px;"> |
| 43 | <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 10rem; margin-top: .5rem; margin-left 10px"/> |
| 44 | <td style="padding-left: 0.5em;"> |
| 45 | <div id="projectname"> |
| 46 |  <span id="projectnumber">20.02</span> |
| 47 | </div> |
| 48 | </td> |
| 49 | </tr> |
| 50 | </tbody> |
| 51 | </table> |
| 52 | </div> |
| 53 | <!-- end header part --> |
| 54 | <!-- Generated by Doxygen 1.8.13 --> |
| 55 | <script type="text/javascript"> |
| 56 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 57 | </script> |
| 58 | <script type="text/javascript" src="menudata.js"></script> |
| 59 | <script type="text/javascript" src="menu.js"></script> |
| 60 | <script type="text/javascript"> |
| 61 | $(function() { |
| 62 | initMenu('',true,false,'search.php','Search'); |
| 63 | $(document).ready(function() { init_search(); }); |
| 64 | }); |
| 65 | </script> |
| 66 | <div id="main-nav"></div> |
| 67 | </div><!-- top --> |
| 68 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 69 | <div id="nav-tree"> |
| 70 | <div id="nav-tree-contents"> |
| 71 | <div id="nav-sync" class="sync"></div> |
| 72 | </div> |
| 73 | </div> |
| 74 | <div id="splitbar" style="-moz-user-select:none;" |
| 75 | class="ui-resizable-handle"> |
| 76 | </div> |
| 77 | </div> |
| 78 | <script type="text/javascript"> |
| 79 | $(document).ready(function(){initNavTree('_compatibility_tests_8cpp.xhtml','');}); |
| 80 | </script> |
| 81 | <div id="doc-content"> |
| 82 | <!-- window showing the filter options --> |
| 83 | <div id="MSearchSelectWindow" |
| 84 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 85 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 86 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 87 | </div> |
| 88 | |
| 89 | <!-- iframe showing the search results (closed by default) --> |
| 90 | <div id="MSearchResultsWindow"> |
| 91 | <iframe src="javascript:void(0)" frameborder="0" |
| 92 | name="MSearchResults" id="MSearchResults"> |
| 93 | </iframe> |
| 94 | </div> |
| 95 | |
| 96 | <div class="header"> |
| 97 | <div class="summary"> |
| 98 | <a href="#func-members">Functions</a> </div> |
| 99 | <div class="headertitle"> |
| 100 | <div class="title">CompatibilityTests.cpp File Reference</div> </div> |
| 101 | </div><!--header--> |
| 102 | <div class="contents"> |
| 103 | <div class="textblock"><code>#include <boost/test/unit_test.hpp></code><br /> |
| 104 | <code>#include <<a class="el" href="_cl_backend_8hpp_source.xhtml">cl/ClBackend.hpp</a>></code><br /> |
| 105 | <code>#include <<a class="el" href="_neon_backend_8hpp_source.xhtml">neon/NeonBackend.hpp</a>></code><br /> |
| 106 | <code>#include <<a class="el" href="_network_8hpp_source.xhtml">Network.hpp</a>></code><br /> |
| 107 | <code>#include <vector></code><br /> |
| 108 | <code>#include <string></code><br /> |
| 109 | </div> |
| 110 | <p><a href="_compatibility_tests_8cpp_source.xhtml">Go to the source code of this file.</a></p> |
| 111 | <table class="memberdecls"> |
| 112 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 113 | Functions</h2></td></tr> |
| 114 | <tr class="memitem:a8189edd0b64c34308ac5ae769f5baae3"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_compatibility_tests_8cpp.xhtml#a8189edd0b64c34308ac5ae769f5baae3">BOOST_AUTO_TEST_CASE</a> (Neon_Cl_DirectCompatibility_Test)</td></tr> |
| 115 | <tr class="separator:a8189edd0b64c34308ac5ae769f5baae3"><td class="memSeparator" colspan="2"> </td></tr> |
| 116 | </table> |
| 117 | <h2 class="groupheader">Function Documentation</h2> |
| 118 | <a id="a8189edd0b64c34308ac5ae769f5baae3"></a> |
| 119 | <h2 class="memtitle"><span class="permalink"><a href="#a8189edd0b64c34308ac5ae769f5baae3">◆ </a></span>BOOST_AUTO_TEST_CASE()</h2> |
| 120 | |
| 121 | <div class="memitem"> |
| 122 | <div class="memproto"> |
| 123 | <table class="memname"> |
| 124 | <tr> |
| 125 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 126 | <td>(</td> |
| 127 | <td class="paramtype">Neon_Cl_DirectCompatibility_Test </td> |
| 128 | <td class="paramname"></td><td>)</td> |
| 129 | <td></td> |
| 130 | </tr> |
| 131 | </table> |
| 132 | </div><div class="memdoc"> |
| 133 | |
| 134 | <p class="definition">Definition at line <a class="el" href="_compatibility_tests_8cpp_source.xhtml#l00020">20</a> of file <a class="el" href="_compatibility_tests_8cpp_source.xhtml">CompatibilityTests.cpp</a>.</p> |
| 135 | |
| 136 | <p class="reference">References <a class="el" href="_graph_8cpp_source.xhtml#l00263">Graph::AddCompatibilityLayers()</a>, <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_profiler_tests_8cpp.xhtml#af7f71af5c6c124222dd1c42c5df892f4">BOOST_AUTO_TEST_SUITE_END()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="namespacearmnn.xhtml#aff209afc1dc598da399e3e78617ce016a78d1be0baa31e083ae8da99aaedaf650">armnn::DirectCompatibility</a>, <a class="el" href="_graph_8hpp_source.xhtml#l00039">Graph::ForEachLayer()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00182">OutputSlot::GetEdgeStrategyForConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00172">OutputSlot::GetTensorHandleFactoryId()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00259">Layer::GetType()</a>, <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a4dd48794eb3305a0f5aece88b111a97b">armnn::MemCopy</a>, <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a115bfc5d633eae55c67f9588acdd2bf9">armnn::MemImport</a>, <a class="el" href="_network_8cpp_source.xhtml#l00824">armnn::SelectTensorHandleStrategy()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00264">Layer::SetBackendId()</a>, and <a class="el" href="_graph_8hpp_source.xhtml#l00173">Graph::TopologicalSort()</a>.</p> |
| 137 | <div class="fragment"><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>  <span class="keyword">auto</span> neonBackend = std::make_unique<NeonBackend>();</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <span class="keyword">auto</span> clBackend = std::make_unique<ClBackend>();</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  <a class="code" href="classarmnn_1_1_tensor_handle_factory_registry.xhtml">TensorHandleFactoryRegistry</a> registry;</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  neonBackend->RegisterTensorHandleFactories(registry);</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  clBackend->RegisterTensorHandleFactories(registry);</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_backend_id.xhtml">BackendId</a>& neonBackendId = neonBackend->GetId();</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_backend_id.xhtml">BackendId</a>& clBackendId = clBackend->GetId();</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <a class="code" href="namespacearmnn.xhtml#a9173495a61a0092b5f38b855f02c3585">BackendsMap</a> backends;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  backends[neonBackendId] = std::move(neonBackend);</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  backends[clBackendId] = std::move(clBackend);</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">armnn::Graph</a> graph;</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>  <a class="code" href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a>>(0, <span class="stringliteral">"input"</span>);</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  inputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(neonBackendId);</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>  <a class="code" href="structarmnn_1_1_softmax_descriptor.xhtml">armnn::SoftmaxDescriptor</a> smDesc;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <a class="code" href="classarmnn_1_1_softmax_layer.xhtml">armnn::SoftmaxLayer</a>* <span class="keyword">const</span> softmaxLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_softmax_layer.xhtml">armnn::SoftmaxLayer</a>>(smDesc, <span class="stringliteral">"softmax1"</span>);</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  softmaxLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(clBackendId);</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>  <a class="code" href="classarmnn_1_1_softmax_layer.xhtml">armnn::SoftmaxLayer</a>* <span class="keyword">const</span> softmaxLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_softmax_layer.xhtml">armnn::SoftmaxLayer</a>>(smDesc, <span class="stringliteral">"softmax2"</span>);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  softmaxLayer2-><a class="code" href="classarmnn_1_1_layer.xhtml#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(neonBackendId);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <a class="code" href="classarmnn_1_1_softmax_layer.xhtml">armnn::SoftmaxLayer</a>* <span class="keyword">const</span> softmaxLayer3 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_softmax_layer.xhtml">armnn::SoftmaxLayer</a>>(smDesc, <span class="stringliteral">"softmax3"</span>);</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  softmaxLayer3-><a class="code" href="classarmnn_1_1_layer.xhtml#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(clBackendId);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> </div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <a class="code" href="classarmnn_1_1_softmax_layer.xhtml">armnn::SoftmaxLayer</a>* <span class="keyword">const</span> softmaxLayer4 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_softmax_layer.xhtml">armnn::SoftmaxLayer</a>>(smDesc, <span class="stringliteral">"softmax4"</span>);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  softmaxLayer4-><a class="code" href="classarmnn_1_1_layer.xhtml#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(neonBackendId);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="code" href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  outputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(clBackendId);</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>  inputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(softmaxLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  softmaxLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(softmaxLayer2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  softmaxLayer2-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(softmaxLayer3-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  softmaxLayer3-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(softmaxLayer4-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  softmaxLayer4-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(outputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</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>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a9a7209345edfdb2b066b0ceb66414d7c">TopologicalSort</a>();</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  std::vector<std::string> errors;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keyword">auto</span> result = <a class="code" href="namespacearmnn.xhtml#a5d3468fb5880eb444cd25b55a86220ff">SelectTensorHandleStrategy</a>(graph, backends, registry, errors);</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  BOOST_TEST(result.m_Error == <span class="keyword">false</span>);</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  BOOST_TEST(result.m_Warning == <span class="keyword">false</span>);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <a class="code" href="classarmnn_1_1_output_slot.xhtml">OutputSlot</a>& inputLayerOut = inputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0);</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <a class="code" href="classarmnn_1_1_output_slot.xhtml">OutputSlot</a>& softmaxLayer1Out = softmaxLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0);</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <a class="code" href="classarmnn_1_1_output_slot.xhtml">OutputSlot</a>& softmaxLayer2Out = softmaxLayer2-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0);</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <a class="code" href="classarmnn_1_1_output_slot.xhtml">OutputSlot</a>& softmaxLayer3Out = softmaxLayer3-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <a class="code" href="classarmnn_1_1_output_slot.xhtml">OutputSlot</a>& softmaxLayer4Out = softmaxLayer4-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="comment">// Check that the correct factory was selected</span></div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  BOOST_TEST(inputLayerOut.<a class="code" href="classarmnn_1_1_output_slot.xhtml#af303cf872a3f95e29992e45224e4cf8e">GetTensorHandleFactoryId</a>() == <span class="stringliteral">"Arm/Cl/TensorHandleFactory"</span>);</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  BOOST_TEST(softmaxLayer1Out.<a class="code" href="classarmnn_1_1_output_slot.xhtml#af303cf872a3f95e29992e45224e4cf8e">GetTensorHandleFactoryId</a>() == <span class="stringliteral">"Arm/Cl/TensorHandleFactory"</span>);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  BOOST_TEST(softmaxLayer2Out.<a class="code" href="classarmnn_1_1_output_slot.xhtml#af303cf872a3f95e29992e45224e4cf8e">GetTensorHandleFactoryId</a>() == <span class="stringliteral">"Arm/Cl/TensorHandleFactory"</span>);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  BOOST_TEST(softmaxLayer3Out.<a class="code" href="classarmnn_1_1_output_slot.xhtml#af303cf872a3f95e29992e45224e4cf8e">GetTensorHandleFactoryId</a>() == <span class="stringliteral">"Arm/Cl/TensorHandleFactory"</span>);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  BOOST_TEST(softmaxLayer4Out.<a class="code" href="classarmnn_1_1_output_slot.xhtml#af303cf872a3f95e29992e45224e4cf8e">GetTensorHandleFactoryId</a>() == <span class="stringliteral">"Arm/Cl/TensorHandleFactory"</span>);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="comment">// Check that the correct strategy was selected</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  BOOST_TEST((inputLayerOut.<a class="code" href="classarmnn_1_1_output_slot.xhtml#a5b481a458c19fd3807b6e04b94b9b174">GetEdgeStrategyForConnection</a>(0) == EdgeStrategy::DirectCompatibility));</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  BOOST_TEST((softmaxLayer1Out.<a class="code" href="classarmnn_1_1_output_slot.xhtml#a5b481a458c19fd3807b6e04b94b9b174">GetEdgeStrategyForConnection</a>(0) == EdgeStrategy::DirectCompatibility));</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  BOOST_TEST((softmaxLayer2Out.<a class="code" href="classarmnn_1_1_output_slot.xhtml#a5b481a458c19fd3807b6e04b94b9b174">GetEdgeStrategyForConnection</a>(0) == EdgeStrategy::DirectCompatibility));</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  BOOST_TEST((softmaxLayer3Out.<a class="code" href="classarmnn_1_1_output_slot.xhtml#a5b481a458c19fd3807b6e04b94b9b174">GetEdgeStrategyForConnection</a>(0) == EdgeStrategy::DirectCompatibility));</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  BOOST_TEST((softmaxLayer4Out.<a class="code" href="classarmnn_1_1_output_slot.xhtml#a5b481a458c19fd3807b6e04b94b9b174">GetEdgeStrategyForConnection</a>(0) == EdgeStrategy::DirectCompatibility));</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> </div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#ad1bbee7bf5f93b792675886f57d3ebe0">AddCompatibilityLayers</a>(backends, registry);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="comment">// Test for copy layers</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordtype">int</span> copyCount= 0;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#ad6521013ad981519904822f2ada2c4ec">ForEachLayer</a>([&copyCount](<a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* layer)</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  {</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keywordflow">if</span> (layer-><a class="code" href="classarmnn_1_1_layer.xhtml#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == LayerType::MemCopy)</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  {</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  copyCount++;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  }</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  });</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  BOOST_TEST(copyCount == 0);</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> </div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="comment">// Test for import layers</span></div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keywordtype">int</span> importCount= 0;</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#ad6521013ad981519904822f2ada2c4ec">ForEachLayer</a>([&importCount](<a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a> *layer)</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  {</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keywordflow">if</span> (layer-><a class="code" href="classarmnn_1_1_layer.xhtml#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == LayerType::MemImport)</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  {</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  importCount++;</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  }</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  });</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  BOOST_TEST(importCount == 0);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 138 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 139 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_a5b481a458c19fd3807b6e04b94b9b174"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#a5b481a458c19fd3807b6e04b94b9b174">armnn::OutputSlot::GetEdgeStrategyForConnection</a></div><div class="ttdeci">EdgeStrategy GetEdgeStrategyForConnection(unsigned int connectionIdx) const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00182">Layer.cpp:182</a></div></div> |
| 140 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a3f6ad59212fa8a47c9265162fff8a274"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a3f6ad59212fa8a47c9265162fff8a274">armnn::Layer::SetBackendId</a></div><div class="ttdeci">void SetBackendId(const BackendId &id)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00264">Layer.hpp:264</a></div></div> |
| 141 | <div class="ttc" id="namespacearmnn_xhtml_a5d3468fb5880eb444cd25b55a86220ff"><div class="ttname"><a href="namespacearmnn.xhtml#a5d3468fb5880eb444cd25b55a86220ff">armnn::SelectTensorHandleStrategy</a></div><div class="ttdeci">OptimizationResult SelectTensorHandleStrategy(Graph &optGraph, BackendsMap &backends, TensorHandleFactoryRegistry &registry, Optional< std::vector< std::string > &> errMessages)</div><div class="ttdef"><b>Definition:</b> <a href="_network_8cpp_source.xhtml#l00824">Network.cpp:824</a></div></div> |
| 142 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 143 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 144 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_ad6521013ad981519904822f2ada2c4ec"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#ad6521013ad981519904822f2ada2c4ec">armnn::Graph::ForEachLayer</a></div><div class="ttdeci">void ForEachLayer(Func func) const</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00039">Graph.hpp:39</a></div></div> |
| 145 | <div class="ttc" id="classarmnn_1_1_softmax_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_softmax_layer.xhtml">armnn::SoftmaxLayer</a></div><div class="ttdoc">This layer represents a softmax operation. </div><div class="ttdef"><b>Definition:</b> <a href="_softmax_layer_8hpp_source.xhtml#l00013">SoftmaxLayer.hpp:13</a></div></div> |
| 146 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml">armnn::OutputSlot</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00083">Layer.hpp:83</a></div></div> |
| 147 | <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#l00029">Graph.hpp:29</a></div></div> |
| 148 | <div class="ttc" id="classarmnn_1_1_tensor_handle_factory_registry_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_handle_factory_registry.xhtml">armnn::TensorHandleFactoryRegistry</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_handle_factory_registry_8hpp_source.xhtml#l00020">TensorHandleFactoryRegistry.hpp:20</a></div></div> |
| 149 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 150 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_aaef29472862381822654ab6cbf7cba2a"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#aaef29472862381822654ab6cbf7cba2a">armnn::Layer::GetType</a></div><div class="ttdeci">LayerType GetType() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00259">Layer.hpp:259</a></div></div> |
| 151 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 152 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_af303cf872a3f95e29992e45224e4cf8e"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#af303cf872a3f95e29992e45224e4cf8e">armnn::OutputSlot::GetTensorHandleFactoryId</a></div><div class="ttdeci">ITensorHandleFactory::FactoryId GetTensorHandleFactoryId() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00172">Layer.cpp:172</a></div></div> |
| 153 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a9a7209345edfdb2b066b0ceb66414d7c"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a9a7209345edfdb2b066b0ceb66414d7c">armnn::Graph::TopologicalSort</a></div><div class="ttdeci">Graph & TopologicalSort()</div><div class="ttdoc">Sorts layers in topological order and return this. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00173">Graph.hpp:173</a></div></div> |
| 154 | <div class="ttc" id="structarmnn_1_1_softmax_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_softmax_descriptor.xhtml">armnn::SoftmaxDescriptor</a></div><div class="ttdoc">A SoftmaxDescriptor for the SoftmaxLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00123">Descriptors.hpp:123</a></div></div> |
| 155 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_ad1bbee7bf5f93b792675886f57d3ebe0"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#ad1bbee7bf5f93b792675886f57d3ebe0">armnn::Graph::AddCompatibilityLayers</a></div><div class="ttdeci">void AddCompatibilityLayers(std::map< BackendId, std::unique_ptr< class IBackendInternal >> &backends, TensorHandleFactoryRegistry &registry)</div><div class="ttdoc">Modifies the graph in-place, removing edges connecting layers using different compute devices...</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.xhtml#l00263">Graph.cpp:263</a></div></div> |
| 156 | <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#l00209">Layer.hpp:209</a></div></div> |
| 157 | <div class="ttc" id="namespacearmnn_xhtml_a9173495a61a0092b5f38b855f02c3585"><div class="ttname"><a href="namespacearmnn.xhtml#a9173495a61a0092b5f38b855f02c3585">armnn::BackendsMap</a></div><div class="ttdeci">std::map< BackendId, std::unique_ptr< class IBackendInternal > > BackendsMap</div><div class="ttdef"><b>Definition:</b> <a href="_network_8hpp_source.xhtml#l00305">Network.hpp:305</a></div></div> |
| 158 | <div class="ttc" id="classarmnn_1_1_backend_id_xhtml"><div class="ttname"><a href="classarmnn_1_1_backend_id.xhtml">armnn::BackendId</a></div><div class="ttdef"><b>Definition:</b> <a href="_backend_id_8hpp_source.xhtml#l00075">BackendId.hpp:75</a></div></div> |
| 159 | </div><!-- fragment --> |
| 160 | </div> |
| 161 | </div> |
| 162 | </div><!-- contents --> |
| 163 | </div><!-- doc-content --> |
| 164 | <!-- start footer part --> |
| 165 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 166 | <ul> |
| 167 | <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="dir_28bfe507f7e135bdae07c2a6b7f66696.xhtml">test</a></li><li class="navelem"><a class="el" href="_compatibility_tests_8cpp.xhtml">CompatibilityTests.cpp</a></li> |
| 168 | <li class="footer">Generated on Fri Mar 13 2020 16:09:14 for ArmNN by |
| 169 | <a href="http://www.doxygen.org/index.html"> |
| 170 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 171 | </ul> |
| 172 | </div> |
| 173 | </body> |
| 174 | </html> |