blob: 4c8181054b2755fb0884fe5881e43799518c7502 [file] [log] [blame]
<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: Reference Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Compute Library
&#160;<span id="projectnumber">v17.06</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
<li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
<li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
<li><a href="files.xhtml"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
<li><a href="classes.xhtml"><span>Data&#160;Structure&#160;Index</span></a></li>
<li><a href="inherits.xhtml"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.xhtml"><span>Data&#160;Fields</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classarm__compute_1_1test_1_1validation_1_1_reference.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">Reference Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Interface for reference implementations.
<a href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_reference_8h_source.xhtml">Reference.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a3d1df250d5d15f22e84e7282bd471405"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#a3d1df250d5d15f22e84e7282bd471405">compute_reference_integral_image</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape)</td></tr>
<tr class="memdesc:a3d1df250d5d15f22e84e7282bd471405"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference integral image. <a href="#a3d1df250d5d15f22e84e7282bd471405">More...</a><br /></td></tr>
<tr class="separator:a3d1df250d5d15f22e84e7282bd471405"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3248d61de6fcfdd30f404267a1e4083"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#ad3248d61de6fcfdd30f404267a1e4083">compute_reference_absolute_difference</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_in0, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_in1, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_out)</td></tr>
<tr class="memdesc:ad3248d61de6fcfdd30f404267a1e4083"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference absolute difference. <a href="#ad3248d61de6fcfdd30f404267a1e4083">More...</a><br /></td></tr>
<tr class="separator:ad3248d61de6fcfdd30f404267a1e4083"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a205f1eb20b9c13265aff28de739c3c10"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#a205f1eb20b9c13265aff28de739c3c10">compute_reference_accumulate</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape)</td></tr>
<tr class="memdesc:a205f1eb20b9c13265aff28de739c3c10"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference accumulate. <a href="#a205f1eb20b9c13265aff28de739c3c10">More...</a><br /></td></tr>
<tr class="separator:a205f1eb20b9c13265aff28de739c3c10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ec8f59456aaa8ffd8d09eb3919bd67f"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#a3ec8f59456aaa8ffd8d09eb3919bd67f">compute_reference_accumulate_squared</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, uint32_t shift)</td></tr>
<tr class="memdesc:a3ec8f59456aaa8ffd8d09eb3919bd67f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference accumulate. <a href="#a3ec8f59456aaa8ffd8d09eb3919bd67f">More...</a><br /></td></tr>
<tr class="separator:a3ec8f59456aaa8ffd8d09eb3919bd67f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacf28f4a955e131ec74a3baa8bc5ade1"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#aacf28f4a955e131ec74a3baa8bc5ade1">compute_reference_accumulate_weighted</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, float alpha)</td></tr>
<tr class="memdesc:aacf28f4a955e131ec74a3baa8bc5ade1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference accumulate. <a href="#aacf28f4a955e131ec74a3baa8bc5ade1">More...</a><br /></td></tr>
<tr class="separator:aacf28f4a955e131ec74a3baa8bc5ade1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6924a9d2a83fbc410748d8a06fbca51"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#ae6924a9d2a83fbc410748d8a06fbca51">compute_reference_arithmetic_addition</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_in0, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_in1, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_out, <a class="el" href="namespacearm__compute.xhtml#a82b8ac759c804bc1fb4e2d21e178fb6f">ConvertPolicy</a> convert_policy)</td></tr>
<tr class="memdesc:ae6924a9d2a83fbc410748d8a06fbca51"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference arithmetic addition. <a href="#ae6924a9d2a83fbc410748d8a06fbca51">More...</a><br /></td></tr>
<tr class="separator:ae6924a9d2a83fbc410748d8a06fbca51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae46c0e47feca74d5aef1ede0c433fcf1"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#ae46c0e47feca74d5aef1ede0c433fcf1">compute_reference_arithmetic_subtraction</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_in0, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_in1, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_out, <a class="el" href="namespacearm__compute.xhtml#a82b8ac759c804bc1fb4e2d21e178fb6f">ConvertPolicy</a> convert_policy)</td></tr>
<tr class="memdesc:ae46c0e47feca74d5aef1ede0c433fcf1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference arithmetic subtraction. <a href="#ae46c0e47feca74d5aef1ede0c433fcf1">More...</a><br /></td></tr>
<tr class="separator:ae46c0e47feca74d5aef1ede0c433fcf1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad2bf16b19af4bdfd5abee6d05792c320"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#ad2bf16b19af4bdfd5abee6d05792c320">compute_reference_bitwise_and</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape)</td></tr>
<tr class="memdesc:ad2bf16b19af4bdfd5abee6d05792c320"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference bitwise and. <a href="#ad2bf16b19af4bdfd5abee6d05792c320">More...</a><br /></td></tr>
<tr class="separator:ad2bf16b19af4bdfd5abee6d05792c320"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a541f369d7d288cc118bb058d51e29782"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#a541f369d7d288cc118bb058d51e29782">compute_reference_bitwise_or</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape)</td></tr>
<tr class="memdesc:a541f369d7d288cc118bb058d51e29782"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference bitwise or. <a href="#a541f369d7d288cc118bb058d51e29782">More...</a><br /></td></tr>
<tr class="separator:a541f369d7d288cc118bb058d51e29782"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdd81b30b87766f79dc62a575b0beebc"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#afdd81b30b87766f79dc62a575b0beebc">compute_reference_bitwise_xor</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape)</td></tr>
<tr class="memdesc:afdd81b30b87766f79dc62a575b0beebc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference bitwise xor. <a href="#afdd81b30b87766f79dc62a575b0beebc">More...</a><br /></td></tr>
<tr class="separator:afdd81b30b87766f79dc62a575b0beebc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd4179146d726e3fa6e196fa23f3c5d4"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#abd4179146d726e3fa6e196fa23f3c5d4">compute_reference_bitwise_not</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape)</td></tr>
<tr class="memdesc:abd4179146d726e3fa6e196fa23f3c5d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference bitwise not. <a href="#abd4179146d726e3fa6e196fa23f3c5d4">More...</a><br /></td></tr>
<tr class="separator:abd4179146d726e3fa6e196fa23f3c5d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7d18cb004ae29dfea24ec952e6faa78"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#ac7d18cb004ae29dfea24ec952e6faa78">compute_reference_box3x3</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape)</td></tr>
<tr class="memdesc:ac7d18cb004ae29dfea24ec952e6faa78"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference 3-by-3 box filter. <a href="#ac7d18cb004ae29dfea24ec952e6faa78">More...</a><br /></td></tr>
<tr class="separator:ac7d18cb004ae29dfea24ec952e6faa78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2927e68b74c690e2b7c2780fd32ee5b"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#ae2927e68b74c690e2b7c2780fd32ee5b">compute_reference_depth_convert</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_in, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_out, <a class="el" href="namespacearm__compute.xhtml#a82b8ac759c804bc1fb4e2d21e178fb6f">ConvertPolicy</a> policy, uint32_t shift, uint32_t fixed_point_position)</td></tr>
<tr class="memdesc:ae2927e68b74c690e2b7c2780fd32ee5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference depth convert. <a href="#ae2927e68b74c690e2b7c2780fd32ee5b">More...</a><br /></td></tr>
<tr class="separator:ae2927e68b74c690e2b7c2780fd32ee5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3c09c503cb3e94e4475502f4b005a69"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#ab3c09c503cb3e94e4475502f4b005a69">compute_reference_gemm</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;src_shape1, const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;src_shape2, const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;src_shape3, const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;dst_shape, float alpha, float beta, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt, int fixed_point_position=0)</td></tr>
<tr class="memdesc:ab3c09c503cb3e94e4475502f4b005a69"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute matrix multiply function. <a href="#ab3c09c503cb3e94e4475502f4b005a69">More...</a><br /></td></tr>
<tr class="separator:ab3c09c503cb3e94e4475502f4b005a69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab94a052a7a342ed76c16bedc97befa87"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#ab94a052a7a342ed76c16bedc97befa87">compute_reference_pixel_wise_multiplication</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_in0, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_in1, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_out, float scale, <a class="el" href="namespacearm__compute.xhtml#a82b8ac759c804bc1fb4e2d21e178fb6f">ConvertPolicy</a> convert_policy, <a class="el" href="namespacearm__compute.xhtml#add6426cbf2e057a195846d4ba09a50be">RoundingPolicy</a> rounding_policy)</td></tr>
<tr class="memdesc:ab94a052a7a342ed76c16bedc97befa87"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference pixel-wise multiplication. <a href="#ab94a052a7a342ed76c16bedc97befa87">More...</a><br /></td></tr>
<tr class="separator:ab94a052a7a342ed76c16bedc97befa87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa783291c0d23cb22ffc494298eef307"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#afa783291c0d23cb22ffc494298eef307">compute_reference_fixed_point_pixel_wise_multiplication</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_in0, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_in1, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_out, float scale, int fixed_point_position, <a class="el" href="namespacearm__compute.xhtml#a82b8ac759c804bc1fb4e2d21e178fb6f">ConvertPolicy</a> convert_policy, <a class="el" href="namespacearm__compute.xhtml#add6426cbf2e057a195846d4ba09a50be">RoundingPolicy</a> rounding_policy)</td></tr>
<tr class="memdesc:afa783291c0d23cb22ffc494298eef307"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference pixel-wise multiplication. <a href="#afa783291c0d23cb22ffc494298eef307">More...</a><br /></td></tr>
<tr class="separator:afa783291c0d23cb22ffc494298eef307"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac58967d13dc282d5ebf11f54e5605b8e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#ac58967d13dc282d5ebf11f54e5605b8e">compute_reference_threshold</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, uint8_t threshold, uint8_t false_value, uint8_t true_value, <a class="el" href="namespacearm__compute.xhtml#a3e6b23e675649b83240691abbc42a649">ThresholdType</a> type, uint8_t upper)</td></tr>
<tr class="memdesc:ac58967d13dc282d5ebf11f54e5605b8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference threshold. <a href="#ac58967d13dc282d5ebf11f54e5605b8e">More...</a><br /></td></tr>
<tr class="separator:ac58967d13dc282d5ebf11f54e5605b8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c6cd80f8097cee0613209b6181bd63c"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#a0c6cd80f8097cee0613209b6181bd63c">compute_reference_activation_layer</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt, <a class="el" href="classarm__compute_1_1_activation_layer_info.xhtml">ActivationLayerInfo</a> act_info, int fixed_point_position=0)</td></tr>
<tr class="memdesc:a0c6cd80f8097cee0613209b6181bd63c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference activation layer. <a href="#a0c6cd80f8097cee0613209b6181bd63c">More...</a><br /></td></tr>
<tr class="separator:a0c6cd80f8097cee0613209b6181bd63c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29e1a0e84b89f37a11b2efda846e8abe"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#a29e1a0e84b89f37a11b2efda846e8abe">compute_reference_batch_normalization_layer</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape0, const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape1, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt, float epsilon, int fixed_point_position=0)</td></tr>
<tr class="memdesc:a29e1a0e84b89f37a11b2efda846e8abe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference batch normalization layer. <a href="#a29e1a0e84b89f37a11b2efda846e8abe">More...</a><br /></td></tr>
<tr class="separator:a29e1a0e84b89f37a11b2efda846e8abe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f299846fadd4b523b875efa44300af1"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#a3f299846fadd4b523b875efa44300af1">compute_reference_convolution_layer</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;input_shape, const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;weights_shape, const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;bias_shape, const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;output_shape, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt, const <a class="el" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a> &amp;conv_info, int fixed_point_position)</td></tr>
<tr class="memdesc:a3f299846fadd4b523b875efa44300af1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference pixel-wise multiplication. <a href="#a3f299846fadd4b523b875efa44300af1">More...</a><br /></td></tr>
<tr class="separator:a3f299846fadd4b523b875efa44300af1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdf41e10f4ca31603d86ad230c2334a7"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#afdf41e10f4ca31603d86ad230c2334a7">compute_reference_fully_connected_layer</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;input_shape, const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;weights_shape, const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;bias_shape, const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;output_shape, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt, bool transpose_weights, int fixed_point_position)</td></tr>
<tr class="memdesc:afdf41e10f4ca31603d86ad230c2334a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference for fully connected layer function. <a href="#afdf41e10f4ca31603d86ad230c2334a7">More...</a><br /></td></tr>
<tr class="separator:afdf41e10f4ca31603d86ad230c2334a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5608631245f2553eff505acf4c18b5c8"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#a5608631245f2553eff505acf4c18b5c8">compute_reference_normalization_layer</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt, <a class="el" href="classarm__compute_1_1_normalization_layer_info.xhtml">NormalizationLayerInfo</a> norm_info, int fixed_point_position=0)</td></tr>
<tr class="memdesc:a5608631245f2553eff505acf4c18b5c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference normalization layer. <a href="#a5608631245f2553eff505acf4c18b5c8">More...</a><br /></td></tr>
<tr class="separator:a5608631245f2553eff505acf4c18b5c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab40feee52f91c245e51c1ad9f6bf0b43"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#ab40feee52f91c245e51c1ad9f6bf0b43">compute_reference_pooling_layer</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape_in, const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape_out, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt, <a class="el" href="classarm__compute_1_1_pooling_layer_info.xhtml">PoolingLayerInfo</a> pool_info, int fixed_point_position=0)</td></tr>
<tr class="memdesc:ab40feee52f91c245e51c1ad9f6bf0b43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference pooling layer. <a href="#ab40feee52f91c245e51c1ad9f6bf0b43">More...</a><br /></td></tr>
<tr class="separator:ab40feee52f91c245e51c1ad9f6bf0b43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae50cb3ee700120b699894d9a3ae9405e"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#ae50cb3ee700120b699894d9a3ae9405e">compute_reference_softmax_layer</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt, int fixed_point_position=0)</td></tr>
<tr class="memdesc:ae50cb3ee700120b699894d9a3ae9405e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference softmax layer. <a href="#ae50cb3ee700120b699894d9a3ae9405e">More...</a><br /></td></tr>
<tr class="separator:ae50cb3ee700120b699894d9a3ae9405e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09919b3cef9a55a68c13f44ec381c368"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml#a09919b3cef9a55a68c13f44ec381c368">compute_reference_fixed_point_operation</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_in, <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> dt_out, <a class="el" href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dc">FixedPointOp</a> op, int fixed_point_position)</td></tr>
<tr class="memdesc:a09919b3cef9a55a68c13f44ec381c368"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute reference fixed point operation. <a href="#a09919b3cef9a55a68c13f44ec381c368">More...</a><br /></td></tr>
<tr class="separator:a09919b3cef9a55a68c13f44ec381c368"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Interface for reference implementations. </p>
<p>Definition at line <a class="el" href="_reference_8h_source.xhtml#l00037">37</a> of file <a class="el" href="_reference_8h_source.xhtml">Reference.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ad3248d61de6fcfdd30f404267a1e4083"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_absolute_difference </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_in0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_in1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_out</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference absolute difference. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_in0</td><td>Data type of first input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_in1</td><td>Data type of second input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_out</td><td>Data type of the output tensor.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00056">56</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="_tensor_operations_8h_source.xhtml#l00270">arm_compute::test::validation::tensor_operations::absolute_difference()</a>, and <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>.</p>
<div class="fragment"><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;{</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src1 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_in0);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src2 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_in1);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_out);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src1, 0);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src2, 1);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a15536b2ec56dc51d7dc9ac09bd6a5d76">ReferenceCPP::absolute_difference</a>(ref_src1, ref_src2, ref_dst);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a15536b2ec56dc51d7dc9ac09bd6a5d76"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a15536b2ec56dc51d7dc9ac09bd6a5d76">arm_compute::test::validation::ReferenceCPP::absolute_difference</a></div><div class="ttdeci">static void absolute_difference(const RawTensor &amp;src1, const RawTensor &amp;src2, RawTensor &amp;dst)</div><div class="ttdoc">Function to compute the absolute difference between two tensors. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00052">ReferenceCPP.cpp:52</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a205f1eb20b9c13265aff28de739c3c10"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_accumulate </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference accumulate. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00073">73</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="accumulate_8cl_source.xhtml#l00041">accumulate()</a>, <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">arm_compute::S16</a>, and <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>.</p>
<div class="fragment"><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;{</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">DataType::S16</a>);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src, 0);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_dst, 1);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a0aa8da1953b7cb44b1b75aec737adb48">ReferenceCPP::accumulate</a>(ref_src, ref_dst);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">Unknown image format. </div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a0aa8da1953b7cb44b1b75aec737adb48"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a0aa8da1953b7cb44b1b75aec737adb48">arm_compute::test::validation::ReferenceCPP::accumulate</a></div><div class="ttdeci">static void accumulate(const RawTensor &amp;src, RawTensor &amp;dst)</div><div class="ttdoc">Function to accumulate an input tensor into an output tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00068">ReferenceCPP.cpp:68</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">arm_compute::Format::S16</a></div><div class="ttdoc">1 channel, 1 U8 per channel </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3ec8f59456aaa8ffd8d09eb3919bd67f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_accumulate_squared </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>shift</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference accumulate. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">shift</td><td>A uint32_t value within the range of [0, 15]</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00089">89</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="accumulate_8cl_source.xhtml#l00112">accumulate_squared()</a>, <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00880">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">arm_compute::S16</a>, and <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>.</p>
<div class="fragment"><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;{</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">DataType::S16</a>);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="comment">// ref_dst tensor filled with non-negative values</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src, 0);</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_dst, 1, static_cast&lt;int16_t&gt;(0), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;int16_t&gt;::max</a>());</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a0dec321c30d2695ac8f9c20e8928543a">ReferenceCPP::accumulate_squared</a>(ref_src, ref_dst, shift);</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">Unknown image format. </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">arm_compute::Format::S16</a></div><div class="ttdoc">1 channel, 1 U8 per channel </div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a0dec321c30d2695ac8f9c20e8928543a"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a0dec321c30d2695ac8f9c20e8928543a">arm_compute::test::validation::ReferenceCPP::accumulate_squared</a></div><div class="ttdeci">static void accumulate_squared(const RawTensor &amp;src, RawTensor &amp;dst, uint32_t shift)</div><div class="ttdoc">Function to accumulate a squared value from an input tensor to an output tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00077">ReferenceCPP.cpp:77</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00880">FixedPoint.h:880</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aacf28f4a955e131ec74a3baa8bc5ade1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_accumulate_weighted </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>alpha</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference accumulate. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">alpha</td><td>A float value within the range of [0, 1]</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00106">106</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="accumulate_8cl_source.xhtml#l00076">accumulate_weighted()</a>, <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, and <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>.</p>
<div class="fragment"><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;{</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src, 0);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_dst, 1);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a110ef9b03fb51be2f000391a300d1a2a">ReferenceCPP::accumulate_weighted</a>(ref_src, ref_dst, alpha);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">Unknown image format. </div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a110ef9b03fb51be2f000391a300d1a2a"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a110ef9b03fb51be2f000391a300d1a2a">arm_compute::test::validation::ReferenceCPP::accumulate_weighted</a></div><div class="ttdeci">static void accumulate_weighted(const RawTensor &amp;src, RawTensor &amp;dst, float alpha)</div><div class="ttdoc">Function to accumulate a weighted value from an input tensor to an output tensor. ...</div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00086">ReferenceCPP.cpp:86</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a0c6cd80f8097cee0613209b6181bd63c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_activation_layer </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_activation_layer_info.xhtml">ActivationLayerInfo</a>&#160;</td>
<td class="paramname"><em>act_info</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>fixed_point_position</em> = <code>0</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference activation layer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt</td><td>Data type of the tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">act_info</td><td>Activation layer information. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fixed_point_position</td><td>(Optional)Number of bits for the fractional part of fixed point numbers.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00331">331</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00486">ActivationLayerInfo::activation()</a>, <a class="el" href="activation__layer_8cl_source.xhtml#l00050">activation_layer()</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::F32</a>, and <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>.</p>
<div class="fragment"><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160;{</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160;</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160; <span class="keywordflow">if</span>(dt == <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>)</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160; {</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160; <span class="keywordtype">float</span> min_bound = 0;</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160; <span class="keywordtype">float</span> max_bound = 0;</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160; std::tie(min_bound, max_bound) = get_activation_layer_test_bounds&lt;float&gt;(act_info.activation());</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160; std::uniform_real_distribution&lt;&gt; distribution(min_bound, max_bound);</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_src, distribution, 0);</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160; }</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>&#160; {</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>&#160; <span class="keywordtype">int</span> min_bound = 0;</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160; <span class="keywordtype">int</span> max_bound = 0;</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>&#160; std::tie(min_bound, max_bound) = get_activation_layer_test_bounds&lt;int8_t&gt;(act_info.activation(), fixed_point_position);</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160; std::uniform_int_distribution&lt;&gt; distribution(min_bound, max_bound);</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_src, distribution, 0);</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160; }</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160;</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a56c0f65e0e83ad40fe5ec3abfd16d7b9">ReferenceCPP::activation_layer</a>(ref_src, ref_dst, act_info);</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>&#160;</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::Format::F32</a></div><div class="ttdoc">1 channel, 1 F16 per channel </div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a56c0f65e0e83ad40fe5ec3abfd16d7b9"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a56c0f65e0e83ad40fe5ec3abfd16d7b9">arm_compute::test::validation::ReferenceCPP::activation_layer</a></div><div class="ttdeci">static void activation_layer(const RawTensor &amp;input, RawTensor &amp;output, ActivationLayerInfo act_info)</div><div class="ttdoc">Activation layer of src base on information from act_info. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00208">ReferenceCPP.cpp:208</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae6924a9d2a83fbc410748d8a06fbca51"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_arithmetic_addition </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_in0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_in1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_out</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a82b8ac759c804bc1fb4e2d21e178fb6f">ConvertPolicy</a>&#160;</td>
<td class="paramname"><em>convert_policy</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference arithmetic addition. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_in0</td><td>Data type of first input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_in1</td><td>Data type of second input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_out</td><td>Data type of the output tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">convert_policy</td><td>Overflow policy of the operation.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00122">122</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="_tensor_operations_8h_source.xhtml#l00331">arm_compute::test::validation::tensor_operations::arithmetic_addition()</a>, and <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>.</p>
<div class="fragment"><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;{</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src1 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_in0);</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src2 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_in1);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_out);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src1, 0);</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src2, 1);</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#ae87f25d124d6c66c839ac929702aee11">ReferenceCPP::arithmetic_addition</a>(ref_src1, ref_src2, ref_dst, convert_policy);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_ae87f25d124d6c66c839ac929702aee11"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#ae87f25d124d6c66c839ac929702aee11">arm_compute::test::validation::ReferenceCPP::arithmetic_addition</a></div><div class="ttdeci">static void arithmetic_addition(const RawTensor &amp;src1, const RawTensor &amp;src2, RawTensor &amp;dst, ConvertPolicy convert_policy)</div><div class="ttdoc">Arithmetic addition of src1 and src2. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00095">ReferenceCPP.cpp:95</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae46c0e47feca74d5aef1ede0c433fcf1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_arithmetic_subtraction </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_in0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_in1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_out</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a82b8ac759c804bc1fb4e2d21e178fb6f">ConvertPolicy</a>&#160;</td>
<td class="paramname"><em>convert_policy</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference arithmetic subtraction. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_in0</td><td>Data type of first input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_in1</td><td>Data type of second input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_out</td><td>Data type of the output tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">convert_policy</td><td>Overflow policy of the operation.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00139">139</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="_tensor_operations_8h_source.xhtml#l00344">arm_compute::test::validation::tensor_operations::arithmetic_subtraction()</a>, and <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>.</p>
<div class="fragment"><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;{</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src1 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_in0);</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src2 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_in1);</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_out);</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src1, 0);</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src2, 1);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#ab09b1a280817a388ed7bed899088ba0b">ReferenceCPP::arithmetic_subtraction</a>(ref_src1, ref_src2, ref_dst, convert_policy);</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_ab09b1a280817a388ed7bed899088ba0b"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#ab09b1a280817a388ed7bed899088ba0b">arm_compute::test::validation::ReferenceCPP::arithmetic_subtraction</a></div><div class="ttdeci">static void arithmetic_subtraction(const RawTensor &amp;src1, const RawTensor &amp;src2, RawTensor &amp;dst, ConvertPolicy convert_policy)</div><div class="ttdoc">Arithmetic subtraction of src2 from src1. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00104">ReferenceCPP.cpp:104</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a29e1a0e84b89f37a11b2efda846e8abe"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_batch_normalization_layer </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>epsilon</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>fixed_point_position</em> = <code>0</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference batch normalization layer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape0</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">shape1</td><td>Shape of the vector tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt</td><td>Data type of all input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">epsilon</td><td>Small value to avoid division with zero. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fixed_point_position</td><td>Fixed point position.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00361">361</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="_tensor_operations_8h_source.xhtml#l00783">arm_compute::test::validation::tensor_operations::batch_normalization_layer()</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::F32</a>, and <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>.</p>
<div class="fragment"><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>&#160;{</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape0, dt, 1, fixed_point_position);</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape0, dt, 1, fixed_point_position);</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_mean = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape1, dt, 1, fixed_point_position);</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_var = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape1, dt, 1, fixed_point_position);</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_beta = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape1, dt, 1, fixed_point_position);</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_gamma = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape1, dt, 1, fixed_point_position);</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>&#160;</div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>&#160; <span class="comment">// Fill tensors with values from -1 to 1.</span></div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160; <span class="keywordflow">if</span>(dt == <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>)</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>&#160; {</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>&#160; <span class="keywordtype">float</span> min_bound = 0.f;</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>&#160; <span class="keywordtype">float</span> max_bound = 0.f;</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>&#160; std::tie(min_bound, max_bound) = get_batchnormalization_layer_test_bounds&lt;float&gt;();</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160; std::uniform_real_distribution&lt;&gt; distribution(min_bound, max_bound);</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>&#160; std::uniform_real_distribution&lt;&gt; distribution_var(0, max_bound);</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_src, distribution, 0);</div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_mean, distribution, 1);</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_var, distribution_var, 0);</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_beta, distribution, 3);</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_gamma, distribution, 4);</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>&#160; }</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>&#160; {</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>&#160; <span class="keywordtype">int</span> min_bound = 0;</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>&#160; <span class="keywordtype">int</span> max_bound = 0;</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>&#160; std::tie(min_bound, max_bound) = get_batchnormalization_layer_test_bounds&lt;int8_t&gt;(fixed_point_position);</div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>&#160; std::uniform_int_distribution&lt;&gt; distribution(min_bound, max_bound);</div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>&#160; std::uniform_int_distribution&lt;&gt; distribution_var(0, max_bound);</div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_src, distribution, 0);</div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_mean, distribution, 1);</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_var, distribution_var, 0);</div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_beta, distribution, 3);</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_gamma, distribution, 4);</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>&#160; }</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>&#160;</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#ac9fec1f76f1b3b4cae3b7feb19e397c3">ReferenceCPP::batch_normalization_layer</a>(ref_src, ref_dst, ref_mean, ref_var, ref_beta, ref_gamma, epsilon, fixed_point_position);</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>&#160;</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::Format::F32</a></div><div class="ttdoc">1 channel, 1 F16 per channel </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_ac9fec1f76f1b3b4cae3b7feb19e397c3"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#ac9fec1f76f1b3b4cae3b7feb19e397c3">arm_compute::test::validation::ReferenceCPP::batch_normalization_layer</a></div><div class="ttdeci">static void batch_normalization_layer(const RawTensor &amp;src, RawTensor &amp;dst, const RawTensor &amp;mean, const RawTensor &amp;var, const RawTensor &amp;beta, const RawTensor &amp;gamma, float epsilon, int fixed_point_position=0)</div><div class="ttdoc">Batch Normalization of src based on the information from norm_info. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00216">ReferenceCPP.cpp:216</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ad2bf16b19af4bdfd5abee6d05792c320"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_bitwise_and </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference bitwise and. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00156">156</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="bitwise__op_8cl_source.xhtml#l00083">bitwise_and()</a>, <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, and <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>.</p>
<div class="fragment"><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;{</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src1 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src2 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src1, 0);</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src2, 1);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#abf10dbf9017acc5b941ca80879ed3650">ReferenceCPP::bitwise_and</a>(ref_src1, ref_src2, ref_dst);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_abf10dbf9017acc5b941ca80879ed3650"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#abf10dbf9017acc5b941ca80879ed3650">arm_compute::test::validation::ReferenceCPP::bitwise_and</a></div><div class="ttdeci">static void bitwise_and(const RawTensor &amp;src1, const RawTensor &amp;src2, RawTensor &amp;dst)</div><div class="ttdoc">Function to compute the bitwise and between two tensors. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00113">ReferenceCPP.cpp:113</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">Unknown image format. </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="abd4179146d726e3fa6e196fa23f3c5d4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_bitwise_not </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference bitwise not. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00207">207</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="bitwise__op_8cl_source.xhtml#l00149">bitwise_not()</a>, <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, and <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>.</p>
<div class="fragment"><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;{</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160;</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src, 0);</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a3242afdd5be299ca6260c2dcce581f75">ReferenceCPP::bitwise_not</a>(ref_src, ref_dst);</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">Unknown image format. </div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a3242afdd5be299ca6260c2dcce581f75"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a3242afdd5be299ca6260c2dcce581f75">arm_compute::test::validation::ReferenceCPP::bitwise_not</a></div><div class="ttdeci">static void bitwise_not(const RawTensor &amp;src, RawTensor &amp;dst)</div><div class="ttdoc">Function to compute the bitwise not of a tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00143">ReferenceCPP.cpp:143</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a541f369d7d288cc118bb058d51e29782"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_bitwise_or </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference bitwise or. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00173">173</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="bitwise__op_8cl_source.xhtml#l00047">bitwise_or()</a>, <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, and <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>.</p>
<div class="fragment"><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;{</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src1 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src2 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src1, 0);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src2, 1);</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#ad9c7e06a7125cdef72a0d0b8cd5c9440">ReferenceCPP::bitwise_or</a>(ref_src1, ref_src2, ref_dst);</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">Unknown image format. </div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_ad9c7e06a7125cdef72a0d0b8cd5c9440"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#ad9c7e06a7125cdef72a0d0b8cd5c9440">arm_compute::test::validation::ReferenceCPP::bitwise_or</a></div><div class="ttdeci">static void bitwise_or(const RawTensor &amp;src1, const RawTensor &amp;src2, RawTensor &amp;dst)</div><div class="ttdoc">Function to compute the bitwise or between two tensors. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00123">ReferenceCPP.cpp:123</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="afdd81b30b87766f79dc62a575b0beebc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_bitwise_xor </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference bitwise xor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00190">190</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="bitwise__op_8cl_source.xhtml#l00119">bitwise_xor()</a>, <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, and <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>.</p>
<div class="fragment"><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;{</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src1 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src2 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160;</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src1, 0);</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src2, 1);</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a6d1292bec01869fc5efd1e39d3496dc3">ReferenceCPP::bitwise_xor</a>(ref_src1, ref_src2, ref_dst);</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">Unknown image format. </div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a6d1292bec01869fc5efd1e39d3496dc3"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a6d1292bec01869fc5efd1e39d3496dc3">arm_compute::test::validation::ReferenceCPP::bitwise_xor</a></div><div class="ttdeci">static void bitwise_xor(const RawTensor &amp;src1, const RawTensor &amp;src2, RawTensor &amp;dst)</div><div class="ttdoc">Function to compute the bitwise xor between two tensors. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00133">ReferenceCPP.cpp:133</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac7d18cb004ae29dfea24ec952e6faa78"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_box3x3 </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference 3-by-3 box filter. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00222">222</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="_tensor_operations_8h_source.xhtml#l00397">arm_compute::test::validation::tensor_operations::box3x3()</a>, <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, and <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>.</p>
<div class="fragment"><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;{</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160;</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src, 0);</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#af7b729e6ded963c8bf9ead4012f17e02">ReferenceCPP::box3x3</a>(ref_src, ref_dst);</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160;</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">Unknown image format. </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_af7b729e6ded963c8bf9ead4012f17e02"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#af7b729e6ded963c8bf9ead4012f17e02">arm_compute::test::validation::ReferenceCPP::box3x3</a></div><div class="ttdeci">static void box3x3(const RawTensor &amp;src, RawTensor &amp;dst)</div><div class="ttdoc">Function to compute 3-by-3 box filtered result tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00152">ReferenceCPP.cpp:152</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3f299846fadd4b523b875efa44300af1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_convolution_layer </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>input_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>weights_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>bias_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>output_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a> &amp;&#160;</td>
<td class="paramname"><em>conv_info</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>fixed_point_position</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference pixel-wise multiplication. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input_shape</td><td>Shape for the input tensor </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">weights_shape</td><td>Shape for the weights tensor </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">bias_shape</td><td>Shape for the bias tensor </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">output_shape</td><td>Shape for the output tensor </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt</td><td>Data type to use </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">conv_info</td><td>Pads and strides information for the convolution layer </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fixed_point_position</td><td>Number of bits for the fractional part of the fixed point numbers</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00405">405</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="_tensor_operations_8h_source.xhtml#l00847">arm_compute::test::validation::tensor_operations::convolution_layer()</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::F32</a>, and <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>.</p>
<div class="fragment"><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>&#160;{</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(input_shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_weights = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(weights_shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_bias = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(bias_shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(output_shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>&#160;</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>&#160; <span class="keywordflow">if</span>(dt == <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>)</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>&#160; {</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>&#160; std::uniform_real_distribution&lt;&gt; distribution(-1.0f, 1.0f);</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_src, distribution, 0);</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_weights, distribution, 1);</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_bias, distribution, 2);</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>&#160; }</div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>&#160; {</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src, 0);</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_weights, 1);</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_bias, 2);</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>&#160; }</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>&#160;</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a28b261146dafd6effae75dfbfe411b29">ReferenceCPP::convolution_layer</a>(ref_src, ref_weights, ref_bias, ref_dst, conv_info);</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>&#160;</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::Format::F32</a></div><div class="ttdoc">1 channel, 1 F16 per channel </div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a28b261146dafd6effae75dfbfe411b29"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a28b261146dafd6effae75dfbfe411b29">arm_compute::test::validation::ReferenceCPP::convolution_layer</a></div><div class="ttdeci">static void convolution_layer(const RawTensor &amp;src, const RawTensor &amp;weights, const RawTensor &amp;bias, RawTensor &amp;dst, const PadStrideInfo &amp;conv_info)</div><div class="ttdoc">Convolution layer function. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00229">ReferenceCPP.cpp:229</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae2927e68b74c690e2b7c2780fd32ee5b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_depth_convert </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_out</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a82b8ac759c804bc1fb4e2d21e178fb6f">ConvertPolicy</a>&#160;</td>
<td class="paramname"><em>policy</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>shift</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>fixed_point_position</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference depth convert. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_in</td><td>Data type of input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_out</td><td>Data type of the output tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">policy</td><td>Overflow policy of the operation. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">shift</td><td>Value for down/up conversions. Must be 0 &lt;= shift &lt; 8. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fixed_point_position</td><td>Fixed point position.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00237">237</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="_tensor_operations_8h_source.xhtml#l00414">arm_compute::test::validation::tensor_operations::depth_convert()</a>, and <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>.</p>
<div class="fragment"><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160;{</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_in, 1, fixed_point_position);</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_out, 1, fixed_point_position);</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160;</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src, 0);</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160;</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#ae1d31eb9d1ad6273e35c0b012c9b2cd1">ReferenceCPP::depth_convert</a>(ref_src, ref_dst, policy, shift);</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160;</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_ae1d31eb9d1ad6273e35c0b012c9b2cd1"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#ae1d31eb9d1ad6273e35c0b012c9b2cd1">arm_compute::test::validation::ReferenceCPP::depth_convert</a></div><div class="ttdeci">static void depth_convert(const RawTensor &amp;src, RawTensor &amp;dst, ConvertPolicy policy, uint32_t shift)</div><div class="ttdoc">Depth conversion from src to dst. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00161">ReferenceCPP.cpp:161</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a09919b3cef9a55a68c13f44ec381c368"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_fixed_point_operation </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_out</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dc">FixedPointOp</a>&#160;</td>
<td class="paramname"><em>op</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>fixed_point_position</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference fixed point operation. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_in</td><td>Data type of the input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_out</td><td>Data type of the output tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">op</td><td>Fixed point operation to perform. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fixed_point_position</td><td>Number of bits for the fractional part of the fixed point numbers</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00555">555</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="_error_8h_source.xhtml#l00031">ARM_COMPUTE_ERROR</a>, <a class="el" href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dca8c670f8c37b95e1ed14a0ce414b049c7">arm_compute::EXP</a>, <a class="el" href="_tensor_operations_8h_source.xhtml#l01319">arm_compute::test::validation::tensor_operations::fixed_point_operation()</a>, <a class="el" href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dca59c58364795af22cad54630be156712b">arm_compute::INV_SQRT</a>, <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, <a class="el" href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dca4b5ffcdaf38ce4d463171f5c977c5ab3">arm_compute::LOG</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00880">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00875">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, and <a class="el" href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dca4d98346f3d5cc5fa5666f0715abf25b1">arm_compute::RECIPROCAL</a>.</p>
<div class="fragment"><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>&#160;{</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_in, 1, fixed_point_position);</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_out, 1, fixed_point_position);</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>&#160;</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>&#160; <span class="keywordtype">int</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a> = 0;</div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>&#160; <span class="keywordtype">int</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a> = 0;</div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span>&#160; <span class="keywordflow">switch</span>(op)</div><div class="line"><a name="l00565"></a><span class="lineno"> 565</span>&#160; {</div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span>&#160; <span class="keywordflow">case</span>(<a class="code" href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dca59c58364795af22cad54630be156712b">FixedPointOp::INV_SQRT</a>):</div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>&#160; min = 32;</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>&#160; max = 127;</div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>&#160; <span class="keywordflow">case</span>(<a class="code" href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dca4b5ffcdaf38ce4d463171f5c977c5ab3">FixedPointOp::LOG</a>):</div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>&#160; min = (1 &lt;&lt; (fixed_point_position - 1));</div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span>&#160; max = 63;</div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>&#160; <span class="keywordflow">case</span>(<a class="code" href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dca8c670f8c37b95e1ed14a0ce414b049c7">FixedPointOp::EXP</a>):</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>&#160; min = 1;</div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>&#160; max = (1 &lt;&lt; (fixed_point_position - 1));</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>&#160; <span class="keywordflow">case</span>(<a class="code" href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dca4d98346f3d5cc5fa5666f0715abf25b1">FixedPointOp::RECIPROCAL</a>):</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>&#160; min = 15;</div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span>&#160; max = 100;</div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span>&#160; <span class="keywordflow">default</span>:</div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span>&#160; <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Fixed point operation not supported&quot;</span>);</div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>&#160; }</div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>&#160; std::uniform_int_distribution&lt;&gt; distribution(min, max);</div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_src, distribution, 0);</div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>&#160;</div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#aa72a69edbdb11aaa12f83881e038f1d5">ReferenceCPP::fixed_point_operation</a>(ref_src, ref_dst, op);</div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>&#160;</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00031">Error.h:31</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aabcf39e3917f842dbc5fbb0d802f24d5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">arm_compute::test::fixed_point_arithmetic::detail::min</a></div><div class="ttdeci">fixed_point&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00875">FixedPoint.h:875</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_afa20b6a7f4383003babd690f026f22dca4b5ffcdaf38ce4d463171f5c977c5ab3"><div class="ttname"><a href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dca4b5ffcdaf38ce4d463171f5c977c5ab3">arm_compute::FixedPointOp::LOG</a></div><div class="ttdoc">Logarithm. </div></div>
<div class="ttc" id="namespacearm__compute_xhtml_afa20b6a7f4383003babd690f026f22dca8c670f8c37b95e1ed14a0ce414b049c7"><div class="ttname"><a href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dca8c670f8c37b95e1ed14a0ce414b049c7">arm_compute::FixedPointOp::EXP</a></div><div class="ttdoc">Exponential. </div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_aa72a69edbdb11aaa12f83881e038f1d5"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#aa72a69edbdb11aaa12f83881e038f1d5">arm_compute::test::validation::ReferenceCPP::fixed_point_operation</a></div><div class="ttdeci">static void fixed_point_operation(const RawTensor &amp;src, RawTensor &amp;dst, FixedPointOp op)</div><div class="ttdoc">Fixed point operations of src. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00273">ReferenceCPP.cpp:273</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_afa20b6a7f4383003babd690f026f22dca59c58364795af22cad54630be156712b"><div class="ttname"><a href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dca59c58364795af22cad54630be156712b">arm_compute::FixedPointOp::INV_SQRT</a></div><div class="ttdoc">Inverse square root. </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_afa20b6a7f4383003babd690f026f22dca4d98346f3d5cc5fa5666f0715abf25b1"><div class="ttname"><a href="namespacearm__compute.xhtml#afa20b6a7f4383003babd690f026f22dca4d98346f3d5cc5fa5666f0715abf25b1">arm_compute::FixedPointOp::RECIPROCAL</a></div><div class="ttdoc">Reciprocal. </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00880">FixedPoint.h:880</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="afa783291c0d23cb22ffc494298eef307"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_fixed_point_pixel_wise_multiplication </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_in0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_in1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_out</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>scale</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>fixed_point_position</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a82b8ac759c804bc1fb4e2d21e178fb6f">ConvertPolicy</a>&#160;</td>
<td class="paramname"><em>convert_policy</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#add6426cbf2e057a195846d4ba09a50be">RoundingPolicy</a>&#160;</td>
<td class="paramname"><em>rounding_policy</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference pixel-wise multiplication. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_in0</td><td>Data type of first input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_in1</td><td>Data type of second input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_out</td><td>Data type of the output tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>Scale to apply after multiplication. Must be positive. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fixed_point_position</td><td>Fixed point position that expresses the number of bits for the fractional part of the number. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">convert_policy</td><td>Overflow policy of the operation. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rounding_policy</td><td>Rounding policy of the operation.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00298">298</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="_tensor_operations_8h_source.xhtml#l00617">arm_compute::test::validation::tensor_operations::fixed_point_pixel_wise_multiplication()</a>, and <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>.</p>
<div class="fragment"><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;{</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src1 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_in0, 1, fixed_point_position);</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src2 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_in1, 1, fixed_point_position);</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_out, 1, fixed_point_position);</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160;</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src1, 0);</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src2, 1);</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160;</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#aa07ff8d0956d3fb1a0ff2223d8ab7a93">ReferenceCPP::fixed_point_pixel_wise_multiplication</a>(ref_src1, ref_src2, ref_dst, scale, convert_policy, rounding_policy);</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160;</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_aa07ff8d0956d3fb1a0ff2223d8ab7a93"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#aa07ff8d0956d3fb1a0ff2223d8ab7a93">arm_compute::test::validation::ReferenceCPP::fixed_point_pixel_wise_multiplication</a></div><div class="ttdeci">static void fixed_point_pixel_wise_multiplication(const RawTensor &amp;src1, const RawTensor &amp;src2, RawTensor &amp;dst, float scale, ConvertPolicy convert_policy, RoundingPolicy rounding_policy)</div><div class="ttdoc">Fixed-point Pixel-wise multiplication of src1 by src2. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00190">ReferenceCPP.cpp:190</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="afdf41e10f4ca31603d86ad230c2334a7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_fully_connected_layer </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>input_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>weights_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>bias_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>output_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>transpose_weights</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>fixed_point_position</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference for fully connected layer function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input_shape</td><td>Shape for the input tensor </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">weights_shape</td><td>Shape for the weights tensor </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">bias_shape</td><td>Shape for the bias tensor </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">output_shape</td><td>Shape for the output tensor </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt</td><td>Data type to use </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">transpose_weights</td><td>Transpose the weights if true </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fixed_point_position</td><td>Number of bits for the fractional part of the fixed point numbers</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00435">435</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::F32</a>, <a class="el" href="_tensor_operations_8h_source.xhtml#l00899">arm_compute::test::validation::tensor_operations::fully_connected_layer()</a>, <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00074">TensorShape::set()</a>, <a class="el" href="_dimensions_8h_source.xhtml#l00081">Dimensions&lt; T &gt;::x()</a>, and <a class="el" href="_dimensions_8h_source.xhtml#l00086">Dimensions&lt; T &gt;::y()</a>.</p>
<div class="fragment"><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>&#160;{</div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(input_shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_bias = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(bias_shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(output_shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>&#160;</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>&#160; <span class="comment">// Swap the first and second dimension of weights&#39; shape if transpose_weights is true</span></div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>&#160; TensorShape ws = weights_shape;</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>&#160; <span class="keywordflow">if</span>(transpose_weights)</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>&#160; {</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> dimx = ws.x();</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>&#160; ws.set(0, ws.y());</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>&#160; ws.set(1, dimx);</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>&#160; }</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>&#160;</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_weights = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(ws, dt, 1, fixed_point_position);</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>&#160;</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>&#160; <span class="keywordflow">if</span>(dt == <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>)</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>&#160; {</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>&#160; std::uniform_real_distribution&lt;&gt; distribution(-1.0f, 1.0f);</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_src, distribution, 0);</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_weights, distribution, 1);</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_bias, distribution, 2);</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>&#160; }</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>&#160; {</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src, 0);</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_weights, 1);</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_bias, 2);</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>&#160; }</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>&#160;</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a69eb15dea2a0579d8c33e2b9e07a2fb1">ReferenceCPP::fully_connected_layer</a>(ref_src, ref_weights, ref_bias, ref_dst);</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>&#160;</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::Format::F32</a></div><div class="ttdoc">1 channel, 1 F16 per channel </div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a69eb15dea2a0579d8c33e2b9e07a2fb1"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a69eb15dea2a0579d8c33e2b9e07a2fb1">arm_compute::test::validation::ReferenceCPP::fully_connected_layer</a></div><div class="ttdeci">static void fully_connected_layer(const RawTensor &amp;src, const RawTensor &amp;weights, const RawTensor &amp;bias, RawTensor &amp;dst)</div><div class="ttdoc">Fully connected layer function. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00239">ReferenceCPP.cpp:239</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab3c09c503cb3e94e4475502f4b005a69"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_gemm </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>src_shape1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>src_shape2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>src_shape3</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>dst_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>alpha</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>beta</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>fixed_point_position</em> = <code>0</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute matrix multiply function. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">src_shape1</td><td>First input tensor shape </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">src_shape2</td><td>Second input tensor shape </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">src_shape3</td><td>Third input tensor shape </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">dst_shape</td><td>Output tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">alpha</td><td>Weight of the matrix product </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">beta</td><td>Weight of the third matrix </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt</td><td><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_tensor.xhtml">Tensor</a>'s data type </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fixed_point_position</td><td>(Optional) Number of bits for the fractional part of the fixed point numbers</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed output tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00251">251</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::F32</a>, <a class="el" href="_tensor_operations_8h_source.xhtml#l00506">arm_compute::test::validation::tensor_operations::gemm()</a>, and <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>.</p>
<div class="fragment"><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160;{</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> src1 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(src_shape1, dt, 1, fixed_point_position);</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> src2 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(src_shape2, dt, 1, fixed_point_position);</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> src3 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(src_shape3, dt, 1, fixed_point_position);</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(dst_shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160;</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; <span class="keywordflow">if</span>(dt == <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>)</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; {</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; std::uniform_real_distribution&lt;&gt; distribution(-1.0f, 1.0f);</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(src1, distribution, 0);</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(src2, distribution, 1);</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(src3, distribution, 2);</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; }</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; {</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(src1, 0);</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(src2, 1);</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(src3, 2);</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; }</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160;</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a99422cae0054f3a9d4b6eb87402d8f11">ReferenceCPP::gemm</a>(src1, src2, src3, dst, alpha, beta);</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160;</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; <span class="keywordflow">return</span> dst;</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a99422cae0054f3a9d4b6eb87402d8f11"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a99422cae0054f3a9d4b6eb87402d8f11">arm_compute::test::validation::ReferenceCPP::gemm</a></div><div class="ttdeci">static void gemm(const RawTensor &amp;src1, const RawTensor &amp;src2, const RawTensor &amp;src3, RawTensor &amp;dst, float alpha, float beta)</div><div class="ttdoc">Compute GEMM function. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00169">ReferenceCPP.cpp:169</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::Format::F32</a></div><div class="ttdoc">1 channel, 1 F16 per channel </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a3d1df250d5d15f22e84e7282bd471405"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_integral_image </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference integral image. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00042">42</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="_tensor_operations_8h_source.xhtml#l00225">arm_compute::test::validation::tensor_operations::integral_image()</a>, <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">arm_compute::U32</a>, and <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>.</p>
<div class="fragment"><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;{</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">DataType::U32</a>);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src, 0);</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a600c009e5d449079fed05eb741e2e943">ReferenceCPP::integral_image</a>(ref_src, ref_dst);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">Unknown image format. </div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a600c009e5d449079fed05eb741e2e943"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a600c009e5d449079fed05eb741e2e943">arm_compute::test::validation::ReferenceCPP::integral_image</a></div><div class="ttdeci">static void integral_image(const RawTensor &amp;src, RawTensor &amp;dst)</div><div class="ttdoc">Function to compute the integral image of a tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00060">ReferenceCPP.cpp:60</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">arm_compute::Format::U32</a></div><div class="ttdoc">1 channel, 1 S32 per channel </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a5608631245f2553eff505acf4c18b5c8"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_normalization_layer </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_normalization_layer_info.xhtml">NormalizationLayerInfo</a>&#160;</td>
<td class="paramname"><em>norm_info</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>fixed_point_position</em> = <code>0</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference normalization layer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt</td><td>Data type of input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">norm_info</td><td>Normalization Layer information. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fixed_point_position</td><td>(Optional) Fixed point position that expresses the number of bits for the fractional part of the number when the tensor's data type is QS8 or QS16 (default = 0).</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00475">475</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, <a class="el" href="_tensor_operations_8h_source.xhtml#l00921">arm_compute::test::validation::tensor_operations::normalization_layer()</a>, and <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">arm_compute::QS8</a>.</p>
<div class="fragment"><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>&#160;{</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>&#160;</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>&#160; <span class="keywordflow">if</span>(dt == <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">DataType::QS8</a>)</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>&#160; {</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>&#160; <span class="keyword">const</span> int8_t one_fixed_point = 1 &lt;&lt; fixed_point_position;</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>&#160; <span class="keyword">const</span> int8_t minus_one_fixed_point = -one_fixed_point;</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src, 0, minus_one_fixed_point, one_fixed_point);</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>&#160; }</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>&#160; {</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src, 0);</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>&#160; }</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>&#160;</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a7552cc54ae47676e4ea4842233d79587">ReferenceCPP::normalization_layer</a>(ref_src, ref_dst, norm_info);</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>&#160;</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">arm_compute::DataType::QS8</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a7552cc54ae47676e4ea4842233d79587"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a7552cc54ae47676e4ea4842233d79587">arm_compute::test::validation::ReferenceCPP::normalization_layer</a></div><div class="ttdeci">static void normalization_layer(const RawTensor &amp;src, RawTensor &amp;dst, NormalizationLayerInfo norm_info)</div><div class="ttdoc">Normalization of src based on the information from norm_info. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00249">ReferenceCPP.cpp:249</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab94a052a7a342ed76c16bedc97befa87"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_pixel_wise_multiplication </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_in0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_in1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt_out</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>scale</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a82b8ac759c804bc1fb4e2d21e178fb6f">ConvertPolicy</a>&#160;</td>
<td class="paramname"><em>convert_policy</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#add6426cbf2e057a195846d4ba09a50be">RoundingPolicy</a>&#160;</td>
<td class="paramname"><em>rounding_policy</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference pixel-wise multiplication. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_in0</td><td>Data type of first input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_in1</td><td>Data type of second input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt_out</td><td>Data type of the output tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>Non-negative scale. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">convert_policy</td><td>Overflow policy of the operation. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rounding_policy</td><td>Rounding policy of the operation.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00280">280</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, and <a class="el" href="_tensor_operations_8h_source.xhtml#l00579">arm_compute::test::validation::tensor_operations::pixel_wise_multiplication()</a>.</p>
<div class="fragment"><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;{</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src1 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_in0);</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src2 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_in1);</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt_out);</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src1, 0);</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src2, 1);</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160;</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a2265d2e4d72f0095de962e5d9c5f9dc2">ReferenceCPP::pixel_wise_multiplication</a>(ref_src1, ref_src2, ref_dst, scale, convert_policy, rounding_policy);</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a2265d2e4d72f0095de962e5d9c5f9dc2"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a2265d2e4d72f0095de962e5d9c5f9dc2">arm_compute::test::validation::ReferenceCPP::pixel_wise_multiplication</a></div><div class="ttdeci">static void pixel_wise_multiplication(const RawTensor &amp;src1, const RawTensor &amp;src2, RawTensor &amp;dst, float scale, ConvertPolicy convert_policy, RoundingPolicy rounding_policy)</div><div class="ttdoc">Element-wise multiplication of src1, src2 and scale. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00181">ReferenceCPP.cpp:181</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ab40feee52f91c245e51c1ad9f6bf0b43"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_pooling_layer </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape_in</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape_out</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_pooling_layer_info.xhtml">PoolingLayerInfo</a>&#160;</td>
<td class="paramname"><em>pool_info</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>fixed_point_position</em> = <code>0</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference pooling layer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape_in</td><td>Shape of the input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">shape_out</td><td>Shape of the output tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt</td><td>Data type of input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pool_info</td><td>Pooling Layer information. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fixed_point_position</td><td>(Optional) Number of bits for the fractional part of the fixed point numbers.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00499">499</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="_error_8h_source.xhtml#l00031">ARM_COMPUTE_ERROR</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::F32</a>, <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00880">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00875">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, <a class="el" href="_tensor_operations_8h_source.xhtml#l01123">arm_compute::test::validation::tensor_operations::pooling_layer()</a>, and <a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">arm_compute::QS8</a>.</p>
<div class="fragment"><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>&#160;{</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape_in, dt, 1, fixed_point_position);</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape_out, dt, 1, fixed_point_position);</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>&#160;</div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>&#160; <span class="keywordtype">int</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a> = 0;</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>&#160; <span class="keywordtype">int</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a> = 0;</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>&#160; <span class="keywordflow">switch</span>(dt)</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>&#160; {</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>:</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>&#160; min = -1;</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>&#160; max = 1;</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">DataType::QS8</a>:</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>&#160; min = -(1 &lt;&lt; fixed_point_position);</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>&#160; max = (1 &lt;&lt; fixed_point_position);</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>&#160; <span class="keywordflow">default</span>:</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>&#160; <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;DataType not supported.&quot;</span>);</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>&#160; }</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>&#160; std::uniform_real_distribution&lt;&gt; distribution(min, max);</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_src, distribution, 0.0);</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>&#160;</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#ae158c03947db37d706260574866586e8">ReferenceCPP::pooling_layer</a>(ref_src, ref_dst, pool_info, fixed_point_position);</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>&#160;</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00031">Error.h:31</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aabcf39e3917f842dbc5fbb0d802f24d5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">arm_compute::test::fixed_point_arithmetic::detail::min</a></div><div class="ttdeci">fixed_point&lt; T &gt; min(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00875">FixedPoint.h:875</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_ae158c03947db37d706260574866586e8"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#ae158c03947db37d706260574866586e8">arm_compute::test::validation::ReferenceCPP::pooling_layer</a></div><div class="ttdeci">static void pooling_layer(const RawTensor &amp;src, RawTensor &amp;dst, PoolingLayerInfo pool_info, int fixed_point_position=0)</div><div class="ttdoc">Pooling layer of src based on the information from norm_info. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00257">ReferenceCPP.cpp:257</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">arm_compute::DataType::QS8</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::Format::F32</a></div><div class="ttdoc">1 channel, 1 F16 per channel </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00880">FixedPoint.h:880</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ae50cb3ee700120b699894d9a3ae9405e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_softmax_layer </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td>
<td class="paramname"><em>dt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>fixed_point_position</em> = <code>0</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference softmax layer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dt</td><td>Data type of input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">fixed_point_position</td><td>(Optional) Number of bits for the fractional part of the fixed point numbers</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00530">530</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="arm__compute_2core_2_utils_8h_source.xhtml#l00640">arm_compute::is_data_type_float()</a>, <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, and <a class="el" href="_tensor_operations_8h_source.xhtml#l01240">arm_compute::test::validation::tensor_operations::softmax_layer()</a>.</p>
<div class="fragment"><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>&#160;{</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, dt, 1, fixed_point_position);</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>&#160;</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>&#160; <span class="keywordflow">if</span>(<a class="code" href="namespacearm__compute.xhtml#af5982a092e9eb743fce2d6392bdd8897">arm_compute::is_data_type_float</a>(dt))</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>&#160; {</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>&#160; std::uniform_real_distribution&lt;&gt; distribution(-10, 10);</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_src, distribution, 0);</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>&#160; }</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>&#160; {</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>&#160; <span class="keywordtype">int</span> one_fixed = 1 &lt;&lt; fixed_point_position;</div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>&#160; std::uniform_int_distribution&lt;&gt; distribution(-one_fixed, one_fixed);</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill(ref_src, distribution, 0);</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span>&#160; }</div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span>&#160;</div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#aa3379b88d6d53ab3c1d89b3df4f0dd4a">ReferenceCPP::softmax_layer</a>(ref_src, ref_dst);</div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span>&#160;</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_aa3379b88d6d53ab3c1d89b3df4f0dd4a"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#aa3379b88d6d53ab3c1d89b3df4f0dd4a">arm_compute::test::validation::ReferenceCPP::softmax_layer</a></div><div class="ttdeci">static void softmax_layer(const RawTensor &amp;src, RawTensor &amp;dst)</div><div class="ttdoc">Softmax Layer of src. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00265">ReferenceCPP.cpp:265</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_af5982a092e9eb743fce2d6392bdd8897"><div class="ttname"><a href="namespacearm__compute.xhtml#af5982a092e9eb743fce2d6392bdd8897">arm_compute::is_data_type_float</a></div><div class="ttdeci">bool is_data_type_float(DataType dt)</div><div class="ttdoc">Check if a given data type is of floating point type. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_utils_8h_source.xhtml#l00640">Utils.h:640</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac58967d13dc282d5ebf11f54e5605b8e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> compute_reference_threshold </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>threshold</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>false_value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>true_value</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a3e6b23e675649b83240691abbc42a649">ThresholdType</a>&#160;</td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&#160;</td>
<td class="paramname"><em>upper</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute reference threshold. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">shape</td><td>Shape of the input and output tensors. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">threshold</td><td>Threshold. When the threshold type is RANGE, this is used as the lower threshold. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">false_value</td><td>value to set when the condition is not respected. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">true_value</td><td>value to set when the condition is respected. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>Thresholding type. Either RANGE or BINARY. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">upper</td><td>Upper threshold. Only used when the thresholding type is RANGE.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Computed raw tensor. </dd></dl>
<p>Definition at line <a class="el" href="_reference_8cpp_source.xhtml#l00316">316</a> of file <a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a>.</p>
<p>References <a class="el" href="benchmark_2main_8cpp_source.xhtml#l00050">arm_compute::test::library</a>, <a class="el" href="_tensor_operations_8h_source.xhtml#l00651">arm_compute::test::validation::tensor_operations::threshold()</a>, and <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::U8</a>.</p>
<div class="fragment"><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160;{</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_src1 = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">RawTensor</a> ref_dst = <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;get(shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>);</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160;</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; <span class="comment">// Fill reference</span></div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; <a class="code" href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">library</a>-&gt;fill_tensor_uniform(ref_src1, 0);</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160;</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; <span class="comment">// Compute reference</span></div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a0dbabc9ed277607491fa75e1b8096132">ReferenceCPP::threshold</a>(ref_src1, ref_dst, <a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1tensor__operations.xhtml#aa2a75d7fb5a1cca91d6eab7888fc3431">threshold</a>, false_value, true_value, type, upper);</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160;</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; <span class="keywordflow">return</span> ref_dst;</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1test_1_1_raw_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_raw_tensor.xhtml">arm_compute::test::RawTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_raw_tensor_8h_source.xhtml#l00047">RawTensor.h:47</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">Unknown image format. </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_1_1tensor__operations_xhtml_aa2a75d7fb5a1cca91d6eab7888fc3431"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation_1_1tensor__operations.xhtml#aa2a75d7fb5a1cca91d6eab7888fc3431">arm_compute::test::validation::tensor_operations::threshold</a></div><div class="ttdeci">void threshold(const Tensor&lt; T &gt; &amp;in, Tensor&lt; T &gt; &amp;out, uint8_t threshold, uint8_t false_value, uint8_t true_value, ThresholdType type, uint8_t upper)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_operations_8h_source.xhtml#l00651">TensorOperations.h:651</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p_xhtml_a0dbabc9ed277607491fa75e1b8096132"><div class="ttname"><a href="classarm__compute_1_1test_1_1validation_1_1_reference_c_p_p.xhtml#a0dbabc9ed277607491fa75e1b8096132">arm_compute::test::validation::ReferenceCPP::threshold</a></div><div class="ttdeci">static void threshold(const RawTensor &amp;src, RawTensor &amp;dst, uint8_t threshold, uint8_t false_value, uint8_t true_value, ThresholdType type, uint8_t upper)</div><div class="ttdoc">Threshold ofsrc to dst. </div><div class="ttdef"><b>Definition:</b> <a href="_reference_c_p_p_8cpp_source.xhtml#l00199">ReferenceCPP.cpp:199</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4ced6442a379a75e8a6c4be093fb666b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4ced6442a379a75e8a6c4be093fb666b">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr&lt; TensorLibrary &gt; library</div><div class="ttdef"><b>Definition:</b> <a href="benchmark_2main_8cpp_source.xhtml#l00050">main.cpp:50</a></div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>tests/validation/<a class="el" href="_reference_8h_source.xhtml">Reference.h</a></li>
<li>tests/validation/<a class="el" href="_reference_8cpp_source.xhtml">Reference.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test.xhtml">test</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test_1_1validation.xhtml">validation</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1test_1_1validation_1_1_reference.xhtml">Reference</a></li>
<li class="footer">Generated on Fri Jun 23 2017 15:44:36 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>
</div>
</body>
</html>