Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 1 | <!-- HTML header for doxygen 1.8.9.1--> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 6 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 7 | <meta name="generator" content="Doxygen 1.8.11"/> |
| 8 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines --> |
| 9 | <title>Compute Library: src/core/CL/cl_kernels/activation_layer_qa8.cl File Reference</title> |
| 10 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 11 | <script type="text/javascript" src="jquery.js"></script> |
| 12 | <script type="text/javascript" src="dynsections.js"></script> |
| 13 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 14 | <script type="text/javascript" src="resize.js"></script> |
| 15 | <script type="text/javascript" src="navtreedata.js"></script> |
| 16 | <script type="text/javascript" src="navtree.js"></script> |
| 17 | <script type="text/javascript"> |
| 18 | $(document).ready(initResizable); |
| 19 | $(window).load(resizeHeight); |
| 20 | </script> |
| 21 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 22 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 23 | <script type="text/javascript" src="search/search.js"></script> |
| 24 | <script type="text/javascript"> |
| 25 | $(document).ready(function() { init_search(); }); |
| 26 | </script> |
| 27 | <script type="text/x-mathjax-config"> |
| 28 | MathJax.Hub.Config({ |
| 29 | extensions: ["tex2jax.js"], |
| 30 | jax: ["input/TeX","output/HTML-CSS"], |
| 31 | }); |
| 32 | </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
| 33 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 34 | </head> |
| 35 | <body> |
| 36 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 37 | <div id="titlearea"> |
| 38 | <table cellspacing="0" cellpadding="0"> |
| 39 | <tbody> |
| 40 | <tr style="height: 56px;"> |
| 41 | <td style="padding-left: 0.5em;"> |
| 42 | <div id="projectname">Compute Library |
| 43 |  <span id="projectnumber">17.12</span> |
| 44 | </div> |
| 45 | </td> |
| 46 | </tr> |
| 47 | </tbody> |
| 48 | </table> |
| 49 | </div> |
| 50 | <!-- end header part --> |
| 51 | <!-- Generated by Doxygen 1.8.11 --> |
| 52 | <script type="text/javascript"> |
| 53 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 54 | </script> |
| 55 | <div id="navrow1" class="tabs"> |
| 56 | <ul class="tablist"> |
| 57 | <li><a href="index.xhtml"><span>Main Page</span></a></li> |
| 58 | <li><a href="pages.xhtml"><span>Related Pages</span></a></li> |
| 59 | <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li> |
| 60 | <li><a href="annotated.xhtml"><span>Data Structures</span></a></li> |
| 61 | <li class="current"><a href="files.xhtml"><span>Files</span></a></li> |
| 62 | <li> |
| 63 | <div id="MSearchBox" class="MSearchBoxInactive"> |
| 64 | <span class="left"> |
| 65 | <img id="MSearchSelect" src="search/mag_sel.png" |
| 66 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 67 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 68 | alt=""/> |
| 69 | <input type="text" id="MSearchField" value="Search" accesskey="S" |
| 70 | onfocus="searchBox.OnSearchFieldFocus(true)" |
| 71 | onblur="searchBox.OnSearchFieldFocus(false)" |
| 72 | onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| 73 | </span><span class="right"> |
| 74 | <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| 75 | </span> |
| 76 | </div> |
| 77 | </li> |
| 78 | </ul> |
| 79 | </div> |
| 80 | <div id="navrow2" class="tabs2"> |
| 81 | <ul class="tablist"> |
| 82 | <li><a href="files.xhtml"><span>File List</span></a></li> |
| 83 | <li><a href="globals.xhtml"><span>Globals</span></a></li> |
| 84 | </ul> |
| 85 | </div> |
| 86 | </div><!-- top --> |
| 87 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 88 | <div id="nav-tree"> |
| 89 | <div id="nav-tree-contents"> |
| 90 | <div id="nav-sync" class="sync"></div> |
| 91 | </div> |
| 92 | </div> |
| 93 | <div id="splitbar" style="-moz-user-select:none;" |
| 94 | class="ui-resizable-handle"> |
| 95 | </div> |
| 96 | </div> |
| 97 | <script type="text/javascript"> |
| 98 | $(document).ready(function(){initNavTree('activation__layer__qa8_8cl.xhtml','');}); |
| 99 | </script> |
| 100 | <div id="doc-content"> |
| 101 | <!-- window showing the filter options --> |
| 102 | <div id="MSearchSelectWindow" |
| 103 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 104 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 105 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 106 | </div> |
| 107 | |
| 108 | <!-- iframe showing the search results (closed by default) --> |
| 109 | <div id="MSearchResultsWindow"> |
| 110 | <iframe src="javascript:void(0)" frameborder="0" |
| 111 | name="MSearchResults" id="MSearchResults"> |
| 112 | </iframe> |
| 113 | </div> |
| 114 | |
| 115 | <div class="header"> |
| 116 | <div class="summary"> |
| 117 | <a href="#define-members">Macros</a> | |
| 118 | <a href="#func-members">Functions</a> </div> |
| 119 | <div class="headertitle"> |
| 120 | <div class="title">activation_layer_qa8.cl File Reference</div> </div> |
| 121 | </div><!--header--> |
| 122 | <div class="contents"> |
| 123 | <div class="textblock"><code>#include "<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>"</code><br /> |
| 124 | </div> |
| 125 | <p><a href="activation__layer__qa8_8cl_source.xhtml">Go to the source code of this file.</a></p> |
| 126 | <table class="memberdecls"> |
| 127 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> |
| 128 | Macros</h2></td></tr> |
| 129 | <tr class="memitem:a5a392548f2df67370cb15d2a5d75cd7b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="activation__layer__qa8_8cl.xhtml#a5a392548f2df67370cb15d2a5d75cd7b">TYPE</a>   <a class="el" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, VEC_SIZE)</td></tr> |
| 130 | <tr class="separator:a5a392548f2df67370cb15d2a5d75cd7b"><td class="memSeparator" colspan="2"> </td></tr> |
| 131 | <tr class="memitem:ab13ec269b92f52bb2f1f6dcf12956704"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="activation__layer__qa8_8cl.xhtml#ab13ec269b92f52bb2f1f6dcf12956704">ACTIVATION_OP2</a>(op, x)   op##_op(x)</td></tr> |
| 132 | <tr class="separator:ab13ec269b92f52bb2f1f6dcf12956704"><td class="memSeparator" colspan="2"> </td></tr> |
| 133 | <tr class="memitem:a5a310089a4e6b6de57a075a9bd4ced82"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="activation__layer__qa8_8cl.xhtml#a5a310089a4e6b6de57a075a9bd4ced82">ACTIVATION_OP</a>(op, x)   <a class="el" href="activation__layer__qa8_8cl.xhtml#ab13ec269b92f52bb2f1f6dcf12956704">ACTIVATION_OP2</a>(op, x)</td></tr> |
| 134 | <tr class="separator:a5a310089a4e6b6de57a075a9bd4ced82"><td class="memSeparator" colspan="2"> </td></tr> |
| 135 | </table><table class="memberdecls"> |
| 136 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 137 | Functions</h2></td></tr> |
| 138 | <tr class="memitem:aceaec5c948eb4a004fad33f4c769882a"><td class="memItemLeft" align="right" valign="top">DATA_TYPEVEC_SIZE </td><td class="memItemRight" valign="bottom"><a class="el" href="activation__layer__qa8_8cl.xhtml#aceaec5c948eb4a004fad33f4c769882a">brelu_op</a> (DATA_TYPEVEC_SIZE x)</td></tr> |
| 139 | <tr class="separator:aceaec5c948eb4a004fad33f4c769882a"><td class="memSeparator" colspan="2"> </td></tr> |
| 140 | <tr class="memitem:a979d1d0d0b9b9595f467d94b1c22faea"><td class="memItemLeft" align="right" valign="top">DATA_TYPEVEC_SIZE </td><td class="memItemRight" valign="bottom"><a class="el" href="activation__layer__qa8_8cl.xhtml#a979d1d0d0b9b9595f467d94b1c22faea">lu_brelu_op</a> (DATA_TYPEVEC_SIZE x)</td></tr> |
| 141 | <tr class="separator:a979d1d0d0b9b9595f467d94b1c22faea"><td class="memSeparator" colspan="2"> </td></tr> |
| 142 | <tr class="memitem:a09d1f299a449474a37f86c5874970aa2"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="activation__layer__qa8_8cl.xhtml#a09d1f299a449474a37f86c5874970aa2">activation_layer_qa8</a> (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_stride_z, uint input_step_z, uint input_offset_first_element_in_bytes, __global uchar *output_ptr, uint output_stride_x, uint output_step_x, uint output_stride_y, uint output_step_y, uint output_stride_z, uint output_step_z, uint output_offset_first_element_in_bytes)</td></tr> |
| 143 | <tr class="memdesc:a09d1f299a449474a37f86c5874970aa2"><td class="mdescLeft"> </td><td class="mdescRight">This performs an activation function on QASYMM8 inputs. <a href="#a09d1f299a449474a37f86c5874970aa2">More...</a><br /></td></tr> |
| 144 | <tr class="separator:a09d1f299a449474a37f86c5874970aa2"><td class="memSeparator" colspan="2"> </td></tr> |
| 145 | </table> |
| 146 | <h2 class="groupheader">Macro Definition Documentation</h2> |
| 147 | <a class="anchor" id="a5a310089a4e6b6de57a075a9bd4ced82"></a> |
| 148 | <div class="memitem"> |
| 149 | <div class="memproto"> |
| 150 | <table class="memname"> |
| 151 | <tr> |
| 152 | <td class="memname">#define ACTIVATION_OP</td> |
| 153 | <td>(</td> |
| 154 | <td class="paramtype"> </td> |
| 155 | <td class="paramname">op, </td> |
| 156 | </tr> |
| 157 | <tr> |
| 158 | <td class="paramkey"></td> |
| 159 | <td></td> |
| 160 | <td class="paramtype"> </td> |
| 161 | <td class="paramname">x </td> |
| 162 | </tr> |
| 163 | <tr> |
| 164 | <td></td> |
| 165 | <td>)</td> |
| 166 | <td></td><td>   <a class="el" href="activation__layer__qa8_8cl.xhtml#ab13ec269b92f52bb2f1f6dcf12956704">ACTIVATION_OP2</a>(op, x)</td> |
| 167 | </tr> |
| 168 | </table> |
| 169 | </div><div class="memdoc"> |
| 170 | |
| 171 | <p>Definition at line <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00040">40</a> of file <a class="el" href="activation__layer__qa8_8cl_source.xhtml">activation_layer_qa8.cl</a>.</p> |
| 172 | |
| 173 | <p>Referenced by <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00070">activation_layer_qa8()</a>.</p> |
| 174 | |
| 175 | </div> |
| 176 | </div> |
| 177 | <a class="anchor" id="ab13ec269b92f52bb2f1f6dcf12956704"></a> |
| 178 | <div class="memitem"> |
| 179 | <div class="memproto"> |
| 180 | <table class="memname"> |
| 181 | <tr> |
| 182 | <td class="memname">#define ACTIVATION_OP2</td> |
| 183 | <td>(</td> |
| 184 | <td class="paramtype"> </td> |
| 185 | <td class="paramname">op, </td> |
| 186 | </tr> |
| 187 | <tr> |
| 188 | <td class="paramkey"></td> |
| 189 | <td></td> |
| 190 | <td class="paramtype"> </td> |
| 191 | <td class="paramname">x </td> |
| 192 | </tr> |
| 193 | <tr> |
| 194 | <td></td> |
| 195 | <td>)</td> |
| 196 | <td></td><td>   op##_op(x)</td> |
| 197 | </tr> |
| 198 | </table> |
| 199 | </div><div class="memdoc"> |
| 200 | |
| 201 | <p>Definition at line <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00039">39</a> of file <a class="el" href="activation__layer__qa8_8cl_source.xhtml">activation_layer_qa8.cl</a>.</p> |
| 202 | |
| 203 | </div> |
| 204 | </div> |
| 205 | <a class="anchor" id="a5a392548f2df67370cb15d2a5d75cd7b"></a> |
| 206 | <div class="memitem"> |
| 207 | <div class="memproto"> |
| 208 | <table class="memname"> |
| 209 | <tr> |
| 210 | <td class="memname">#define TYPE   <a class="el" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, VEC_SIZE)</td> |
| 211 | </tr> |
| 212 | </table> |
| 213 | </div><div class="memdoc"> |
| 214 | |
| 215 | <p>Definition at line <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00026">26</a> of file <a class="el" href="activation__layer__qa8_8cl_source.xhtml">activation_layer_qa8.cl</a>.</p> |
| 216 | |
| 217 | <p>Referenced by <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00070">activation_layer_qa8()</a>, <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00029">brelu_op()</a>, and <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00034">lu_brelu_op()</a>.</p> |
| 218 | |
| 219 | </div> |
| 220 | </div> |
| 221 | <h2 class="groupheader">Function Documentation</h2> |
| 222 | <a class="anchor" id="a09d1f299a449474a37f86c5874970aa2"></a> |
| 223 | <div class="memitem"> |
| 224 | <div class="memproto"> |
| 225 | <table class="memname"> |
| 226 | <tr> |
| 227 | <td class="memname">__kernel void activation_layer_qa8 </td> |
| 228 | <td>(</td> |
| 229 | <td class="paramtype">__global uchar * </td> |
| 230 | <td class="paramname"><em>input_ptr</em>, </td> |
| 231 | </tr> |
| 232 | <tr> |
| 233 | <td class="paramkey"></td> |
| 234 | <td></td> |
| 235 | <td class="paramtype">uint </td> |
| 236 | <td class="paramname"><em>input_stride_x</em>, </td> |
| 237 | </tr> |
| 238 | <tr> |
| 239 | <td class="paramkey"></td> |
| 240 | <td></td> |
| 241 | <td class="paramtype">uint </td> |
| 242 | <td class="paramname"><em>input_step_x</em>, </td> |
| 243 | </tr> |
| 244 | <tr> |
| 245 | <td class="paramkey"></td> |
| 246 | <td></td> |
| 247 | <td class="paramtype">uint </td> |
| 248 | <td class="paramname"><em>input_stride_y</em>, </td> |
| 249 | </tr> |
| 250 | <tr> |
| 251 | <td class="paramkey"></td> |
| 252 | <td></td> |
| 253 | <td class="paramtype">uint </td> |
| 254 | <td class="paramname"><em>input_step_y</em>, </td> |
| 255 | </tr> |
| 256 | <tr> |
| 257 | <td class="paramkey"></td> |
| 258 | <td></td> |
| 259 | <td class="paramtype">uint </td> |
| 260 | <td class="paramname"><em>input_stride_z</em>, </td> |
| 261 | </tr> |
| 262 | <tr> |
| 263 | <td class="paramkey"></td> |
| 264 | <td></td> |
| 265 | <td class="paramtype">uint </td> |
| 266 | <td class="paramname"><em>input_step_z</em>, </td> |
| 267 | </tr> |
| 268 | <tr> |
| 269 | <td class="paramkey"></td> |
| 270 | <td></td> |
| 271 | <td class="paramtype">uint </td> |
| 272 | <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td> |
| 273 | </tr> |
| 274 | <tr> |
| 275 | <td class="paramkey"></td> |
| 276 | <td></td> |
| 277 | <td class="paramtype">__global uchar * </td> |
| 278 | <td class="paramname"><em>output_ptr</em>, </td> |
| 279 | </tr> |
| 280 | <tr> |
| 281 | <td class="paramkey"></td> |
| 282 | <td></td> |
| 283 | <td class="paramtype">uint </td> |
| 284 | <td class="paramname"><em>output_stride_x</em>, </td> |
| 285 | </tr> |
| 286 | <tr> |
| 287 | <td class="paramkey"></td> |
| 288 | <td></td> |
| 289 | <td class="paramtype">uint </td> |
| 290 | <td class="paramname"><em>output_step_x</em>, </td> |
| 291 | </tr> |
| 292 | <tr> |
| 293 | <td class="paramkey"></td> |
| 294 | <td></td> |
| 295 | <td class="paramtype">uint </td> |
| 296 | <td class="paramname"><em>output_stride_y</em>, </td> |
| 297 | </tr> |
| 298 | <tr> |
| 299 | <td class="paramkey"></td> |
| 300 | <td></td> |
| 301 | <td class="paramtype">uint </td> |
| 302 | <td class="paramname"><em>output_step_y</em>, </td> |
| 303 | </tr> |
| 304 | <tr> |
| 305 | <td class="paramkey"></td> |
| 306 | <td></td> |
| 307 | <td class="paramtype">uint </td> |
| 308 | <td class="paramname"><em>output_stride_z</em>, </td> |
| 309 | </tr> |
| 310 | <tr> |
| 311 | <td class="paramkey"></td> |
| 312 | <td></td> |
| 313 | <td class="paramtype">uint </td> |
| 314 | <td class="paramname"><em>output_step_z</em>, </td> |
| 315 | </tr> |
| 316 | <tr> |
| 317 | <td class="paramkey"></td> |
| 318 | <td></td> |
| 319 | <td class="paramtype">uint </td> |
| 320 | <td class="paramname"><em>output_offset_first_element_in_bytes</em> </td> |
| 321 | </tr> |
| 322 | <tr> |
| 323 | <td></td> |
| 324 | <td>)</td> |
| 325 | <td></td><td></td> |
| 326 | </tr> |
| 327 | </table> |
| 328 | </div><div class="memdoc"> |
| 329 | |
| 330 | <p>This performs an activation function on QASYMM8 inputs. </p> |
| 331 | <dl class="section note"><dt>Note</dt><dd>In order to perform the activation function "in-place", the pre-processor -DIN_PLACE must be passed at compile time</dd> |
| 332 | <dd> |
| 333 | Datatype should be given as a preprocessor argument using -DDATA_TYPE=type. e.g. -DDATA_TYPE=short </dd> |
| 334 | <dd> |
| 335 | <a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information. ">Vector</a> size should be given as a preprocessor argument using -DVEC_SIZE=size. e.g. -DVEC_SIZE=16 </dd> |
| 336 | <dd> |
| 337 | Activation function should be given as a preprocessor argument using -DACT=name. e.g. -DACT=TANH </dd> |
| 338 | <dd> |
| 339 | A, B variables required by some activation functions are set using -DA_VAL= and -DB_VAL= respectively. </dd> |
| 340 | <dd> |
| 341 | Quantization scales of the input/output tensors are passed in with -DS1_VAL= and -DS2_VAL= respectively. </dd> |
| 342 | <dd> |
| 343 | Quantization offsets of the input/output tensors are passed in with -DO1_VAL= and -DO2_VAL= respectively.</dd></dl> |
| 344 | <dl class="params"><dt>Parameters</dt><dd> |
| 345 | <table class="params"> |
| 346 | <tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the source image. Supported data types: QASYMM8 </td></tr> |
| 347 | <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr> |
| 348 | <tr><td class="paramdir">[in]</td><td class="paramname">input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr> |
| 349 | <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr> |
| 350 | <tr><td class="paramdir">[in]</td><td class="paramname">input_step_y</td><td>input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr> |
| 351 | <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_z</td><td>Stride of the source tensor in Z dimension (in bytes) </td></tr> |
| 352 | <tr><td class="paramdir">[in]</td><td class="paramname">input_step_z</td><td>input_stride_z * number of elements along Z processed per workitem(in bytes) </td></tr> |
| 353 | <tr><td class="paramdir">[in]</td><td class="paramname">input_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr> |
| 354 | <tr><td class="paramdir">[out]</td><td class="paramname">output_ptr</td><td>Pointer to the destination image. Supported data types: same as <code>input_ptr</code> </td></tr> |
| 355 | <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr> |
| 356 | <tr><td class="paramdir">[in]</td><td class="paramname">output_step_x</td><td>output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr> |
| 357 | <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr> |
| 358 | <tr><td class="paramdir">[in]</td><td class="paramname">output_step_y</td><td>output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr> |
| 359 | <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_z</td><td>Stride of the source tensor in Z dimension (in bytes) </td></tr> |
| 360 | <tr><td class="paramdir">[in]</td><td class="paramname">output_step_z</td><td>output_stride_z * number of elements along Z processed per workitem(in bytes) </td></tr> |
| 361 | <tr><td class="paramdir">[in]</td><td class="paramname">output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr> |
| 362 | </table> |
| 363 | </dd> |
| 364 | </dl> |
| 365 | |
| 366 | <p>Definition at line <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00070">70</a> of file <a class="el" href="activation__layer__qa8_8cl_source.xhtml">activation_layer_qa8.cl</a>.</p> |
| 367 | |
| 368 | <p>References <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00040">ACTIVATION_OP</a>, <a class="el" href="helpers_8h_source.xhtml#l00117">CONVERT_TO_TENSOR3D_STRUCT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00151">Tensor3D::ptr</a>, <a class="el" href="namespacearm__compute.xhtml#a6452ac376d4adb94d93a93d678bb6757">arm_compute::round()</a>, <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00026">TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00040">VLOAD</a>, and <a class="el" href="helpers_8h_source.xhtml#l00043">VSTORE</a>.</p> |
| 369 | <div class="fragment"><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> {</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> input = <a class="code" href="helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(input);</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="preprocessor">#ifdef IN_PLACE</span></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> output = input;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="preprocessor">#else </span><span class="comment">/* IN_PLACE */</span><span class="preprocessor"></span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> output = <a class="code" href="helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(output);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="preprocessor">#endif </span><span class="comment">/* IN_PLACE */</span><span class="preprocessor"></span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> </div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="comment">// Load data</span></div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <a class="code" href="activation__layer__qa8_8cl.xhtml#a5a392548f2df67370cb15d2a5d75cd7b">TYPE</a> data = <a class="code" href="helpers_8h.xhtml#a287e2fc366c312b468382c95bb90f91f">VLOAD</a>(VEC_SIZE)(0, (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)input.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span> </div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="comment">// Perform activation</span></div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  data = <a class="code" href="activation__layer__qa8_8cl.xhtml#a5a310089a4e6b6de57a075a9bd4ced82">ACTIVATION_OP</a>(ACT, data);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> </div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="comment">// requantize to output space</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  float16 fdata = convert_float16(data);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  fdata = <a class="code" href="namespacearm__compute.xhtml#a6452ac376d4adb94d93a93d678bb6757">round</a>((fdata - (<span class="keywordtype">float</span>)O1_VAL) * ((<span class="keywordtype">float</span>)S1_VAL / (<span class="keywordtype">float</span>)S2_VAL) + (<span class="keywordtype">float</span>)O2_VAL);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  uchar16 qdata = convert_uchar16_sat(fdata);</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>  <span class="comment">// Store result</span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <a class="code" href="helpers_8h.xhtml#acb282042d1edeeaa3cc979a206f78b54">VSTORE</a>(VEC_SIZE)</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  (qdata, 0, (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)output.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span> }</div><div class="ttc" id="helpers_8h_xhtml_a287e2fc366c312b468382c95bb90f91f"><div class="ttname"><a href="helpers_8h.xhtml#a287e2fc366c312b468382c95bb90f91f">VLOAD</a></div><div class="ttdeci">#define VLOAD(size)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00040">helpers.h:40</a></div></div> |
| 370 | <div class="ttc" id="helpers_8h_xhtml_a31c8c760f08fb1a331b16b7c204321dc"><div class="ttname"><a href="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="helpers_8h_source.xhtml#l00117">helpers.h:117</a></div></div> |
| 371 | <div class="ttc" id="activation__layer__qa8_8cl_xhtml_a5a392548f2df67370cb15d2a5d75cd7b"><div class="ttname"><a href="activation__layer__qa8_8cl.xhtml#a5a392548f2df67370cb15d2a5d75cd7b">TYPE</a></div><div class="ttdeci">#define TYPE</div><div class="ttdef"><b>Definition:</b> <a href="activation__layer__qa8_8cl_source.xhtml#l00026">activation_layer_qa8.cl:26</a></div></div> |
| 372 | <div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div> |
| 373 | <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="helpers_8h_source.xhtml#l00149">helpers.h:149</a></div></div> |
| 374 | <div class="ttc" id="helpers_8h_xhtml_acb282042d1edeeaa3cc979a206f78b54"><div class="ttname"><a href="helpers_8h.xhtml#acb282042d1edeeaa3cc979a206f78b54">VSTORE</a></div><div class="ttdeci">#define VSTORE(size)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00043">helpers.h:43</a></div></div> |
| 375 | <div class="ttc" id="activation__layer__qa8_8cl_xhtml_a5a310089a4e6b6de57a075a9bd4ced82"><div class="ttname"><a href="activation__layer__qa8_8cl.xhtml#a5a310089a4e6b6de57a075a9bd4ced82">ACTIVATION_OP</a></div><div class="ttdeci">#define ACTIVATION_OP(op, x)</div><div class="ttdef"><b>Definition:</b> <a href="activation__layer__qa8_8cl_source.xhtml#l00040">activation_layer_qa8.cl:40</a></div></div> |
| 376 | <div class="ttc" id="namespacearm__compute_xhtml_a6452ac376d4adb94d93a93d678bb6757"><div class="ttname"><a href="namespacearm__compute.xhtml#a6452ac376d4adb94d93a93d678bb6757">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> |
| 377 | <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="helpers_8h_source.xhtml#l00151">helpers.h:151</a></div></div> |
| 378 | </div><!-- fragment --> |
| 379 | </div> |
| 380 | </div> |
| 381 | <a class="anchor" id="aceaec5c948eb4a004fad33f4c769882a"></a> |
| 382 | <div class="memitem"> |
| 383 | <div class="memproto"> |
| 384 | <table class="mlabels"> |
| 385 | <tr> |
| 386 | <td class="mlabels-left"> |
| 387 | <table class="memname"> |
| 388 | <tr> |
| 389 | <td class="memname">DATA_TYPEVEC_SIZE brelu_op </td> |
| 390 | <td>(</td> |
| 391 | <td class="paramtype">DATA_TYPEVEC_SIZE </td> |
| 392 | <td class="paramname"><em>x</em></td><td>)</td> |
| 393 | <td></td> |
| 394 | </tr> |
| 395 | </table> |
| 396 | </td> |
| 397 | <td class="mlabels-right"> |
| 398 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 399 | </tr> |
| 400 | </table> |
| 401 | </div><div class="memdoc"> |
| 402 | |
| 403 | <p>Definition at line <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00029">29</a> of file <a class="el" href="activation__layer__qa8_8cl_source.xhtml">activation_layer_qa8.cl</a>.</p> |
| 404 | |
| 405 | <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, and <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00026">TYPE</a>.</p> |
| 406 | <div class="fragment"><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> {</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>((<a class="code" href="activation__layer__qa8_8cl.xhtml#a5a392548f2df67370cb15d2a5d75cd7b">TYPE</a>)A_VAL, <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>(0, x));</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> }</div><div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aabcf39e3917f842dbc5fbb0d802f24d5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">arm_compute::test::fixed_point_arithmetic::detail::min</a></div><div class="ttdeci">fixed_point< T > min(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">FixedPoint.h:884</a></div></div> |
| 407 | <div class="ttc" id="activation__layer__qa8_8cl_xhtml_a5a392548f2df67370cb15d2a5d75cd7b"><div class="ttname"><a href="activation__layer__qa8_8cl.xhtml#a5a392548f2df67370cb15d2a5d75cd7b">TYPE</a></div><div class="ttdeci">#define TYPE</div><div class="ttdef"><b>Definition:</b> <a href="activation__layer__qa8_8cl_source.xhtml#l00026">activation_layer_qa8.cl:26</a></div></div> |
| 408 | <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point< T > max(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">FixedPoint.h:889</a></div></div> |
| 409 | </div><!-- fragment --> |
| 410 | </div> |
| 411 | </div> |
| 412 | <a class="anchor" id="a979d1d0d0b9b9595f467d94b1c22faea"></a> |
| 413 | <div class="memitem"> |
| 414 | <div class="memproto"> |
| 415 | <table class="mlabels"> |
| 416 | <tr> |
| 417 | <td class="mlabels-left"> |
| 418 | <table class="memname"> |
| 419 | <tr> |
| 420 | <td class="memname">DATA_TYPEVEC_SIZE lu_brelu_op </td> |
| 421 | <td>(</td> |
| 422 | <td class="paramtype">DATA_TYPEVEC_SIZE </td> |
| 423 | <td class="paramname"><em>x</em></td><td>)</td> |
| 424 | <td></td> |
| 425 | </tr> |
| 426 | </table> |
| 427 | </td> |
| 428 | <td class="mlabels-right"> |
| 429 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 430 | </tr> |
| 431 | </table> |
| 432 | </div><div class="memdoc"> |
| 433 | |
| 434 | <p>Definition at line <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00034">34</a> of file <a class="el" href="activation__layer__qa8_8cl_source.xhtml">activation_layer_qa8.cl</a>.</p> |
| 435 | |
| 436 | <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">arm_compute::test::fixed_point_arithmetic::detail::min()</a>, and <a class="el" href="activation__layer__qa8_8cl_source.xhtml#l00026">TYPE</a>.</p> |
| 437 | <div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> {</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">min</a>(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">max</a>(x, (<a class="code" href="activation__layer__qa8_8cl.xhtml#a5a392548f2df67370cb15d2a5d75cd7b">TYPE</a>)B_VAL), (<a class="code" href="activation__layer__qa8_8cl.xhtml#a5a392548f2df67370cb15d2a5d75cd7b">TYPE</a>)A_VAL);</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> }</div><div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_aabcf39e3917f842dbc5fbb0d802f24d5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#aabcf39e3917f842dbc5fbb0d802f24d5">arm_compute::test::fixed_point_arithmetic::detail::min</a></div><div class="ttdeci">fixed_point< T > min(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00884">FixedPoint.h:884</a></div></div> |
| 438 | <div class="ttc" id="activation__layer__qa8_8cl_xhtml_a5a392548f2df67370cb15d2a5d75cd7b"><div class="ttname"><a href="activation__layer__qa8_8cl.xhtml#a5a392548f2df67370cb15d2a5d75cd7b">TYPE</a></div><div class="ttdeci">#define TYPE</div><div class="ttdef"><b>Definition:</b> <a href="activation__layer__qa8_8cl_source.xhtml#l00026">activation_layer_qa8.cl:26</a></div></div> |
| 439 | <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point< T > max(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">FixedPoint.h:889</a></div></div> |
| 440 | </div><!-- fragment --> |
| 441 | </div> |
| 442 | </div> |
| 443 | </div><!-- contents --> |
| 444 | </div><!-- doc-content --> |
| 445 | <!-- start footer part --> |
| 446 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 447 | <ul> |
| 448 | <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="activation__layer__qa8_8cl.xhtml">activation_layer_qa8.cl</a></li> |
| 449 | <li class="footer">Generated on Thu Dec 14 2017 23:48:33 for Compute Library by |
| 450 | <a href="http://www.doxygen.org/index.html"> |
| 451 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li> |
| 452 | </ul> |
| 453 | </div> |
| 454 | </body> |
| 455 | </html> |