<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Compute Library
-  <span id="projectnumber">18.01</span>
+  <span id="projectnumber">18.02</span>
</div>
</td>
</tr>
<div class="title">GEMMFixture.h</div> </div>
</div><!--header-->
<div class="contents">
-<a href="benchmark_2fixtures_2_g_e_m_m_fixture_8h.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2017-2018 ARM Limited.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * of this software and associated documentation files (the "Software"), to</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * deal in the Software without restriction, including without limitation the</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#ifndef ARM_COMPUTE_TEST_GEMMFIXTURE</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#define ARM_COMPUTE_TEST_GEMMFIXTURE</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include "<a class="code" href="_tensor_shape_8h.xhtml">arm_compute/core/TensorShape.h</a>"</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include "<a class="code" href="arm__compute_2core_2_types_8h.xhtml">arm_compute/core/Types.h</a>"</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="_globals_8h.xhtml">tests/Globals.h</a>"</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="tests_2_utils_8h.xhtml">tests/Utils.h</a>"</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="_fixture_8h.xhtml">tests/framework/Fixture.h</a>"</span></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="keyword">namespace </span><a class="code" href="namespacearm__compute.xhtml">arm_compute</a></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">namespace </span>test</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> {</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">template</span> <<span class="keyword">typename</span> TensorType, <span class="keyword">typename</span> Function, <span class="keyword">typename</span> Accessor></div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml"> 39</a></span> <span class="keyword">class </span><a class="code" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml">GEMMFixture</a> : <span class="keyword">public</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_fixture.xhtml">framework::Fixture</a></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> {</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keyword">template</span> <<span class="keyword">typename</span>...></div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a976ed582c1740d7b92ef7d8bdf6a0769"> 43</a></span>  <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a976ed582c1740d7b92ef7d8bdf6a0769">setup</a>(<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2c387216b8389a6069b2e5205bc03a9">shape_a</a>, <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ab39a7489f0c4ef5db0dfa9291073fe61">shape_b</a>, <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a141b596a566813a7fc3116f9881d3dc9">shape_c</a>, <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> shape_dst, <span class="keywordtype">float</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a62197192f0fbf4e0675eb37be1c4c175">alpha</a>, <span class="keywordtype">float</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ab146b9cbab6e73e7588b240dc709fe01">beta</a>, <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>)</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>  constexpr <span class="keywordtype">int</span> fixed_point_position = 4;</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>  <span class="comment">// Create tensors</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  a = create_tensor<TensorType>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2c387216b8389a6069b2e5205bc03a9">shape_a</a>, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>, 1, fixed_point_position);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  b = create_tensor<TensorType>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ab39a7489f0c4ef5db0dfa9291073fe61">shape_b</a>, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>, 1, fixed_point_position);</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  c = create_tensor<TensorType>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a141b596a566813a7fc3116f9881d3dc9">shape_c</a>, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>, 1, fixed_point_position);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  dst = create_tensor<TensorType>(shape_dst, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>, 1, fixed_point_position);</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>  <span class="comment">// Create and configure function</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  gemm.configure(&a, &b, &c, &dst, alpha, beta);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="comment">// Allocate tensors</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  a.allocator()->allocate();</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  b.allocator()->allocate();</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  c.allocator()->allocate();</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  dst.allocator()->allocate();</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</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"><a class="line" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a13a43e6d814de94978c515cb084873b1"> 63</a></span>  <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a13a43e6d814de94978c515cb084873b1">run</a>()</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  {</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  gemm.run();</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  }</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#ad55f80ed3cd8b6c4f247763b747016af"> 68</a></span>  <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#ad55f80ed3cd8b6c4f247763b747016af">sync</a>()</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  {</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  sync_if_necessary<TensorType>();</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  sync_tensor_if_necessary<TensorType>(dst);</div><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> </div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a4adab6322a0276f34a7d656d49fc865c"> 74</a></span>  <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a4adab6322a0276f34a7d656d49fc865c">teardown</a>()</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  {</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  a.allocator()->free();</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  b.allocator()->free();</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  c.allocator()->free();</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  dst.allocator()->free();</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> </div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  TensorType a{};</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  TensorType b{};</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  TensorType c{};</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  TensorType dst{};</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  Function gemm{};</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> } <span class="comment">// namespace test</span></div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> } <span class="comment">// namespace arm_compute</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="preprocessor">#endif </span><span class="comment">/* ARM_COMPUTE_TEST_GEMMFIXTURE */</span><span class="preprocessor"></span></div><div class="ttc" id="classarm__compute_1_1test_1_1_g_e_m_m_fixture_xhtml_a976ed582c1740d7b92ef7d8bdf6a0769"><div class="ttname"><a href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a976ed582c1740d7b92ef7d8bdf6a0769">arm_compute::test::GEMMFixture::setup</a></div><div class="ttdeci">void setup(TensorShape shape_a, TensorShape shape_b, TensorShape shape_c, TensorShape shape_dst, float alpha, float beta, DataType data_type)</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2fixtures_2_g_e_m_m_fixture_8h_source.xhtml#l00043">GEMMFixture.h:43</a></div></div>
-<div class="ttc" id="classarm__compute_1_1test_1_1_g_e_m_m_fixture_xhtml_a4adab6322a0276f34a7d656d49fc865c"><div class="ttname"><a href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a4adab6322a0276f34a7d656d49fc865c">arm_compute::test::GEMMFixture::teardown</a></div><div class="ttdeci">void teardown()</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2fixtures_2_g_e_m_m_fixture_8h_source.xhtml#l00074">GEMMFixture.h:74</a></div></div>
-<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ab146b9cbab6e73e7588b240dc709fe01"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ab146b9cbab6e73e7588b240dc709fe01">arm_compute::test::validation::beta</a></div><div class="ttdeci">beta</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00112">GEMM.cpp:112</a></div></div>
-<div class="ttc" id="classarm__compute_1_1_tensor_shape_xhtml"><div class="ttname"><a href="classarm__compute_1_1_tensor_shape.xhtml">arm_compute::TensorShape</a></div><div class="ttdoc">Shape of a tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_shape_8h_source.xhtml#l00038">TensorShape.h:38</a></div></div>
-<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ab39a7489f0c4ef5db0dfa9291073fe61"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ab39a7489f0c4ef5db0dfa9291073fe61">arm_compute::test::validation::shape_b</a></div><div class="ttdeci">shape_b</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00112">GEMM.cpp:112</a></div></div>
-<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a141b596a566813a7fc3116f9881d3dc9"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a141b596a566813a7fc3116f9881d3dc9">arm_compute::test::validation::shape_c</a></div><div class="ttdeci">shape_c</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00112">GEMM.cpp:112</a></div></div>
+<a href="benchmark_2fixtures_2_g_e_m_m_fixture_8h.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2017-2018 ARM Limited.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * of this software and associated documentation files (the "Software"), to</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * deal in the Software without restriction, including without limitation the</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#ifndef ARM_COMPUTE_TEST_GEMMFIXTURE</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#define ARM_COMPUTE_TEST_GEMMFIXTURE</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include "<a class="code" href="_tensor_shape_8h.xhtml">arm_compute/core/TensorShape.h</a>"</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include "<a class="code" href="arm__compute_2core_2_types_8h.xhtml">arm_compute/core/Types.h</a>"</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="_globals_8h.xhtml">tests/Globals.h</a>"</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="tests_2_utils_8h.xhtml">tests/Utils.h</a>"</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="_fixture_8h.xhtml">tests/framework/Fixture.h</a>"</span></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="keyword">namespace </span><a class="code" href="namespacearm__compute.xhtml">arm_compute</a></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">namespace </span>test</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> {</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="keyword">template</span> <<span class="keyword">typename</span> TensorType, <span class="keyword">typename</span> Function, <span class="keyword">typename</span> Accessor></div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml"> 39</a></span> <span class="keyword">class </span><a class="code" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml">GEMMFixture</a> : <span class="keyword">public</span> <a class="code" href="classarm__compute_1_1test_1_1framework_1_1_fixture.xhtml">framework::Fixture</a></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> {</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keyword">template</span> <<span class="keyword">typename</span>...></div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a72148b57b6159ddbdae5ccb350dd632b"> 43</a></span>  <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a72148b57b6159ddbdae5ccb350dd632b">setup</a>(<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2c387216b8389a6069b2e5205bc03a9">shape_a</a>, <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ab39a7489f0c4ef5db0dfa9291073fe61">shape_b</a>, <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a141b596a566813a7fc3116f9881d3dc9">shape_c</a>, <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> shape_dst, <span class="keywordtype">float</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a62197192f0fbf4e0675eb37be1c4c175">alpha</a>, <span class="keywordtype">float</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ab146b9cbab6e73e7588b240dc709fe01">beta</a>, <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>, <span class="keywordtype">bool</span> reshape_b_only_on_first_run)</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>  constexpr <span class="keywordtype">int</span> fixed_point_position = 4;</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>  <span class="comment">// Create tensors</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  a = create_tensor<TensorType>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2c387216b8389a6069b2e5205bc03a9">shape_a</a>, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>, 1, fixed_point_position);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  b = create_tensor<TensorType>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ab39a7489f0c4ef5db0dfa9291073fe61">shape_b</a>, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>, 1, fixed_point_position);</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  c = create_tensor<TensorType>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a141b596a566813a7fc3116f9881d3dc9">shape_c</a>, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>, 1, fixed_point_position);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  dst = create_tensor<TensorType>(shape_dst, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>, 1, fixed_point_position);</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>  <span class="comment">// Create and configure function</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  gemm.configure(&a, &b, &c, &dst, alpha, beta, <a class="code" href="classarm__compute_1_1_g_e_m_m_info.xhtml">GEMMInfo</a>(<span class="keyword">false</span>, <span class="keyword">false</span>, reshape_b_only_on_first_run));</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="comment">// Allocate tensors</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  a.allocator()->allocate();</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  b.allocator()->allocate();</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  c.allocator()->allocate();</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  dst.allocator()->allocate();</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</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"><a class="line" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a13a43e6d814de94978c515cb084873b1"> 63</a></span>  <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a13a43e6d814de94978c515cb084873b1">run</a>()</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  {</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  gemm.run();</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  }</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#ad55f80ed3cd8b6c4f247763b747016af"> 68</a></span>  <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#ad55f80ed3cd8b6c4f247763b747016af">sync</a>()</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  {</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  sync_if_necessary<TensorType>();</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  sync_tensor_if_necessary<TensorType>(dst);</div><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> </div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a4adab6322a0276f34a7d656d49fc865c"> 74</a></span>  <span class="keywordtype">void</span> <a class="code" href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a4adab6322a0276f34a7d656d49fc865c">teardown</a>()</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  {</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  a.allocator()->free();</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  b.allocator()->free();</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  c.allocator()->free();</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  dst.allocator()->free();</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> </div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  TensorType a{};</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  TensorType b{};</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  TensorType c{};</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  TensorType dst{};</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  Function gemm{};</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> } <span class="comment">// namespace test</span></div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> } <span class="comment">// namespace arm_compute</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="preprocessor">#endif </span><span class="comment">/* ARM_COMPUTE_TEST_GEMMFIXTURE */</span><span class="preprocessor"></span></div><div class="ttc" id="classarm__compute_1_1test_1_1_g_e_m_m_fixture_xhtml_a4adab6322a0276f34a7d656d49fc865c"><div class="ttname"><a href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a4adab6322a0276f34a7d656d49fc865c">arm_compute::test::GEMMFixture::teardown</a></div><div class="ttdeci">void teardown()</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2fixtures_2_g_e_m_m_fixture_8h_source.xhtml#l00074">GEMMFixture.h:74</a></div></div>
+<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ab146b9cbab6e73e7588b240dc709fe01"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ab146b9cbab6e73e7588b240dc709fe01">arm_compute::test::validation::beta</a></div><div class="ttdeci">beta</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00113">GEMM.cpp:113</a></div></div>
+<div class="ttc" id="classarm__compute_1_1_tensor_shape_xhtml"><div class="ttname"><a href="classarm__compute_1_1_tensor_shape.xhtml">arm_compute::TensorShape</a></div><div class="ttdoc">Shape of a tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_shape_8h_source.xhtml#l00039">TensorShape.h:39</a></div></div>
+<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ab39a7489f0c4ef5db0dfa9291073fe61"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ab39a7489f0c4ef5db0dfa9291073fe61">arm_compute::test::validation::shape_b</a></div><div class="ttdeci">shape_b</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00113">GEMM.cpp:113</a></div></div>
+<div class="ttc" id="classarm__compute_1_1test_1_1_g_e_m_m_fixture_xhtml_a72148b57b6159ddbdae5ccb350dd632b"><div class="ttname"><a href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a72148b57b6159ddbdae5ccb350dd632b">arm_compute::test::GEMMFixture::setup</a></div><div class="ttdeci">void setup(TensorShape shape_a, TensorShape shape_b, TensorShape shape_c, TensorShape shape_dst, float alpha, float beta, DataType data_type, bool reshape_b_only_on_first_run)</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2fixtures_2_g_e_m_m_fixture_8h_source.xhtml#l00043">GEMMFixture.h:43</a></div></div>
+<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a141b596a566813a7fc3116f9881d3dc9"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a141b596a566813a7fc3116f9881d3dc9">arm_compute::test::validation::shape_c</a></div><div class="ttdeci">shape_c</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00113">GEMM.cpp:113</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml"><div class="ttname"><a href="namespacearm__compute.xhtml">arm_compute</a></div><div class="ttdoc">This file contains all available output stages for GEMMLowp on OpenCL. </div><div class="ttdef"><b>Definition:</b> <a href="01__library_8dox_source.xhtml#l00001">01_library.dox:1</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1framework_1_1_fixture_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1framework_1_1_fixture.xhtml">arm_compute::test::framework::Fixture</a></div><div class="ttdoc">Abstract fixture class. </div><div class="ttdef"><b>Definition:</b> <a href="_fixture_8h_source.xhtml#l00037">Fixture.h:37</a></div></div>
-<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ac2ad7f431e3446fddcd9b6b9f93c4c14"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">arm_compute::test::validation::data_type</a></div><div class="ttdeci">data_type</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00119">Convolution.cpp:119</a></div></div>
+<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ac2ad7f431e3446fddcd9b6b9f93c4c14"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">arm_compute::test::validation::data_type</a></div><div class="ttdeci">data_type</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00114">GEMM.cpp:114</a></div></div>
<div class="ttc" id="_globals_8h_xhtml"><div class="ttname"><a href="_globals_8h.xhtml">Globals.h</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_g_e_m_m_fixture_xhtml_a13a43e6d814de94978c515cb084873b1"><div class="ttname"><a href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#a13a43e6d814de94978c515cb084873b1">arm_compute::test::GEMMFixture::run</a></div><div class="ttdeci">void run()</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2fixtures_2_g_e_m_m_fixture_8h_source.xhtml#l00063">GEMMFixture.h:63</a></div></div>
<div class="ttc" id="tests_2_utils_8h_xhtml"><div class="ttname"><a href="tests_2_utils_8h.xhtml">Utils.h</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_g_e_m_m_fixture_xhtml_ad55f80ed3cd8b6c4f247763b747016af"><div class="ttname"><a href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml#ad55f80ed3cd8b6c4f247763b747016af">arm_compute::test::GEMMFixture::sync</a></div><div class="ttdeci">void sync()</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2fixtures_2_g_e_m_m_fixture_8h_source.xhtml#l00068">GEMMFixture.h:68</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_g_e_m_m_fixture_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_g_e_m_m_fixture.xhtml">arm_compute::test::GEMMFixture</a></div><div class="ttdoc">Fixture that can be used for NEON and CL. </div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2fixtures_2_g_e_m_m_fixture_8h_source.xhtml#l00039">GEMMFixture.h:39</a></div></div>
-<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ac2c387216b8389a6069b2e5205bc03a9"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2c387216b8389a6069b2e5205bc03a9">arm_compute::test::validation::shape_a</a></div><div class="ttdeci">shape_a</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00112">GEMM.cpp:112</a></div></div>
-<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a62197192f0fbf4e0675eb37be1c4c175"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a62197192f0fbf4e0675eb37be1c4c175">arm_compute::test::validation::alpha</a></div><div class="ttdeci">alpha</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00112">GEMM.cpp:112</a></div></div>
+<div class="ttc" id="classarm__compute_1_1_g_e_m_m_info_xhtml"><div class="ttname"><a href="classarm__compute_1_1_g_e_m_m_info.xhtml">arm_compute::GEMMInfo</a></div><div class="ttdoc">GEMM information class. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00959">Types.h:959</a></div></div>
+<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ac2c387216b8389a6069b2e5205bc03a9"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2c387216b8389a6069b2e5205bc03a9">arm_compute::test::validation::shape_a</a></div><div class="ttdeci">shape_a</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00113">GEMM.cpp:113</a></div></div>
+<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a62197192f0fbf4e0675eb37be1c4c175"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a62197192f0fbf4e0675eb37be1c4c175">arm_compute::test::validation::alpha</a></div><div class="ttdeci">alpha</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00113">GEMM.cpp:113</a></div></div>
<div class="ttc" id="arm__compute_2core_2_types_8h_xhtml"><div class="ttname"><a href="arm__compute_2core_2_types_8h.xhtml">Types.h</a></div></div>
-<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">arm_compute::DataType</a></div><div class="ttdeci">DataType</div><div class="ttdoc">Available data types. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00071">Types.h:71</a></div></div>
+<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">arm_compute::DataType</a></div><div class="ttdeci">DataType</div><div class="ttdoc">Available data types. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00072">Types.h:72</a></div></div>
<div class="ttc" id="_tensor_shape_8h_xhtml"><div class="ttname"><a href="_tensor_shape_8h.xhtml">TensorShape.h</a></div></div>
<div class="ttc" id="_fixture_8h_xhtml"><div class="ttname"><a href="_fixture_8h.xhtml">Fixture.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_59425e443f801f1f2fd8bbe4959a3ccf.xhtml">tests</a></li><li class="navelem"><a class="el" href="dir_4f2df8950dc650bf7cf9176fae02facc.xhtml">benchmark</a></li><li class="navelem"><a class="el" href="dir_2c6de6ea34a07f1d39b21bbdca535ee0.xhtml">fixtures</a></li><li class="navelem"><a class="el" href="benchmark_2fixtures_2_g_e_m_m_fixture_8h.xhtml">GEMMFixture.h</a></li>
- <li class="footer">Generated on Wed Jan 24 2018 14:30:41 for Compute Library by
+ <li class="footer">Generated on Thu Feb 22 2018 15:45:20 for Compute Library by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
</ul>