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: src/backends/backendsCommon/test/layerTests/ElementwiseUnaryTestImpl.hpp File 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('_elementwise_unary_test_impl_8hpp.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="#func-members">Functions</a> </div> |
| 85 | <div class="headertitle"> |
| 86 | <div class="title">ElementwiseUnaryTestImpl.hpp File Reference</div> </div> |
| 87 | </div><!--header--> |
| 88 | <div class="contents"> |
| 89 | <div class="textblock"><code>#include "<a class="el" href="_layer_test_result_8hpp_source.html">LayerTestResult.hpp</a>"</code><br /> |
| 90 | <code>#include <<a class="el" href="_arm_n_n_8hpp_source.html">armnn/ArmNN.hpp</a>></code><br /> |
| 91 | <code>#include <<a class="el" href="_resolve_type_8hpp_source.html">ResolveType.hpp</a>></code><br /> |
| 92 | <code>#include <<a class="el" href="include_2armnn_2backends_2_i_backend_internal_8hpp_source.html">armnn/backends/IBackendInternal.hpp</a>></code><br /> |
| 93 | <code>#include <<a class="el" href="_workload_8hpp_source.html">backendsCommon/Workload.hpp</a>></code><br /> |
| 94 | <code>#include <<a class="el" href="_workload_data_8hpp_source.html">backendsCommon/WorkloadData.hpp</a>></code><br /> |
| 95 | <code>#include <<a class="el" href="_workload_factory_8hpp_source.html">backendsCommon/WorkloadFactory.hpp</a>></code><br /> |
| 96 | <code>#include <<a class="el" href="_data_type_utils_8hpp_source.html">backendsCommon/test/DataTypeUtils.hpp</a>></code><br /> |
| 97 | <code>#include <<a class="el" href="_tensor_copy_utils_8hpp_source.html">backendsCommon/test/TensorCopyUtils.hpp</a>></code><br /> |
| 98 | <code>#include <<a class="el" href="_workload_test_utils_8hpp_source.html">backendsCommon/test/WorkloadTestUtils.hpp</a>></code><br /> |
| 99 | <code>#include <<a class="el" href="_tensor_helpers_8hpp_source.html">test/TensorHelpers.hpp</a>></code><br /> |
| 100 | <code>#include <memory></code><br /> |
| 101 | </div> |
| 102 | <p><a href="_elementwise_unary_test_impl_8hpp_source.html">Go to the source code of this file.</a></p> |
| 103 | <table class="memberdecls"> |
| 104 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 105 | Functions</h2></td></tr> |
| 106 | <tr class="memitem:aa50938ed8f91e09acd4af904dcf5543a"><td class="memItemLeft" align="right" valign="top">std::unique_ptr< <a class="el" href="classarmnn_1_1_i_workload.html">armnn::IWorkload</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="_elementwise_unary_test_impl_8hpp.html#aa50938ed8f91e09acd4af904dcf5543a">CreateWorkload</a> (const <a class="el" href="classarmnn_1_1_i_workload_factory.html">armnn::IWorkloadFactory</a> &workloadFactory, const <a class="el" href="structarmnn_1_1_workload_info.html">armnn::WorkloadInfo</a> &info, const <a class="el" href="structarmnn_1_1_elementwise_unary_queue_descriptor.html">armnn::ElementwiseUnaryQueueDescriptor</a> &descriptor)</td></tr> |
| 107 | <tr class="separator:aa50938ed8f91e09acd4af904dcf5543a"><td class="memSeparator" colspan="2"> </td></tr> |
| 108 | <tr class="memitem:ae8395748ad75142a364a99296a7a9fa0"><td class="memTemplParams" colspan="2">template<std::size_t NumDims, armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> </td></tr> |
| 109 | <tr class="memitem:ae8395748ad75142a364a99296a7a9fa0"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="struct_layer_test_result.html">LayerTestResult</a>< T, NumDims > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_elementwise_unary_test_impl_8hpp.html#ae8395748ad75142a364a99296a7a9fa0">ElementwiseUnaryTestHelper</a> (<a class="el" href="classarmnn_1_1_i_workload_factory.html">armnn::IWorkloadFactory</a> &workloadFactory, const <a class="el" href="classarmnn_1_1_i_backend_internal.html#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> &memoryManager, <a class="el" href="namespacearmnn.html#a1cfaa710db2a54673b21d2ea2da757c8">armnn::UnaryOperation</a> op, const unsigned int shape[NumDims], std::vector< float > values, float quantScale, int quantOffset, const unsigned int outShape[NumDims], std::vector< float > outValues, float outQuantScale, int outQuantOffset)</td></tr> |
| 110 | <tr class="separator:ae8395748ad75142a364a99296a7a9fa0"><td class="memSeparator" colspan="2"> </td></tr> |
| 111 | <tr class="memitem:ae2c54699203437d012a0ee00ca1e29a8"><td class="memTemplParams" colspan="2">template<std::size_t NumDims, armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> </td></tr> |
| 112 | <tr class="memitem:ae2c54699203437d012a0ee00ca1e29a8"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="struct_layer_test_result.html">LayerTestResult</a>< T, NumDims > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_elementwise_unary_test_impl_8hpp.html#ae2c54699203437d012a0ee00ca1e29a8">ElementwiseUnaryTestHelper</a> (<a class="el" href="classarmnn_1_1_i_workload_factory.html">armnn::IWorkloadFactory</a> &workloadFactory, const <a class="el" href="classarmnn_1_1_i_backend_internal.html#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> &memoryManager, <a class="el" href="namespacearmnn.html#a1cfaa710db2a54673b21d2ea2da757c8">armnn::UnaryOperation</a> op, const unsigned int shape[NumDims], std::vector< float > values, const unsigned int outShape[NumDims], std::vector< float > outValues, float quantScale=1.0f, int quantOffset=0)</td></tr> |
| 113 | <tr class="separator:ae2c54699203437d012a0ee00ca1e29a8"><td class="memSeparator" colspan="2"> </td></tr> |
| 114 | </table> |
| 115 | <h2 class="groupheader">Function Documentation</h2> |
| 116 | <a id="aa50938ed8f91e09acd4af904dcf5543a"></a> |
| 117 | <h2 class="memtitle"><span class="permalink"><a href="#aa50938ed8f91e09acd4af904dcf5543a">◆ </a></span>CreateWorkload()</h2> |
| 118 | |
| 119 | <div class="memitem"> |
| 120 | <div class="memproto"> |
| 121 | <table class="memname"> |
| 122 | <tr> |
| 123 | <td class="memname">std::unique_ptr<<a class="el" href="classarmnn_1_1_i_workload.html">armnn::IWorkload</a>> CreateWorkload </td> |
| 124 | <td>(</td> |
| 125 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_i_workload_factory.html">armnn::IWorkloadFactory</a> & </td> |
| 126 | <td class="paramname"><em>workloadFactory</em>, </td> |
| 127 | </tr> |
| 128 | <tr> |
| 129 | <td class="paramkey"></td> |
| 130 | <td></td> |
| 131 | <td class="paramtype">const <a class="el" href="structarmnn_1_1_workload_info.html">armnn::WorkloadInfo</a> & </td> |
| 132 | <td class="paramname"><em>info</em>, </td> |
| 133 | </tr> |
| 134 | <tr> |
| 135 | <td class="paramkey"></td> |
| 136 | <td></td> |
| 137 | <td class="paramtype">const <a class="el" href="structarmnn_1_1_elementwise_unary_queue_descriptor.html">armnn::ElementwiseUnaryQueueDescriptor</a> & </td> |
| 138 | <td class="paramname"><em>descriptor</em> </td> |
| 139 | </tr> |
| 140 | <tr> |
| 141 | <td></td> |
| 142 | <td>)</td> |
| 143 | <td></td><td></td> |
| 144 | </tr> |
| 145 | </table> |
| 146 | </div><div class="memdoc"> |
| 147 | |
| 148 | <p class="definition">Definition at line <a class="el" href="_elementwise_unary_test_impl_8cpp_source.html#l00008">8</a> of file <a class="el" href="_elementwise_unary_test_impl_8cpp_source.html">ElementwiseUnaryTestImpl.cpp</a>.</p> |
| 149 | |
| 150 | <p class="reference">References <a class="el" href="_workload_factory_8cpp_source.html#l01184">IWorkloadFactory::CreateElementwiseUnary()</a>.</p> |
| 151 | |
| 152 | <p class="reference">Referenced by <a class="el" href="_elementwise_unary_test_impl_8hpp_source.html#l00035">ElementwiseUnaryTestHelper()</a>.</p> |
| 153 | <div class="fragment"><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> {</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  <span class="keywordflow">return</span> workloadFactory.<a class="code" href="classarmnn_1_1_i_workload_factory.html#a12d2c4e0f0b0d6b36d8a3e14bf69f9e4">CreateElementwiseUnary</a>(descriptor, info);</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> }</div><div class="ttc" id="classarmnn_1_1_i_workload_factory_html_a12d2c4e0f0b0d6b36d8a3e14bf69f9e4"><div class="ttname"><a href="classarmnn_1_1_i_workload_factory.html#a12d2c4e0f0b0d6b36d8a3e14bf69f9e4">armnn::IWorkloadFactory::CreateElementwiseUnary</a></div><div class="ttdeci">virtual std::unique_ptr< IWorkload > CreateElementwiseUnary(const ElementwiseUnaryQueueDescriptor &descriptor, const WorkloadInfo &Info) const</div><div class="ttdef"><b>Definition:</b> <a href="_workload_factory_8cpp_source.html#l01184">WorkloadFactory.cpp:1184</a></div></div> |
| 154 | </div><!-- fragment --> |
| 155 | </div> |
| 156 | </div> |
| 157 | <a id="ae8395748ad75142a364a99296a7a9fa0"></a> |
| 158 | <h2 class="memtitle"><span class="permalink"><a href="#ae8395748ad75142a364a99296a7a9fa0">◆ </a></span>ElementwiseUnaryTestHelper() <span class="overload">[1/2]</span></h2> |
| 159 | |
| 160 | <div class="memitem"> |
| 161 | <div class="memproto"> |
| 162 | <table class="memname"> |
| 163 | <tr> |
| 164 | <td class="memname"><a class="el" href="struct_layer_test_result.html">LayerTestResult</a><T, NumDims> ElementwiseUnaryTestHelper </td> |
| 165 | <td>(</td> |
| 166 | <td class="paramtype"><a class="el" href="classarmnn_1_1_i_workload_factory.html">armnn::IWorkloadFactory</a> & </td> |
| 167 | <td class="paramname"><em>workloadFactory</em>, </td> |
| 168 | </tr> |
| 169 | <tr> |
| 170 | <td class="paramkey"></td> |
| 171 | <td></td> |
| 172 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_i_backend_internal.html#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> & </td> |
| 173 | <td class="paramname"><em>memoryManager</em>, </td> |
| 174 | </tr> |
| 175 | <tr> |
| 176 | <td class="paramkey"></td> |
| 177 | <td></td> |
| 178 | <td class="paramtype"><a class="el" href="namespacearmnn.html#a1cfaa710db2a54673b21d2ea2da757c8">armnn::UnaryOperation</a> </td> |
| 179 | <td class="paramname"><em>op</em>, </td> |
| 180 | </tr> |
| 181 | <tr> |
| 182 | <td class="paramkey"></td> |
| 183 | <td></td> |
| 184 | <td class="paramtype">const unsigned int </td> |
| 185 | <td class="paramname"><em>shape</em>[NumDims], </td> |
| 186 | </tr> |
| 187 | <tr> |
| 188 | <td class="paramkey"></td> |
| 189 | <td></td> |
| 190 | <td class="paramtype">std::vector< float > </td> |
| 191 | <td class="paramname"><em>values</em>, </td> |
| 192 | </tr> |
| 193 | <tr> |
| 194 | <td class="paramkey"></td> |
| 195 | <td></td> |
| 196 | <td class="paramtype">float </td> |
| 197 | <td class="paramname"><em>quantScale</em>, </td> |
| 198 | </tr> |
| 199 | <tr> |
| 200 | <td class="paramkey"></td> |
| 201 | <td></td> |
| 202 | <td class="paramtype">int </td> |
| 203 | <td class="paramname"><em>quantOffset</em>, </td> |
| 204 | </tr> |
| 205 | <tr> |
| 206 | <td class="paramkey"></td> |
| 207 | <td></td> |
| 208 | <td class="paramtype">const unsigned int </td> |
| 209 | <td class="paramname"><em>outShape</em>[NumDims], </td> |
| 210 | </tr> |
| 211 | <tr> |
| 212 | <td class="paramkey"></td> |
| 213 | <td></td> |
| 214 | <td class="paramtype">std::vector< float > </td> |
| 215 | <td class="paramname"><em>outValues</em>, </td> |
| 216 | </tr> |
| 217 | <tr> |
| 218 | <td class="paramkey"></td> |
| 219 | <td></td> |
| 220 | <td class="paramtype">float </td> |
| 221 | <td class="paramname"><em>outQuantScale</em>, </td> |
| 222 | </tr> |
| 223 | <tr> |
| 224 | <td class="paramkey"></td> |
| 225 | <td></td> |
| 226 | <td class="paramtype">int </td> |
| 227 | <td class="paramname"><em>outQuantOffset</em> </td> |
| 228 | </tr> |
| 229 | <tr> |
| 230 | <td></td> |
| 231 | <td>)</td> |
| 232 | <td></td><td></td> |
| 233 | </tr> |
| 234 | </table> |
| 235 | </div><div class="memdoc"> |
| 236 | |
| 237 | <p class="definition">Definition at line <a class="el" href="_elementwise_unary_test_impl_8hpp_source.html#l00035">35</a> of file <a class="el" href="_elementwise_unary_test_impl_8hpp_source.html">ElementwiseUnaryTestImpl.hpp</a>.</p> |
| 238 | |
| 239 | <p class="reference">References <a class="el" href="_tensor_copy_utils_8cpp_source.html#l00014">CopyDataFromITensorHandle()</a>, <a class="el" href="_tensor_copy_utils_8cpp_source.html#l00009">CopyDataToITensorHandle()</a>, <a class="el" href="classarmnn_1_1_i_workload_factory.html#a15c140be4ddceffee16436f009d3ed94">IWorkloadFactory::CreateTensorHandle()</a>, <a class="el" href="_elementwise_unary_test_impl_8cpp_source.html#l00008">CreateWorkload()</a>, <a class="el" href="_workload_data_8hpp_source.html#l00049">QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters</a>, <a class="el" href="_layer_test_result_8hpp_source.html#l00040">LayerTestResult< T, n >::output</a>, <a class="el" href="_layer_test_result_8hpp_source.html#l00041">LayerTestResult< T, n >::outputExpected</a>, and <a class="el" href="_tensor_8cpp_source.html#l00259">TensorInfo::SetQuantizationScale()</a>.</p> |
| 240 | <div class="fragment"><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>  <a class="code" href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a> inputTensorInfo{NumDims, shape, ArmnnType};</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <a class="code" href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a> outputTensorInfo{NumDims, outShape, ArmnnType};</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>  inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a685739c4eb65a580e075282cfe6787d6">SetQuantizationScale</a>(quantScale);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  inputTensorInfo.SetQuantizationOffset(quantOffset);</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>  outputTensorInfo.SetQuantizationScale(outQuantScale);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  outputTensorInfo.SetQuantizationOffset(outQuantOffset);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keyword">auto</span> input = MakeTensor<T, NumDims>(inputTensorInfo, ConvertToDataType<ArmnnType>(values, inputTensorInfo));</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>  <a class="code" href="struct_layer_test_result.html">LayerTestResult<T, NumDims></a> ret(outputTensorInfo);</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>  std::unique_ptr<armnn::ITensorHandle> inputHandle = workloadFactory.<a class="code" href="classarmnn_1_1_i_workload_factory.html#a15c140be4ddceffee16436f009d3ed94">CreateTensorHandle</a>(inputTensorInfo);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  std::unique_ptr<armnn::ITensorHandle> outputHandle = workloadFactory.<a class="code" href="classarmnn_1_1_i_workload_factory.html#a15c140be4ddceffee16436f009d3ed94">CreateTensorHandle</a>(outputTensorInfo);</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>  <a class="code" href="structarmnn_1_1_elementwise_unary_descriptor.html">armnn::ElementwiseUnaryDescriptor</a> desc(op);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <a class="code" href="structarmnn_1_1_elementwise_unary_queue_descriptor.html">armnn::ElementwiseUnaryQueueDescriptor</a> qDesc;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  qDesc.<a class="code" href="structarmnn_1_1_queue_descriptor_with_parameters.html#aad91b9bbf7aa365d304febe79a3d1333">m_Parameters</a> = desc;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <a class="code" href="structarmnn_1_1_workload_info.html">armnn::WorkloadInfo</a> <a class="code" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a>;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  AddInputToWorkload(qDesc, info, inputTensorInfo, inputHandle.get());</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  AddOutputToWorkload(qDesc, info, outputTensorInfo, outputHandle.get());</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keyword">auto</span> workload = <a class="code" href="_elementwise_unary_test_impl_8hpp.html#aa50938ed8f91e09acd4af904dcf5543a">CreateWorkload</a>(workloadFactory, info, qDesc);</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>  inputHandle->Allocate();</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  outputHandle->Allocate();</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span> </div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <a class="code" href="_tensor_copy_utils_8cpp.html#ae15f1a3c55d2db87683577de9fa4437c">CopyDataToITensorHandle</a>(inputHandle.get(), input.origin());</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span> </div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  workload->PostAllocationConfigure();</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  ExecuteWorkload(*workload, memoryManager);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <a class="code" href="_tensor_copy_utils_8cpp.html#a99b626c58a926dc7d6df78d22ec186c8">CopyDataFromITensorHandle</a>(ret.output.origin(), outputHandle.get());</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  ret.outputExpected = MakeTensor<T, NumDims>(outputTensorInfo, ConvertToDataType<ArmnnType>(outValues,</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  inputTensorInfo));</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> }</div><div class="ttc" id="structarmnn_1_1_elementwise_unary_queue_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_elementwise_unary_queue_descriptor.html">armnn::ElementwiseUnaryQueueDescriptor</a></div><div class="ttdef"><b>Definition:</b> <a href="_workload_data_8hpp_source.html#l00564">WorkloadData.hpp:564</a></div></div> |
| 241 | <div class="ttc" id="_tensor_copy_utils_8cpp_html_ae15f1a3c55d2db87683577de9fa4437c"><div class="ttname"><a href="_tensor_copy_utils_8cpp.html#ae15f1a3c55d2db87683577de9fa4437c">CopyDataToITensorHandle</a></div><div class="ttdeci">void CopyDataToITensorHandle(armnn::ITensorHandle *tensorHandle, const void *memory)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_copy_utils_8cpp_source.html#l00009">TensorCopyUtils.cpp:9</a></div></div> |
| 242 | <div class="ttc" id="namespacearmnn_html_a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c"><div class="ttname"><a href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">armnn::BoostLogSeverityMapping::info</a></div></div> |
| 243 | <div class="ttc" id="structarmnn_1_1_queue_descriptor_with_parameters_html_aad91b9bbf7aa365d304febe79a3d1333"><div class="ttname"><a href="structarmnn_1_1_queue_descriptor_with_parameters.html#aad91b9bbf7aa365d304febe79a3d1333">armnn::QueueDescriptorWithParameters::m_Parameters</a></div><div class="ttdeci">LayerDescriptor m_Parameters</div><div class="ttdef"><b>Definition:</b> <a href="_workload_data_8hpp_source.html#l00049">WorkloadData.hpp:49</a></div></div> |
| 244 | <div class="ttc" id="classarmnn_1_1_tensor_info_html"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00053">Tensor.hpp:53</a></div></div> |
| 245 | <div class="ttc" id="classarmnn_1_1_i_workload_factory_html_a15c140be4ddceffee16436f009d3ed94"><div class="ttname"><a href="classarmnn_1_1_i_workload_factory.html#a15c140be4ddceffee16436f009d3ed94">armnn::IWorkloadFactory::CreateTensorHandle</a></div><div class="ttdeci">virtual std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo, const bool IsMemoryManaged=true) const =0</div></div> |
| 246 | <div class="ttc" id="struct_layer_test_result_html"><div class="ttname"><a href="struct_layer_test_result.html">LayerTestResult</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_test_result_8hpp_source.html#l00029">LayerTestResult.hpp:29</a></div></div> |
| 247 | <div class="ttc" id="_tensor_copy_utils_8cpp_html_a99b626c58a926dc7d6df78d22ec186c8"><div class="ttname"><a href="_tensor_copy_utils_8cpp.html#a99b626c58a926dc7d6df78d22ec186c8">CopyDataFromITensorHandle</a></div><div class="ttdeci">void CopyDataFromITensorHandle(void *memory, const armnn::ITensorHandle *tensorHandle)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_copy_utils_8cpp_source.html#l00014">TensorCopyUtils.cpp:14</a></div></div> |
| 248 | <div class="ttc" id="structarmnn_1_1_workload_info_html"><div class="ttname"><a href="structarmnn_1_1_workload_info.html">armnn::WorkloadInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="include_2armnn_2backends_2_workload_info_8hpp_source.html#l00016">WorkloadInfo.hpp:16</a></div></div> |
| 249 | <div class="ttc" id="structarmnn_1_1_elementwise_unary_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_elementwise_unary_descriptor.html">armnn::ElementwiseUnaryDescriptor</a></div><div class="ttdoc">A ElementwiseUnaryDescriptor for the ElementwiseUnaryLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00082">Descriptors.hpp:82</a></div></div> |
| 250 | <div class="ttc" id="classarmnn_1_1_tensor_info_html_a685739c4eb65a580e075282cfe6787d6"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#a685739c4eb65a580e075282cfe6787d6">armnn::TensorInfo::SetQuantizationScale</a></div><div class="ttdeci">void SetQuantizationScale(float scale)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8cpp_source.html#l00259">Tensor.cpp:259</a></div></div> |
| 251 | <div class="ttc" id="_elementwise_unary_test_impl_8hpp_html_aa50938ed8f91e09acd4af904dcf5543a"><div class="ttname"><a href="_elementwise_unary_test_impl_8hpp.html#aa50938ed8f91e09acd4af904dcf5543a">CreateWorkload</a></div><div class="ttdeci">std::unique_ptr< armnn::IWorkload > CreateWorkload(const armnn::IWorkloadFactory &workloadFactory, const armnn::WorkloadInfo &info, const armnn::ElementwiseUnaryQueueDescriptor &descriptor)</div><div class="ttdef"><b>Definition:</b> <a href="_elementwise_unary_test_impl_8cpp_source.html#l00008">ElementwiseUnaryTestImpl.cpp:8</a></div></div> |
| 252 | </div><!-- fragment --> |
| 253 | </div> |
| 254 | </div> |
| 255 | <a id="ae2c54699203437d012a0ee00ca1e29a8"></a> |
| 256 | <h2 class="memtitle"><span class="permalink"><a href="#ae2c54699203437d012a0ee00ca1e29a8">◆ </a></span>ElementwiseUnaryTestHelper() <span class="overload">[2/2]</span></h2> |
| 257 | |
| 258 | <div class="memitem"> |
| 259 | <div class="memproto"> |
| 260 | <table class="memname"> |
| 261 | <tr> |
| 262 | <td class="memname"><a class="el" href="struct_layer_test_result.html">LayerTestResult</a><T, NumDims> ElementwiseUnaryTestHelper </td> |
| 263 | <td>(</td> |
| 264 | <td class="paramtype"><a class="el" href="classarmnn_1_1_i_workload_factory.html">armnn::IWorkloadFactory</a> & </td> |
| 265 | <td class="paramname"><em>workloadFactory</em>, </td> |
| 266 | </tr> |
| 267 | <tr> |
| 268 | <td class="paramkey"></td> |
| 269 | <td></td> |
| 270 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_i_backend_internal.html#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> & </td> |
| 271 | <td class="paramname"><em>memoryManager</em>, </td> |
| 272 | </tr> |
| 273 | <tr> |
| 274 | <td class="paramkey"></td> |
| 275 | <td></td> |
| 276 | <td class="paramtype"><a class="el" href="namespacearmnn.html#a1cfaa710db2a54673b21d2ea2da757c8">armnn::UnaryOperation</a> </td> |
| 277 | <td class="paramname"><em>op</em>, </td> |
| 278 | </tr> |
| 279 | <tr> |
| 280 | <td class="paramkey"></td> |
| 281 | <td></td> |
| 282 | <td class="paramtype">const unsigned int </td> |
| 283 | <td class="paramname"><em>shape</em>[NumDims], </td> |
| 284 | </tr> |
| 285 | <tr> |
| 286 | <td class="paramkey"></td> |
| 287 | <td></td> |
| 288 | <td class="paramtype">std::vector< float > </td> |
| 289 | <td class="paramname"><em>values</em>, </td> |
| 290 | </tr> |
| 291 | <tr> |
| 292 | <td class="paramkey"></td> |
| 293 | <td></td> |
| 294 | <td class="paramtype">const unsigned int </td> |
| 295 | <td class="paramname"><em>outShape</em>[NumDims], </td> |
| 296 | </tr> |
| 297 | <tr> |
| 298 | <td class="paramkey"></td> |
| 299 | <td></td> |
| 300 | <td class="paramtype">std::vector< float > </td> |
| 301 | <td class="paramname"><em>outValues</em>, </td> |
| 302 | </tr> |
| 303 | <tr> |
| 304 | <td class="paramkey"></td> |
| 305 | <td></td> |
| 306 | <td class="paramtype">float </td> |
| 307 | <td class="paramname"><em>quantScale</em> = <code>1.0f</code>, </td> |
| 308 | </tr> |
| 309 | <tr> |
| 310 | <td class="paramkey"></td> |
| 311 | <td></td> |
| 312 | <td class="paramtype">int </td> |
| 313 | <td class="paramname"><em>quantOffset</em> = <code>0</code> </td> |
| 314 | </tr> |
| 315 | <tr> |
| 316 | <td></td> |
| 317 | <td>)</td> |
| 318 | <td></td><td></td> |
| 319 | </tr> |
| 320 | </table> |
| 321 | </div><div class="memdoc"> |
| 322 | |
| 323 | <p class="definition">Definition at line <a class="el" href="_elementwise_unary_test_impl_8hpp_source.html#l00090">90</a> of file <a class="el" href="_elementwise_unary_test_impl_8hpp_source.html">ElementwiseUnaryTestImpl.hpp</a>.</p> |
| 324 | <div class="fragment"><div class="line"><a name="l00100"></a><span class="lineno"> 100</span> {</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordflow">return</span> ElementwiseUnaryTestHelper<NumDims, ArmnnType>(</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  workloadFactory,</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  memoryManager,</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  op,</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  shape,</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  values,</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  quantScale,</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  quantOffset,</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  outShape,</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  outValues,</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  quantScale,</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  quantOffset);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> }</div></div><!-- fragment --> |
| 325 | </div> |
| 326 | </div> |
| 327 | </div><!-- contents --> |
| 328 | </div><!-- doc-content --> |
| 329 | <!-- start footer part --> |
| 330 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 331 | <ul> |
| 332 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_0f3cdec46afbc61a1ded8e1687c9c9a0.html">backends</a></li><li class="navelem"><a class="el" href="dir_797a213d7d01b98ef12d53b0820ea64e.html">backendsCommon</a></li><li class="navelem"><a class="el" href="dir_28bfe507f7e135bdae07c2a6b7f66696.html">test</a></li><li class="navelem"><a class="el" href="dir_99a30439342d160875b21dac3498ad7f.html">layerTests</a></li><li class="navelem"><a class="el" href="_elementwise_unary_test_impl_8hpp.html">ElementwiseUnaryTestImpl.hpp</a></li> |
| 333 | <li class="footer">Generated on Fri Mar 13 2020 16:07:00 for ArmNN by |
| 334 | <a href="http://www.doxygen.org/index.html"> |
| 335 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 336 | </ul> |
| 337 | </div> |
| 338 | </body> |
| 339 | </html> |