blob: b7d53cd81b5a3fe74cf5209b19475bbd0949d78c [file]
<!-- 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: QuantizationInfo Struct 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">18.08</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('structarm__compute_1_1_quantization_info.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-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Data Fields</a> </div>
<div class="headertitle">
<div class="title">QuantizationInfo Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Quantization settings (used for QASYMM8 data type)
<a href="structarm__compute_1_1_quantization_info.xhtml#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="arm__compute_2core_2_types_8h_source.xhtml">Types.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a842ac5aa8863f371e40dbe93936c115c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1_quantization_info.xhtml#a842ac5aa8863f371e40dbe93936c115c">QuantizationInfo</a> () noexcept</td></tr>
<tr class="memdesc:a842ac5aa8863f371e40dbe93936c115c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <a href="#a842ac5aa8863f371e40dbe93936c115c">More...</a><br /></td></tr>
<tr class="separator:a842ac5aa8863f371e40dbe93936c115c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af565d3fc3f7d82e9ed5e36dda5377eab"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1_quantization_info.xhtml#af565d3fc3f7d82e9ed5e36dda5377eab">QuantizationInfo</a> (float <a class="el" href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">scale</a>, int <a class="el" href="structarm__compute_1_1_quantization_info.xhtml#aed7ea92f45bd273dde380a45ddced592">offset</a>)</td></tr>
<tr class="memdesc:af565d3fc3f7d82e9ed5e36dda5377eab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct quantization info. <a href="#af565d3fc3f7d82e9ed5e36dda5377eab">More...</a><br /></td></tr>
<tr class="separator:af565d3fc3f7d82e9ed5e36dda5377eab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28c9ca2cba95f7a1d38a0ad2afd11916"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1_quantization_info.xhtml#a28c9ca2cba95f7a1d38a0ad2afd11916">operator==</a> (const <a class="el" href="structarm__compute_1_1_quantization_info.xhtml">QuantizationInfo</a> &amp;other)</td></tr>
<tr class="memdesc:a28c9ca2cba95f7a1d38a0ad2afd11916"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether equal to a given quantization info. <a href="#a28c9ca2cba95f7a1d38a0ad2afd11916">More...</a><br /></td></tr>
<tr class="separator:a28c9ca2cba95f7a1d38a0ad2afd11916"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af63bc167068077a5945672776b472268"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1_quantization_info.xhtml#af63bc167068077a5945672776b472268">operator!=</a> (const <a class="el" href="structarm__compute_1_1_quantization_info.xhtml">QuantizationInfo</a> &amp;other)</td></tr>
<tr class="memdesc:af63bc167068077a5945672776b472268"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether not equal to a given quantization info. <a href="#af63bc167068077a5945672776b472268">More...</a><br /></td></tr>
<tr class="separator:af63bc167068077a5945672776b472268"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d7963ab10dad56e241cf6bb66625856"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearm__compute.xhtml#ab8938bcb3ec0f5f8d93285eb3a28b701">qasymm8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1_quantization_info.xhtml#a0d7963ab10dad56e241cf6bb66625856">quantize</a> (float value, <a class="el" href="namespacearm__compute.xhtml#add6426cbf2e057a195846d4ba09a50be">RoundingPolicy</a> rounding_policy) const </td></tr>
<tr class="memdesc:a0d7963ab10dad56e241cf6bb66625856"><td class="mdescLeft">&#160;</td><td class="mdescRight">Quantizes a value using the scale/offset in this <a class="el" href="structarm__compute_1_1_quantization_info.xhtml" title="Quantization settings (used for QASYMM8 data type) ">QuantizationInfo</a>. <a href="#a0d7963ab10dad56e241cf6bb66625856">More...</a><br /></td></tr>
<tr class="separator:a0d7963ab10dad56e241cf6bb66625856"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f956adfa6525f0edd3c702e7e5afb8f"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1_quantization_info.xhtml#a9f956adfa6525f0edd3c702e7e5afb8f">dequantize</a> (<a class="el" href="namespacearm__compute.xhtml#ab8938bcb3ec0f5f8d93285eb3a28b701">qasymm8_t</a> value) const </td></tr>
<tr class="memdesc:a9f956adfa6525f0edd3c702e7e5afb8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dequantizes a value using the scale/offset in this <a class="el" href="structarm__compute_1_1_quantization_info.xhtml" title="Quantization settings (used for QASYMM8 data type) ">QuantizationInfo</a>. <a href="#a9f956adfa6525f0edd3c702e7e5afb8f">More...</a><br /></td></tr>
<tr class="separator:a9f956adfa6525f0edd3c702e7e5afb8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6e61de369e994009e36f344f99c15ad"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1_quantization_info.xhtml#ac6e61de369e994009e36f344f99c15ad">empty</a> () const </td></tr>
<tr class="memdesc:ac6e61de369e994009e36f344f99c15ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicates whether this <a class="el" href="structarm__compute_1_1_quantization_info.xhtml" title="Quantization settings (used for QASYMM8 data type) ">QuantizationInfo</a> has valid settings or not. <a href="#ac6e61de369e994009e36f344f99c15ad">More...</a><br /></td></tr>
<tr class="separator:ac6e61de369e994009e36f344f99c15ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a1d28dec57cce925ad92342891bd71e7c"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">scale</a></td></tr>
<tr class="memdesc:a1d28dec57cce925ad92342891bd71e7c"><td class="mdescLeft">&#160;</td><td class="mdescRight">scale <a href="#a1d28dec57cce925ad92342891bd71e7c">More...</a><br /></td></tr>
<tr class="separator:a1d28dec57cce925ad92342891bd71e7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed7ea92f45bd273dde380a45ddced592"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structarm__compute_1_1_quantization_info.xhtml#aed7ea92f45bd273dde380a45ddced592">offset</a></td></tr>
<tr class="memdesc:aed7ea92f45bd273dde380a45ddced592"><td class="mdescLeft">&#160;</td><td class="mdescRight">offset <a href="#aed7ea92f45bd273dde380a45ddced592">More...</a><br /></td></tr>
<tr class="separator:aed7ea92f45bd273dde380a45ddced592"><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>Quantization settings (used for QASYMM8 data type) </p>
<p>Definition at line <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00124">124</a> of file <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml">Types.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a842ac5aa8863f371e40dbe93936c115c"></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="structarm__compute_1_1_quantization_info.xhtml">QuantizationInfo</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor. </p>
<p>Definition at line <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00127">127</a> of file <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml">Types.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; : <a class="code" href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">scale</a>(0.0f),</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <a class="code" href="structarm__compute_1_1_quantization_info.xhtml#aed7ea92f45bd273dde380a45ddced592">offset</a>(0)</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; {</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; }</div><div class="ttc" id="structarm__compute_1_1_quantization_info_xhtml_a1d28dec57cce925ad92342891bd71e7c"><div class="ttname"><a href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">arm_compute::QuantizationInfo::scale</a></div><div class="ttdeci">float scale</div><div class="ttdoc">scale </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00165">Types.h:165</a></div></div>
<div class="ttc" id="structarm__compute_1_1_quantization_info_xhtml_aed7ea92f45bd273dde380a45ddced592"><div class="ttname"><a href="structarm__compute_1_1_quantization_info.xhtml#aed7ea92f45bd273dde380a45ddced592">arm_compute::QuantizationInfo::offset</a></div><div class="ttdeci">int offset</div><div class="ttdoc">offset </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00166">Types.h:166</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af565d3fc3f7d82e9ed5e36dda5377eab"></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="structarm__compute_1_1_quantization_info.xhtml">QuantizationInfo</a> </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>offset</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">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct quantization info. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>Scale. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>Offset. </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00138">138</a> of file <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml">Types.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; : <a class="code" href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">scale</a>(<a class="code" href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">scale</a>), <a class="code" href="structarm__compute_1_1_quantization_info.xhtml#aed7ea92f45bd273dde380a45ddced592">offset</a>(<a class="code" href="structarm__compute_1_1_quantization_info.xhtml#aed7ea92f45bd273dde380a45ddced592">offset</a>)</div><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; }</div><div class="ttc" id="structarm__compute_1_1_quantization_info_xhtml_a1d28dec57cce925ad92342891bd71e7c"><div class="ttname"><a href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">arm_compute::QuantizationInfo::scale</a></div><div class="ttdeci">float scale</div><div class="ttdoc">scale </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00165">Types.h:165</a></div></div>
<div class="ttc" id="structarm__compute_1_1_quantization_info_xhtml_aed7ea92f45bd273dde380a45ddced592"><div class="ttname"><a href="structarm__compute_1_1_quantization_info.xhtml#aed7ea92f45bd273dde380a45ddced592">arm_compute::QuantizationInfo::offset</a></div><div class="ttdeci">int offset</div><div class="ttdoc">offset </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00166">Types.h:166</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a9f956adfa6525f0edd3c702e7e5afb8f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">float dequantize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#ab8938bcb3ec0f5f8d93285eb3a28b701">qasymm8_t</a>&#160;</td>
<td class="paramname"><em>value</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Dequantizes a value using the scale/offset in this <a class="el" href="structarm__compute_1_1_quantization_info.xhtml" title="Quantization settings (used for QASYMM8 data type) ">QuantizationInfo</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>Value to dequantize.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the original value before quantization. </dd></dl>
<p>Definition at line <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00187">187</a> of file <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml">Types.h</a>.</p>
<p>References <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON_MSG</a>.</p>
<p>Referenced by <a class="el" href="_helpers_8cpp_source.xhtml#l00150">arm_compute::test::validation::convert_from_asymmetric()</a>.</p>
<div class="fragment"><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; {</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(<a class="code" href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">scale</a> == 0, <span class="stringliteral">&quot;QuantizationInfo::dequantize: scale == 0&quot;</span>);</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <span class="keywordflow">return</span> scvt_f32_qasymm8(value, <a class="code" href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">scale</a>, <a class="code" href="structarm__compute_1_1_quantization_info.xhtml#aed7ea92f45bd273dde380a45ddced592">offset</a>);</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; }</div><div class="ttc" id="structarm__compute_1_1_quantization_info_xhtml_a1d28dec57cce925ad92342891bd71e7c"><div class="ttname"><a href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">arm_compute::QuantizationInfo::scale</a></div><div class="ttdeci">float scale</div><div class="ttdoc">scale </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00165">Types.h:165</a></div></div>
<div class="ttc" id="structarm__compute_1_1_quantization_info_xhtml_aed7ea92f45bd273dde380a45ddced592"><div class="ttname"><a href="structarm__compute_1_1_quantization_info.xhtml#aed7ea92f45bd273dde380a45ddced592">arm_compute::QuantizationInfo::offset</a></div><div class="ttdeci">int offset</div><div class="ttdoc">offset </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00166">Types.h:166</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00328">Error.h:328</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="ac6e61de369e994009e36f344f99c15ad"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool empty </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Indicates whether this <a class="el" href="structarm__compute_1_1_quantization_info.xhtml" title="Quantization settings (used for QASYMM8 data type) ">QuantizationInfo</a> has valid settings or not. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the this has invalid settings. </dd></dl>
<p>Definition at line <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00197">197</a> of file <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml">Types.h</a>.</p>
<p>Referenced by <a class="el" href="_helpers_8inl_source.xhtml#l00278">arm_compute::set_quantization_info_if_empty()</a>.</p>
<div class="fragment"><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; {</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">scale</a> == 0;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; }</div><div class="ttc" id="structarm__compute_1_1_quantization_info_xhtml_a1d28dec57cce925ad92342891bd71e7c"><div class="ttname"><a href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">arm_compute::QuantizationInfo::scale</a></div><div class="ttdeci">float scale</div><div class="ttdoc">scale </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00165">Types.h:165</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="af63bc167068077a5945672776b472268"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator!= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structarm__compute_1_1_quantization_info.xhtml">QuantizationInfo</a> &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Check whether not equal to a given quantization info. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>Other quantization info.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the given quantization info is not the same. </dd></dl>
<p>Definition at line <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00160">160</a> of file <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml">Types.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; {</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == other);</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; }</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a28c9ca2cba95f7a1d38a0ad2afd11916"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator== </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structarm__compute_1_1_quantization_info.xhtml">QuantizationInfo</a> &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Check whether equal to a given quantization info. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>Other quantization info.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the given quantization info is the same. </dd></dl>
<p>Definition at line <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00149">149</a> of file <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml">Types.h</a>.</p>
<p>References <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00166">QuantizationInfo::offset</a>, <a class="el" href="helpers_8h_source.xhtml#l00311">offset()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00165">QuantizationInfo::scale</a>, and <a class="el" href="_n_e_o_n_2_pixel_wise_multiplication_8cpp_source.xhtml#l00168">arm_compute::test::validation::scale</a>.</p>
<div class="fragment"><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; {</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">scale</a> == other.scale &amp;&amp; <a class="code" href="structarm__compute_1_1_quantization_info.xhtml#aed7ea92f45bd273dde380a45ddced592">offset</a> == other.offset;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; }</div><div class="ttc" id="structarm__compute_1_1_quantization_info_xhtml_a1d28dec57cce925ad92342891bd71e7c"><div class="ttname"><a href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">arm_compute::QuantizationInfo::scale</a></div><div class="ttdeci">float scale</div><div class="ttdoc">scale </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00165">Types.h:165</a></div></div>
<div class="ttc" id="structarm__compute_1_1_quantization_info_xhtml_aed7ea92f45bd273dde380a45ddced592"><div class="ttname"><a href="structarm__compute_1_1_quantization_info.xhtml#aed7ea92f45bd273dde380a45ddced592">arm_compute::QuantizationInfo::offset</a></div><div class="ttdeci">int offset</div><div class="ttdoc">offset </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00166">Types.h:166</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a0d7963ab10dad56e241cf6bb66625856"></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="namespacearm__compute.xhtml#ab8938bcb3ec0f5f8d93285eb3a28b701">qasymm8_t</a> quantize </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>value</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> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Quantizes a value using the scale/offset in this <a class="el" href="structarm__compute_1_1_quantization_info.xhtml" title="Quantization settings (used for QASYMM8 data type) ">QuantizationInfo</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>Value to quantize. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rounding_policy</td><td>Policy to use when rounding.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the quantized value. </dd></dl>
<p>Definition at line <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00175">175</a> of file <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml">Types.h</a>.</p>
<p>References <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON_MSG</a>.</p>
<div class="fragment"><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; {</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(<a class="code" href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">scale</a> == 0, <span class="stringliteral">&quot;QuantizationInfo::quantize: scale == 0&quot;</span>);</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="keywordflow">return</span> sqcvt_qasymm8_f32(value, <a class="code" href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">scale</a>, <a class="code" href="structarm__compute_1_1_quantization_info.xhtml#aed7ea92f45bd273dde380a45ddced592">offset</a>, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a60ad1078faeaf3f59266d69ad937339f">rounding_policy</a>);</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; }</div><div class="ttc" id="structarm__compute_1_1_quantization_info_xhtml_a1d28dec57cce925ad92342891bd71e7c"><div class="ttname"><a href="structarm__compute_1_1_quantization_info.xhtml#a1d28dec57cce925ad92342891bd71e7c">arm_compute::QuantizationInfo::scale</a></div><div class="ttdeci">float scale</div><div class="ttdoc">scale </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00165">Types.h:165</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a60ad1078faeaf3f59266d69ad937339f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a60ad1078faeaf3f59266d69ad937339f">arm_compute::test::validation::rounding_policy</a></div><div class="ttdeci">rounding_policy</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_pixel_wise_multiplication_8cpp_source.xhtml#l00168">PixelWiseMultiplication.cpp:168</a></div></div>
<div class="ttc" id="structarm__compute_1_1_quantization_info_xhtml_aed7ea92f45bd273dde380a45ddced592"><div class="ttname"><a href="structarm__compute_1_1_quantization_info.xhtml#aed7ea92f45bd273dde380a45ddced592">arm_compute::QuantizationInfo::offset</a></div><div class="ttdeci">int offset</div><div class="ttdoc">offset </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00166">Types.h:166</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00328">Error.h:328</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Field Documentation</h2>
<a class="anchor" id="aed7ea92f45bd273dde380a45ddced592"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int offset</td>
</tr>
</table>
</div><div class="memdoc">
<p>offset </p>
<p>Definition at line <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00166">166</a> of file <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml">Types.h</a>.</p>
<p>Referenced by <a class="el" href="validation_2reference_2_depthwise_convolution_layer_8cpp_source.xhtml#l00121">arm_compute::test::validation::reference::depthwise_convolution()</a>, <a class="el" href="utils_2_type_printer_8h_source.xhtml#l00230">arm_compute::operator&lt;&lt;()</a>, and <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00149">QuantizationInfo::operator==()</a>.</p>
</div>
</div>
<a class="anchor" id="a1d28dec57cce925ad92342891bd71e7c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">float scale</td>
</tr>
</table>
</div><div class="memdoc">
<p>scale </p>
<p>Definition at line <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00165">165</a> of file <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml">Types.h</a>.</p>
<p>Referenced by <a class="el" href="validation_2reference_2_depthwise_convolution_layer_8cpp_source.xhtml#l00121">arm_compute::test::validation::reference::depthwise_convolution()</a>, <a class="el" href="utils_2_type_printer_8h_source.xhtml#l00230">arm_compute::operator&lt;&lt;()</a>, and <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l00149">QuantizationInfo::operator==()</a>.</p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>arm_compute/core/<a class="el" href="arm__compute_2core_2_types_8h_source.xhtml">Types.h</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="structarm__compute_1_1_quantization_info.xhtml">QuantizationInfo</a></li>
<li class="footer">Generated on Wed Aug 29 2018 15:31:50 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>