arm_compute v19.05
diff --git a/documentation/pooling__layer__quantized_8cl.xhtml b/documentation/pooling__layer__quantized_8cl.xhtml
index 9151090..e398f55 100644
--- a/documentation/pooling__layer__quantized_8cl.xhtml
+++ b/documentation/pooling__layer__quantized_8cl.xhtml
@@ -40,7 +40,7 @@
<img alt="Compute Library" src="https://raw.githubusercontent.com/ARM-software/ComputeLibrary/gh-pages/ACL_logo.png" style="max-width: 100%;margin-top: 15px;margin-left: 10px"/>
<td style="padding-left: 0.5em;">
<div id="projectname">
-  <span id="projectnumber">19.02</span>
+  <span id="projectnumber">19.05</span>
</div>
</td>
</tr>
@@ -156,7 +156,7 @@
</table>
</div><div class="memdoc">
-<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00032">32</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
+<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00047">47</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
</div>
</div>
@@ -186,7 +186,7 @@
</table>
</div><div class="memdoc">
-<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00034">34</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
+<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00049">49</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
</div>
</div>
@@ -216,7 +216,7 @@
</table>
</div><div class="memdoc">
-<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00027">27</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
+<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00042">42</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
</div>
</div>
@@ -283,9 +283,9 @@
</table>
</div><div class="memdoc">
-<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00040">40</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
-<div class="fragment"><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> {</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordtype">int</span> start_x = get_global_id(0) * stride_x - pad_x;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordtype">int</span> start_y = get_global_id(1) * stride_y - pad_y;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> end_x = min(start_x + pool_size_x, upper_bound_w);</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> end_y = min(start_y + pool_size_y, upper_bound_h);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor">#if defined(EXCLUDE_PADDING)</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  start_x = max(0, start_x);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  start_y = max(0, start_y);</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(EXCLUDE_PADDING) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordflow">return</span> ((end_y - start_y) * (end_x - start_x));</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> }</div></div><!-- fragment -->
-<p class="reference">Referenced by <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00080">pooling_layer_MxN_quantized_nchw()</a>.</p>
+<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00055">55</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
+<div class="fragment"><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> {</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keywordtype">int</span> start_x = get_global_id(0) * stride_x - pad_x;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keywordtype">int</span> start_y = get_global_id(1) * stride_y - pad_y;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> end_x = min(start_x + pool_size_x, upper_bound_w);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> end_y = min(start_y + pool_size_y, upper_bound_h);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> <span class="preprocessor">#if defined(EXCLUDE_PADDING)</span></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  start_x = max(0, start_x);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  start_y = max(0, start_y);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(EXCLUDE_PADDING) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">return</span> ((end_y - start_y) * (end_x - start_x));</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> }</div></div><!-- fragment -->
+<p class="reference">Referenced by <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00095">pooling_layer_MxN_quantized_nchw()</a>.</p>
</div>
</div>
@@ -351,9 +351,9 @@
</table>
</div><div class="memdoc">
-<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00125">125</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
-<div class="fragment"><div class="line"><a name="l00127"></a><span class="lineno"> 127</span> {</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordtype">int</span> start_x = get_global_id(1) * stride_x - pad_x;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span> <span class="preprocessor">#if defined(DST_DEPTH)</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keywordtype">int</span> start_y = (get_global_id(2) % DST_DEPTH) * stride_y - pad_y;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="preprocessor">#else </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordtype">int</span> start_y = get_global_id(2) * stride_y - pad_y;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> </div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> end_x = min(start_x + pool_size_x, upper_bound_w);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> end_y = min(start_y + pool_size_y, upper_bound_h);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span> </div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  start_x = max(0, start_x);</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  start_y = max(0, start_y);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span> </div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">return</span> ((end_y - start_y) * (end_x - start_x));</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span> }</div></div><!-- fragment -->
-<p class="reference">Referenced by <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00174">pooling_layer_MxN_quantized_nhwc()</a>.</p>
+<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00154">154</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
+<div class="fragment"><div class="line"><a name="l00156"></a><span class="lineno"> 156</span> {</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordtype">int</span> start_x = get_global_id(1) * stride_x - pad_x;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="preprocessor">#if defined(DST_DEPTH)</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keywordtype">int</span> start_y = (get_global_id(2) % DST_DEPTH) * stride_y - pad_y;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span> <span class="preprocessor">#else </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="keywordtype">int</span> start_y = get_global_id(2) * stride_y - pad_y;</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span> </div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> end_x = min(start_x + pool_size_x, upper_bound_w);</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> end_y = min(start_y + pool_size_y, upper_bound_h);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  start_x = max(0, start_x);</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  start_y = max(0, start_y);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span> </div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keywordflow">return</span> ((end_y - start_y) * (end_x - start_x));</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span> }</div></div><!-- fragment -->
+<p class="reference">Referenced by <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00203">pooling_layer_MxN_quantized_nhwc()</a>.</p>
</div>
</div>
@@ -493,17 +493,19 @@
</dd>
</dl>
-<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00080">80</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
-<div class="fragment"><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> {</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> input = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(input);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> output = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(output);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  int8 vdata = 0;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keywordtype">int</span> sdata = 0;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="comment">// Load data</span></div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> y = 0; y < POOL_SIZE_Y; y++)</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  {</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordtype">int</span> x = 0;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordflow">for</span>(; x <= ((int)POOL_SIZE_X - 8); x += 8)</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  {</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  uchar8 data = vload8(0, (__global uchar *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&input, x, y, 0));</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  int8 data0 = convert_int8(data);</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  vdata = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(vdata, data0);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  }</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="comment">// Leftover</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keywordflow">for</span>(; x < (int)POOL_SIZE_X; ++x)</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  {</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  uchar data = *((__global uchar *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&input, x, y, 0));</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keywordtype">int</span> data0 = convert_int(data);</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  sdata = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(sdata, data0);</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  }</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  }</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span> </div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="comment">// Reduce result</span></div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  int4 reduce4 = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(vdata.s0123, vdata.s4567);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  int2 reduce2 = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(reduce4.s01, reduce4.s23);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordtype">int</span> res = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(reduce2.s0, reduce2.s1);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  res = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(res, sdata);</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> <span class="preprocessor">#if defined(POOL_AVG)</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  res = <a class="code" href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">round</a>(<a class="code" href="pooling__layer__quantized_8cl.xhtml#a5db17889d824975fefb2ce2f4690637f">DIV_OP</a>(res, <a class="code" href="pooling__layer__quantized_8cl.xhtml#a4057c01dd49145c5e463f1cea52542df">calculate_avg_scale</a>(POOL_SIZE_X, POOL_SIZE_Y, MAX_WIDTH, MAX_HEIGHT, PAD_X, PAD_Y, STRIDE_X, STRIDE_Y)));</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(POOL_AVG) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span> </div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="comment">// Store result</span></div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  *(__global uchar *)output.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> = convert_uchar(res);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> }</div><div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a482ef7d59a5f474ca126e737c7f0978a"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a></div><div class="ttdeci">#define POOL_OP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00027">pooling_layer_quantized.cl:27</a></div></div>
+<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00095">95</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
+<div class="fragment"><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> {</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> input = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(input);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> output = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(output);</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  int8 vdata = 0;</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordtype">int</span> sdata = 0;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="comment">// Load data</span></div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> y = 0; y < POOL_SIZE_Y; y++)</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  {</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keywordtype">int</span> x = 0;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordflow">for</span>(; x <= ((int)POOL_SIZE_X - 8); x += 8)</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  {</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  uchar8 data = vload8(0, (__global uchar *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&input, x, y, 0));</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  int8 data0 = convert_int8(data);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  vdata = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(vdata, data0);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  }</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="comment">// Leftover</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">for</span>(; x < (int)POOL_SIZE_X; ++x)</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  {</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  uchar data = *((__global uchar *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&input, x, y, 0));</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keywordtype">int</span> data0 = convert_int(data);</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  sdata = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(sdata, data0);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  }</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  }</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span> </div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="comment">// Reduce result</span></div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  int4 reduce4 = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(vdata.s0123, vdata.s4567);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  int2 reduce2 = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(reduce4.s01, reduce4.s23);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keywordtype">int</span> res = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(reduce2.s0, reduce2.s1);</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  res = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(res, sdata);</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> </div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="preprocessor">#if defined(POOL_AVG)</span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  res = <a class="code" href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">round</a>(<a class="code" href="pooling__layer__quantized_8cl.xhtml#a5db17889d824975fefb2ce2f4690637f">DIV_OP</a>(res, <a class="code" href="pooling__layer__quantized_8cl.xhtml#a4057c01dd49145c5e463f1cea52542df">calculate_avg_scale</a>(POOL_SIZE_X, POOL_SIZE_Y, MAX_WIDTH, MAX_HEIGHT, PAD_X, PAD_Y, STRIDE_X, STRIDE_Y)));</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(POOL_AVG) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span> </div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  uchar result_u8 = convert_uchar(res);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span> </div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="preprocessor">#if defined(OFFSET_IN1) && defined(OFFSET_OUT) && defined(SCALE_IN1) && defined(SCALE_OUT)</span></div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> </div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> result_f32 = convert_float(result_u8);</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> input_offset = (float)OFFSET_IN1;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> input_scale = (float)SCALE_IN1;</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> scale_out = (float)<a class="code" href="activation__layer__qa8_8cl.xhtml#a814d8a020b304f2ad69204ca56d76e4f">SCALE_OUT</a>;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> offset_out = (float)<a class="code" href="activation__layer__qa8_8cl.xhtml#ae6008da94300b9fd595c9b708bade271">OFFSET_OUT</a>;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> in_f32 = (result_f32 - input_offset) * input_scale;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> out_f32 = in_f32 / scale_out + offset_out;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  result_u8 = convert_uchar_sat(convert_int_rte(out_f32));</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span> </div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(OFFSET_IN1) && defined(OFFSET_OUT) && defined(SCALE_IN1) && defined(SCALE_OUT) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> </div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  *(__global uchar *)output.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> = result_u8;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span> }</div><div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a482ef7d59a5f474ca126e737c7f0978a"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a></div><div class="ttdeci">#define POOL_OP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00042">pooling_layer_quantized.cl:42</a></div></div>
+<div class="ttc" id="activation__layer__qa8_8cl_xhtml_ae6008da94300b9fd595c9b708bade271"><div class="ttname"><a href="activation__layer__qa8_8cl.xhtml#ae6008da94300b9fd595c9b708bade271">OFFSET_OUT</a></div><div class="ttdeci">#define OFFSET_OUT</div><div class="ttdef"><b>Definition:</b> <a href="activation__layer__qa8_8cl_source.xhtml#l00129">activation_layer_qa8.cl:129</a></div></div>
<div class="ttc" id="struct_tensor3_d_xhtml"><div class="ttname"><a href="struct_tensor3_d.xhtml">Tensor3D</a></div><div class="ttdoc">Structure to hold 3D tensor information.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00160">helpers.h:160</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_aaae2b6b1c3f4404121346a4c27b22647"><div class="ttname"><a href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">arm_compute::round</a></div><div class="ttdeci">int round(float x, RoundingPolicy rounding_policy)</div><div class="ttdoc">Return a rounded value of x.</div><div class="ttdef"><b>Definition:</b> <a href="_rounding_8cpp_source.xhtml#l00035">Rounding.cpp:35</a></div></div>
<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a31c8c760f08fb1a331b16b7c204321dc"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_TENSOR3D_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00128">helpers.h:128</a></div></div>
-<div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a5db17889d824975fefb2ce2f4690637f"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a5db17889d824975fefb2ce2f4690637f">DIV_OP</a></div><div class="ttdeci">#define DIV_OP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00032">pooling_layer_quantized.cl:32</a></div></div>
+<div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a5db17889d824975fefb2ce2f4690637f"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a5db17889d824975fefb2ce2f4690637f">DIV_OP</a></div><div class="ttdeci">#define DIV_OP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00047">pooling_layer_quantized.cl:47</a></div></div>
<div class="ttc" id="struct_tensor3_d_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">Tensor3D::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00162">helpers.h:162</a></div></div>
+<div class="ttc" id="activation__layer__qa8_8cl_xhtml_a814d8a020b304f2ad69204ca56d76e4f"><div class="ttname"><a href="activation__layer__qa8_8cl.xhtml#a814d8a020b304f2ad69204ca56d76e4f">SCALE_OUT</a></div><div class="ttdeci">#define SCALE_OUT</div><div class="ttdef"><b>Definition:</b> <a href="activation__layer__qa8_8cl_source.xhtml#l00130">activation_layer_qa8.cl:130</a></div></div>
<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a2101b2fe0193ce227ae4e0945e321d85"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a></div><div class="ttdeci">__global const uchar * tensor3D_offset(const Tensor3D *tensor, int x, int y, int z)</div><div class="ttdoc">Get the pointer position of a Tensor3D.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00324">helpers.h:324</a></div></div>
-<div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a4057c01dd49145c5e463f1cea52542df"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a4057c01dd49145c5e463f1cea52542df">calculate_avg_scale</a></div><div class="ttdeci">int calculate_avg_scale(const int pool_size_x, const int pool_size_y, const int upper_bound_w, const int upper_bound_h, const int pad_x, const int pad_y, const int stride_x, const int stride_y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00040">pooling_layer_quantized.cl:40</a></div></div>
+<div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a4057c01dd49145c5e463f1cea52542df"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a4057c01dd49145c5e463f1cea52542df">calculate_avg_scale</a></div><div class="ttdeci">int calculate_avg_scale(const int pool_size_x, const int pool_size_y, const int upper_bound_w, const int upper_bound_h, const int pad_x, const int pad_y, const int stride_x, const int stride_y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00055">pooling_layer_quantized.cl:55</a></div></div>
</div><!-- fragment -->
-<p class="reference">References <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00040">calculate_avg_scale()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00128">CONVERT_TO_TENSOR3D_STRUCT</a>, <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00032">DIV_OP</a>, <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00027">POOL_OP</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00162">Tensor3D::ptr</a>, <a class="el" href="_rounding_8cpp_source.xhtml#l00035">arm_compute::round()</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00324">tensor3D_offset()</a>.</p>
+<p class="reference">References <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00055">calculate_avg_scale()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00128">CONVERT_TO_TENSOR3D_STRUCT</a>, <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00047">DIV_OP</a>, <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00129">OFFSET_OUT</a>, <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00042">POOL_OP</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00162">Tensor3D::ptr</a>, <a class="el" href="_rounding_8cpp_source.xhtml#l00035">arm_compute::round()</a>, <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00130">SCALE_OUT</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00324">tensor3D_offset()</a>.</p>
</div>
</div>
@@ -677,21 +679,23 @@
</dd>
</dl>
-<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00174">174</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
-<div class="fragment"><div class="line"><a name="l00177"></a><span class="lineno"> 177</span> {</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span> <span class="preprocessor">#if defined(DST_DEPTH)</span></div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <a class="code" href="struct_tensor4_d.xhtml">Tensor4D</a> input = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a23b9032d1b9d59547545e457f82ee478">CONVERT_TO_TENSOR4D_STRUCT</a>(input, DST_DEPTH);</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <a class="code" href="struct_tensor4_d.xhtml">Tensor4D</a> output = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a23b9032d1b9d59547545e457f82ee478">CONVERT_TO_TENSOR4D_STRUCT</a>(output, DST_DEPTH);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <span class="preprocessor">#else </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> input = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(input);</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> output = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(output);</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span> </div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  int8 vdata = 0;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span> </div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> idx_width = get_global_id(1) * STRIDE_X;</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span> <span class="preprocessor">#if defined(DST_DEPTH)</span></div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> idx_height = (get_global_id(2) % DST_DEPTH) * STRIDE_Y;</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span> <span class="preprocessor">#else </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> idx_height = get_global_id(2) * STRIDE_Y;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span> </div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> y = 0; y < POOL_SIZE_Y; ++y)</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  {</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keywordtype">int</span> y1 = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af77145fbdc6b0c8931148f5597d9de53">select</a>(y, PAD_Y - idx_height, y + idx_height - PAD_Y < 0 || y + idx_height - PAD_Y >= MAX_HEIGHT);</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> x = 0; x < POOL_SIZE_X; ++x)</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  {</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="keywordtype">int</span> x1 = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af77145fbdc6b0c8931148f5597d9de53">select</a>(x, PAD_X - idx_width - 1, x + idx_width - PAD_X < 0 || x + idx_width - PAD_X >= MAX_WIDTH);</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  x1 = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af77145fbdc6b0c8931148f5597d9de53">select</a>(x1, PAD_X - idx_width - 1, y != y1);</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span> </div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span> <span class="preprocessor">#if defined(DST_DEPTH)</span></div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  uchar8 data = vload8(0, (__global uchar *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#ad442fb5ec8be1fff97f543150de5d822">tensor4D_offset</a>(&input, 0, x1 - PAD_X, y1 - PAD_Y, 0));</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span> <span class="preprocessor">#else </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  uchar8 data = vload8(0, (__global uchar *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&input, 0, x1 - PAD_X, y1 - PAD_Y));</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span> </div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  int8 data0 = convert_int8(data);</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  vdata = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(vdata, data0);</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  }</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  }</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span> </div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span> <span class="preprocessor">#if defined(POOL_AVG)</span></div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="comment">// Divide by pool region in case of average pooling</span></div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  vdata = convert_int8(<a class="code" href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">round</a>(<a class="code" href="pooling__layer__quantized_8cl.xhtml#a6c01fa98d360a9d52926dc6a5a599711">DIV_OP_NHWC</a>(vdata, <a class="code" href="pooling__layer__quantized_8cl.xhtml#a235920cb0f8577da6e104ccb03fbda25">calculate_avg_scale_nhwc</a>(POOL_SIZE_X, POOL_SIZE_Y, MAX_WIDTH, MAX_HEIGHT, PAD_X, PAD_Y, STRIDE_X, STRIDE_Y))));</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(POOL_AVG) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span> </div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="comment">// Store result</span></div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  vstore8(convert_uchar8(vdata), 0, (__global uchar *)output.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span> }</div><div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a482ef7d59a5f474ca126e737c7f0978a"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a></div><div class="ttdeci">#define POOL_OP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00027">pooling_layer_quantized.cl:27</a></div></div>
+<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00203">203</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
+<div class="fragment"><div class="line"><a name="l00206"></a><span class="lineno"> 206</span> {</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span> <span class="preprocessor">#if defined(DST_DEPTH)</span></div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <a class="code" href="struct_tensor4_d.xhtml">Tensor4D</a> input = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a23b9032d1b9d59547545e457f82ee478">CONVERT_TO_TENSOR4D_STRUCT</a>(input, DST_DEPTH);</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <a class="code" href="struct_tensor4_d.xhtml">Tensor4D</a> output = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a23b9032d1b9d59547545e457f82ee478">CONVERT_TO_TENSOR4D_STRUCT</a>(output, DST_DEPTH);</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span> <span class="preprocessor">#else </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> input = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(input);</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> output = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(output);</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span> </div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  int8 vdata = 0;</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span> </div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> idx_width = get_global_id(1) * STRIDE_X;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span> <span class="preprocessor">#if defined(DST_DEPTH)</span></div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> idx_height = (get_global_id(2) % DST_DEPTH) * STRIDE_Y;</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span> <span class="preprocessor">#else </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> idx_height = get_global_id(2) * STRIDE_Y;</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span> </div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> y = 0; y < POOL_SIZE_Y; ++y)</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  {</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="keywordtype">int</span> y1 = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af77145fbdc6b0c8931148f5597d9de53">select</a>(y, PAD_Y - idx_height, y + idx_height - PAD_Y < 0 || y + idx_height - PAD_Y >= MAX_HEIGHT);</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> x = 0; x < POOL_SIZE_X; ++x)</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  {</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="keywordtype">int</span> x1 = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af77145fbdc6b0c8931148f5597d9de53">select</a>(x, PAD_X - idx_width - 1, x + idx_width - PAD_X < 0 || x + idx_width - PAD_X >= MAX_WIDTH);</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  x1 = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af77145fbdc6b0c8931148f5597d9de53">select</a>(x1, PAD_X - idx_width - 1, y != y1);</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span> </div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span> <span class="preprocessor">#if defined(DST_DEPTH)</span></div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  uchar8 data = vload8(0, (__global uchar *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#ad442fb5ec8be1fff97f543150de5d822">tensor4D_offset</a>(&input, 0, x1 - PAD_X, y1 - PAD_Y, 0));</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span> <span class="preprocessor">#else </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  uchar8 data = vload8(0, (__global uchar *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&input, 0, x1 - PAD_X, y1 - PAD_Y));</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span> </div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  int8 data0 = convert_int8(data);</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  vdata = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(vdata, data0);</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  }</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  }</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span> </div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span> <span class="preprocessor">#if defined(POOL_AVG)</span></div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <span class="comment">// Divide by pool region in case of average pooling</span></div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  vdata = convert_int8(<a class="code" href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">round</a>(<a class="code" href="pooling__layer__quantized_8cl.xhtml#a6c01fa98d360a9d52926dc6a5a599711">DIV_OP_NHWC</a>(vdata, <a class="code" href="pooling__layer__quantized_8cl.xhtml#a235920cb0f8577da6e104ccb03fbda25">calculate_avg_scale_nhwc</a>(POOL_SIZE_X, POOL_SIZE_Y, MAX_WIDTH, MAX_HEIGHT, PAD_X, PAD_Y, STRIDE_X, STRIDE_Y))));</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(POOL_AVG) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span> </div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  uchar8 out_u8 = convert_uchar8(vdata);</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span> <span class="preprocessor">#if defined(OFFSET_IN1) && defined(OFFSET_OUT) && defined(SCALE_IN1) && defined(SCALE_OUT)</span></div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  REQUANTIZE(8, out_u8, OFFSET_IN1, <a class="code" href="activation__layer__qa8_8cl.xhtml#ae6008da94300b9fd595c9b708bade271">OFFSET_OUT</a>, SCALE_IN1, <a class="code" href="activation__layer__qa8_8cl.xhtml#a814d8a020b304f2ad69204ca56d76e4f">SCALE_OUT</a>, out_u8);</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span> <span class="preprocessor">#endif </span><span class="comment">/* defined(OFFSET_IN1) && defined(OFFSET_OUT) && defined(SCALE_IN1) && defined(SCALE_OUT) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span> </div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="comment">// Store result</span></div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  vstore8(out_u8, 0, (__global uchar *)output.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span> }</div><div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a482ef7d59a5f474ca126e737c7f0978a"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a></div><div class="ttdeci">#define POOL_OP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00042">pooling_layer_quantized.cl:42</a></div></div>
+<div class="ttc" id="activation__layer__qa8_8cl_xhtml_ae6008da94300b9fd595c9b708bade271"><div class="ttname"><a href="activation__layer__qa8_8cl.xhtml#ae6008da94300b9fd595c9b708bade271">OFFSET_OUT</a></div><div class="ttdeci">#define OFFSET_OUT</div><div class="ttdef"><b>Definition:</b> <a href="activation__layer__qa8_8cl_source.xhtml#l00129">activation_layer_qa8.cl:129</a></div></div>
<div class="ttc" id="struct_tensor3_d_xhtml"><div class="ttname"><a href="struct_tensor3_d.xhtml">Tensor3D</a></div><div class="ttdoc">Structure to hold 3D tensor information.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00160">helpers.h:160</a></div></div>
<div class="ttc" id="struct_tensor4_d_xhtml"><div class="ttname"><a href="struct_tensor4_d.xhtml">Tensor4D</a></div><div class="ttdoc">Structure to hold 4D tensor information.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00170">helpers.h:170</a></div></div>
-<div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a235920cb0f8577da6e104ccb03fbda25"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a235920cb0f8577da6e104ccb03fbda25">calculate_avg_scale_nhwc</a></div><div class="ttdeci">int calculate_avg_scale_nhwc(const int pool_size_x, const int pool_size_y, int upper_bound_w, int upper_bound_h, const int pad_x, const int pad_y, const int stride_x, const int stride_y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00125">pooling_layer_quantized.cl:125</a></div></div>
+<div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a235920cb0f8577da6e104ccb03fbda25"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a235920cb0f8577da6e104ccb03fbda25">calculate_avg_scale_nhwc</a></div><div class="ttdeci">int calculate_avg_scale_nhwc(const int pool_size_x, const int pool_size_y, int upper_bound_w, int upper_bound_h, const int pad_x, const int pad_y, const int stride_x, const int stride_y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00154">pooling_layer_quantized.cl:154</a></div></div>
<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_ad442fb5ec8be1fff97f543150de5d822"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#ad442fb5ec8be1fff97f543150de5d822">tensor4D_offset</a></div><div class="ttdeci">__global const uchar * tensor4D_offset(const Tensor4D *tensor, int x, int y, int z, int w)</div><div class="ttdoc">Get the pointer position of a Tensor4D.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00337">helpers.h:337</a></div></div>
<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a23b9032d1b9d59547545e457f82ee478"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a23b9032d1b9d59547545e457f82ee478">CONVERT_TO_TENSOR4D_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_TENSOR4D_STRUCT(name, mod_size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00135">helpers.h:135</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_aaae2b6b1c3f4404121346a4c27b22647"><div class="ttname"><a href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">arm_compute::round</a></div><div class="ttdeci">int round(float x, RoundingPolicy rounding_policy)</div><div class="ttdoc">Return a rounded value of x.</div><div class="ttdef"><b>Definition:</b> <a href="_rounding_8cpp_source.xhtml#l00035">Rounding.cpp:35</a></div></div>
<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a31c8c760f08fb1a331b16b7c204321dc"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_TENSOR3D_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00128">helpers.h:128</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_af77145fbdc6b0c8931148f5597d9de53"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#af77145fbdc6b0c8931148f5597d9de53">arm_compute::test::validation::select</a></div><div class="ttdeci">CLSelect select</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_select_8cpp_source.xhtml#l00164">Select.cpp:164</a></div></div>
<div class="ttc" id="struct_tensor3_d_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">Tensor3D::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00162">helpers.h:162</a></div></div>
-<div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a6c01fa98d360a9d52926dc6a5a599711"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a6c01fa98d360a9d52926dc6a5a599711">DIV_OP_NHWC</a></div><div class="ttdeci">#define DIV_OP_NHWC(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00034">pooling_layer_quantized.cl:34</a></div></div>
+<div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a6c01fa98d360a9d52926dc6a5a599711"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a6c01fa98d360a9d52926dc6a5a599711">DIV_OP_NHWC</a></div><div class="ttdeci">#define DIV_OP_NHWC(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00049">pooling_layer_quantized.cl:49</a></div></div>
+<div class="ttc" id="activation__layer__qa8_8cl_xhtml_a814d8a020b304f2ad69204ca56d76e4f"><div class="ttname"><a href="activation__layer__qa8_8cl.xhtml#a814d8a020b304f2ad69204ca56d76e4f">SCALE_OUT</a></div><div class="ttdeci">#define SCALE_OUT</div><div class="ttdef"><b>Definition:</b> <a href="activation__layer__qa8_8cl_source.xhtml#l00130">activation_layer_qa8.cl:130</a></div></div>
<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a2101b2fe0193ce227ae4e0945e321d85"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a></div><div class="ttdeci">__global const uchar * tensor3D_offset(const Tensor3D *tensor, int x, int y, int z)</div><div class="ttdoc">Get the pointer position of a Tensor3D.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00324">helpers.h:324</a></div></div>
</div><!-- fragment -->
-<p class="reference">References <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00125">calculate_avg_scale_nhwc()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00128">CONVERT_TO_TENSOR3D_STRUCT</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00135">CONVERT_TO_TENSOR4D_STRUCT</a>, <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00034">DIV_OP_NHWC</a>, <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00027">POOL_OP</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00162">Tensor3D::ptr</a>, <a class="el" href="_rounding_8cpp_source.xhtml#l00035">arm_compute::round()</a>, <a class="el" href="_c_l_2_select_8cpp_source.xhtml#l00164">arm_compute::test::validation::select</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00324">tensor3D_offset()</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00337">tensor4D_offset()</a>.</p>
+<p class="reference">References <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00154">calculate_avg_scale_nhwc()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00128">CONVERT_TO_TENSOR3D_STRUCT</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00135">CONVERT_TO_TENSOR4D_STRUCT</a>, <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00049">DIV_OP_NHWC</a>, <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00129">OFFSET_OUT</a>, <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00042">POOL_OP</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00162">Tensor3D::ptr</a>, <a class="el" href="_rounding_8cpp_source.xhtml#l00035">arm_compute::round()</a>, <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00130">SCALE_OUT</a>, <a class="el" href="_c_l_2_select_8cpp_source.xhtml#l00164">arm_compute::test::validation::select</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00324">tensor3D_offset()</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00337">tensor4D_offset()</a>.</p>
</div>
</div>
@@ -701,7 +705,7 @@
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_aebb8dcc11953d78e620bbef0b9e2183.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_8c278f79c760e5c5fbd911f9870614c1.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_25885286e9dad4fa105b7b25a8031bbf.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="pooling__layer__quantized_8cl.xhtml">pooling_layer_quantized.cl</a></li>
- <li class="footer">Generated on Thu Feb 28 2019 12:24:56 for Compute Library by
+ <li class="footer">Generated on Thu May 23 2019 17:11:26 for Compute Library by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
</ul>